From owner-freebsd-emulation Thu Feb 27 21: 1:15 2003 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B084A37B401 for ; Thu, 27 Feb 2003 21:01:14 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B08B43F75 for ; Thu, 27 Feb 2003 21:01:13 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id QAA07457; Fri, 28 Feb 2003 16:01:07 +1100 Date: Fri, 28 Feb 2003 16:02:38 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Milo Hyson Cc: FreeBSD Emulation List Subject: Re: Working on IBM JDK fix In-Reply-To: <3E5E5F56.90605@cyberlifelabs.com> Message-ID: <20030228155643.H21112-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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