Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Apr 1999 00:39:05 +0200 (MET DST)
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/11287: rfork(RFMEM...) doesn't share LDTs set by i386_set_ldt, breaking wine
Message-ID:  <199904222239.AAA43095@saturn.kn-bremen.de>

next in thread | raw e-mail | index | archive | help

>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




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