From owner-freebsd-threads@FreeBSD.ORG Thu Apr 10 00:09:04 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13D0037B401 for ; Thu, 10 Apr 2003 00:09:04 -0700 (PDT) Received: from exchhz01.viatech.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 454B843FAF for ; Thu, 10 Apr 2003 00:09:00 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from davidw2k (ip-240-1-168-192.rev.dyxnet.com [192.168.1.240]) by exchhz01.viatech.com.cn with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id HLDQPV4W; Thu, 10 Apr 2003 14:55:11 +0800 Message-ID: <005001c2ff30$47835e60$f001a8c0@davidw2k> From: "David Xu" To: "Daniel Eischen" References: Date: Thu, 10 Apr 2003 15:10:34 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 cc: freebsd-threads@freebsd.org Subject: Re: Scope system threads (was Re: PS_BLOCKED) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2003 07:09:04 -0000 ----- Original Message -----=20 From: "Daniel Eischen" To: "David Xu" Cc: Sent: Thursday, April 10, 2003 6:24 AM Subject: Re: Scope system threads (was Re: PS_BLOCKED) > On Wed, 9 Apr 2003, Daniel Eischen wrote: > > I'll get another patch set up as soon as I can. I'd like to >=20 > It's in place now; same usual location. >=20 > http://people.freebsd.org/~deischen/libpthread.diffs >=20 Got it! I have found that %gs is not saved by kernel in trap frame and it brain dead direct loads userland %gs in cpu_switch, it is a bug for threaded program, I can easily crash kernel within few lines code by setting %gs to use LDT in a thread, and invalid the LDT descriptor in another thread, and kernel will crash in cpu_switch()! I am trying to fix it in kernel, but because there is too much code I must look, too easy to crash kernel, It would cost me much time, this is too bad for me, se we can not run multiple kses until the serious bug is fixed. > --=20 > Dan Eischen