From nobody  Tue Jan  7 17:32:54 1997
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.8.4/8.8.4) id RAA02376;
          Tue, 7 Jan 1997 17:32:54 -0800 (PST)
Message-Id: <199701080132.RAA02376@freefall.freebsd.org>
Date: Tue, 7 Jan 1997 17:32:54 -0800 (PST)
From: h-nokubi@nmit.mt.nec.co.jp
To: freebsd-gnats-submit@freebsd.org
Subject: Wine does not work
X-Send-Pr-Version: www-1.0

>Number:         2412
>Category:       kern
>Synopsis:       USER_LDT not compiled in machdep.c & co
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan  7 17:40:01 PST 1997
>Closed-Date:    Fri Mar 13 13:21:42 PST 1998
>Last-Modified:  Fri Mar 13 13:22:31 PST 1998
>Originator:     NOKUBI Hirotaka
>Release:        2.2-ALPHA
>Organization:
NEC Microcomputer Technology Ltd., Tokyo, Japan
>Environment:
sorry, I'm using other BSD box now...
>Description:
Wine prints message `Did you reconfigure the kernel with "options USER_LDT"
?', then exit.
>How-To-Repeat:
invoke Wine.
>Fix:
src/sys/i386/i386/machdep.c and src/sys/i386/i386/vm_machdep.c need to include
"opt_user_ldt.h".
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Thu Dec 25 01:41:10 PST 1997 
State-Changed-Why:  
Configure your kernel with "options USER_LDT".  See the handbook on how 
to do this (options USER_LDT is not compiled-in by default). 
State-Changed-From-To: closed->feedback 
State-Changed-By: hoek 
State-Changed-When: Thu Dec 25 03:31:54 PST 1997 
State-Changed-Why:  
Allow originator chance to contest my judgement.  ;-) 

From: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
To: Tim Vanderhoek <hoek@freebsd.org>
Cc: h-nokubi@nmit.mt.nec.co.jp, freebsd-bugs@freebsd.org
Subject: Re: kern/2412 
Date: Thu, 25 Dec 1997 14:09:23 +0300

 Tim Vanderhoek wrote:
 > Synopsis: Wine does not work
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: hoek
 > State-Changed-When: Thu Dec 25 01:41:10 PST 1997
 > State-Changed-Why: 
 > Configure your kernel with "options USER_LDT".  See the handbook on how
 > to do this (options USER_LDT is not compiled-in by default).
 > 
 I don't think it is correct answer. Did you looked to the 'Fix:' in this PR?
 USER_LDT is a 'new style' option that go in opt_user_ldt.h. Files 
   sys/i386/i386/machdep.c
   sys/i386/i386/vm_machdep.c 
   sys/pc98/i386/machdep.c
 contains #ifdef USER_LDT, but don't contain #include "opt_user_ldt.h".
 So, apparently, the ifdefed code in these files never work. I have no 
 idea about purpose of the ifdefed code and LDT itself or why Wine work 
 for most people, but it looks very suspicious.
 
 Dima
 
 

From: Tim Vanderhoek <ac199@hwcn.org>
To: Bruce Evans <bde@zeta.org.au>
Cc: dima@tejblum.dnttm.rssi.ru, hoek@freebsd.org, h-nokubi@nmit.mt.nec.co.jp,
        gnats-submit@freebsd.org
Subject: Re: kern/2412
Date: Mon, 25 Nov 1996 23:49:38 -0500 (EST)

 On Fri, 26 Dec 1997, Bruce Evans wrote:
 
 > No one specific is responsible, but USER_LDT is obviously quite
 > broken without the option being visible.  fork(), exec() and exit()
 
 Okay, but I'm not about to enable untested code in machdep.c or
 vm_machdep.c, so I'll change the synopsis to reflect the problem,
 and add this message and one of Dima's to the audit-trail.
 
 I'll also note that the originator reports that the original
 problem ("wine does not run") can be worked-around by using a
 newer version of wine.
 
 > are broken.  fork()ing with an active user LDT at best leaves 2
 > processes sharing the LDT.  exec()ing with an active LDT leaks
 > memory and privilege.  exit()Ing with an active LDT leaks memory.
 > I guess wine doesn't change the user LDT often enough for the bugs
 > to do more than leak memory.
 > 
 > I'd like testing of misconfigured options to be fatal but can't see
 > a good way to implement it.  A bad way:
 > - in opt_global.h, define each option that doesn't belong in opt_global.h
 >   as an expression with a syntax error.
 > - redefine the expression in each opt_foo.h file (same as now, except
 >   for an #undef to prevent a warning).
 > - change each test of an option to use `#if' to ensure an error if the
 >   expression is not defined properly.
 > 
 > Bruce
 > 
 
 --
  tIM...HOEk
 OPTIMIZATION: the process of using many one-letter variables names
               hoping that the resultant code will run faster.
 
 
State-Changed-From-To: feedback->open 
State-Changed-By: hoek 
State-Changed-When: Fri Dec 26 07:48:04 PST 1997 
State-Changed-Why:  
I was hasty in closing this one. 
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Fri Mar 13 13:21:42 PST 1998 
State-Changed-Why:  
Fixed in rev. 1.280 of machdep.c and 1.93 of vm_machdep.c.  Thanks. 
>Unformatted:
