Scope system threads (was Re: PS_BLOCKED)

David Xu davidxu at freebsd.org
Thu Apr 10 00:09:04 PDT 2003


----- Original Message ----- 
From: "Daniel Eischen" <eischen at pcnet1.pcnet.com>
To: "David Xu" <davidxu at freebsd.org>
Cc: <freebsd-threads at freebsd.org>
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
> 
> It's in place now; same usual location.
> 
>   http://people.freebsd.org/~deischen/libpthread.diffs
> 

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.

> -- 
> Dan Eischen




More information about the freebsd-threads mailing list