Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 1999 09:10:03 -0700 (PDT)
From:      Luoqi Chen <luoqi@chen.ml.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/11287: rfork(RFMEM...) doesn't share LDTs set by i386_set_ldt,  breaking wine
Message-ID:  <199904301610.JAA64930@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/11287; it has been noted by GNATS.

From: Luoqi Chen <luoqi@chen.ml.org>
To: freebsd-gnats-submit@freebsd.org, nox@jelal.kn-bremen.de
Cc:  
Subject: Re: kern/11287: rfork(RFMEM...) doesn't share LDTs set by i386_set_ldt, 
 breaking wine
Date: Fri, 30 Apr 1999 12:05:13 -0400

 User LDT sharing should really be done in the machine dependent layer.
 I have an implementation based on -current (I don't have any machine
 running -stable), you may want to take a look at, the patch is at
 http://www.freebsd.org/~luoqi
 
 There are still two problems with this implementation:
 - It is incomplete for SMP. We need something similar to TLB shootdown
   when modifying the ldt table.
 - It doesn't work correctly in the following case:
   1. process A initially doesn't have a user ldt table
   2. process A forks process B (RFMEM)
   3. process B calls i386_set_ldt()
   now process B has a user ldt table, but inaccessible to A. I can
   see 3 solutions to this problem:
   1. Allocate a user ldt table for all processes.
        This is not really an acceptable solution, it penalize everyone
        else for the benefit of a few.
   2. Define another rfork flag RFLDT.
        The problem with solution is the flag is too machine-specific.
   3. Any process wants to share user ldt with its descendants should
      call i386_set_ldt() prior to any fork.
        This is a workaround in the user application, but should work
        well.
 
 -lq
 


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




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