Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Feb 2003 16:02:38 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Milo Hyson <milo@cyberlifelabs.com>
Cc:        FreeBSD Emulation List <freebsd-emulation@FreeBSD.ORG>
Subject:   Re: Working on IBM JDK fix
Message-ID:  <20030228155643.H21112-100000@gamplex.bde.org>
In-Reply-To: <3E5E5F56.90605@cyberlifelabs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Feb 2003, Milo Hyson wrote:

> Bruce Evans wrote:
>  > % 	/* allocate user ldt */
>  > % 	if (!pldt || largest_ld >= pldt->ldt_len) {
>  > % 		struct proc_ldt *new_ldt = user_ldt_alloc(mdp, largest_ld);
>  >   		^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  >
>  > But we use `largest_ld' for the size of the table here.
>  >
>  > Try adding 1 here.
>
> No, that doesn't solve the problem. I'm still seeing the same traps.
> That's definitely a bug that should be fixed though.
>
> According to the Linux kernel references on modify_ldt(), function codes
> 0x01 and 0x11 are both used to write a single LDT entry. The only
> difference between them is that 0x11 allows control of the
> useable/available bit. Both return either 0 on success or -1 on error.
> They never return anything but those two values. Looking at the Linux
> kernel source confirms this. I'm wondering if the 8190 being returned by
> FreeBSD is confusing the JDK into thinking the call failed when in fact
> it succeeded.

That is possible.  I'm not sure where modify_ldt() is implemented for
FreeBSD, but i386_set_ldt() returns the first selector set (not 0) on
success.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030228155643.H21112-100000>