From owner-freebsd-bugs Thu Apr 22 15:52:37 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id B409215995 for ; Thu, 22 Apr 1999 15:52:29 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id PAA03831; Thu, 22 Apr 1999 15:50:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from blaubaer.kn-bremen.de (blaubaer.kn-bremen.de [194.94.232.249]) by hub.freebsd.org (Postfix) with ESMTP id 30BD715995 for ; Thu, 22 Apr 1999 15:46:42 -0700 (PDT) (envelope-from nox@saturn.kn-bremen.de) Received: from saturn.kn-bremen.de (uucp@localhost) by blaubaer.kn-bremen.de (8.9.1/8.9.1) with UUCP id AAA05416 for FreeBSD-gnats-submit@freebsd.org; Fri, 23 Apr 1999 00:39:04 +0200 Received: (from nox@localhost) by saturn.kn-bremen.de (8.9.3/8.8.5) id AAA43095; Fri, 23 Apr 1999 00:39:05 +0200 (MET DST) Message-Id: <199904222239.AAA43095@saturn.kn-bremen.de> Date: Fri, 23 Apr 1999 00:39:05 +0200 (MET DST) From: Juergen Lock Reply-To: nox@jelal.kn-bremen.de To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/11287: rfork(RFMEM...) doesn't share LDTs set by i386_set_ldt, breaking wine Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 11287 >Category: kern >Synopsis: rfork(RFMEM...) doesn't share LDTs set by i386_set_ldt, breaking wine >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 22 15:50:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Juergen Lock >Release: FreeBSD 3.1-STABLE i386 >Organization: me? organized? >Environment: FreeBSD 3.1-STABLE i386, wine current-CVS (or wine-990328 with thread patches). problem appears to be there in -current too. >Description: wine now uses kernel threads (rfork()) and expects i386_set_ldt() to work across threads, i.e. the new LDT be global to all threads. rfork() copies the ldt regardless of the RFMEM flag so each thread ends up with its own ldt (sys/i386/i386/vm_machdep.c, cpu_fork()). >How-To-Repeat: using a kernel with `options "USER_LDT"' and wine current-CVS (see http://www.winehq.com), or a patched wine-990328 (diffs are in my post to the freebsd-hackers mailing list which you can get at http://www.freebsd.org/cgi/mid.cgi?db=&id=19990417224534.A55834@saturn.kn-bremen.de), try to start a 16bit program from a win32 one. it will die at the line SET_CUR_THREAD( pNewTask->thdb ); in TASK_Reschedule() in loader/task.c, where its loading the %fs register. if you want all the details look for the `wine with threads?' thread in comp.unix.bsd.freebsd.misc and comp.emulators.ms-windows.wine, news:<7fnsgs$14jh$1@saturn.kn-bremen.de> >Fix: ??? I'll see if i can come up with one, but don't hold your breath... >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message