From owner-freebsd-current Tue May 1 15:32:50 2001 Delivered-To: freebsd-current@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 6C20237B422 for ; Tue, 1 May 2001 15:32:46 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id SAA12697; Tue, 1 May 2001 18:32:09 -0400 (EDT) Date: Tue, 1 May 2001 18:32:09 -0400 (EDT) From: Daniel Eischen To: current@freebsd.org Subject: Rfork'd threads, signals, and LDTs Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Why are %fs and %gs set back to default (_udata_sel) when posting signals? I am planning on using %fs for TSD/KSD and want it to be valid in signal handlers. A test program is at: http://people.freebsd.org/~deischen/test_tsd.c Compile it with -DDEBUG on an unpatched kernel to show more details. This following seems to fix it. Any reason it would cause problems? Index: machdep.c =================================================================== RCS file: /opt/FreeBSD/cvs/src/sys/i386/i386/machdep.c,v retrieving revision 1.447 diff -u -r1.447 machdep.c --- machdep.c 2001/04/27 19:28:19 1.447 +++ machdep.c 2001/05/01 22:20:52 @@ -745,8 +745,6 @@ regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; - regs->tf_fs = _udatasel; - load_gs(_udatasel); regs->tf_ss = _udatasel; } -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message