Re: patch for x86 treatment of fs and gs in signal handlers

Linus Torvalds (torvalds@transmeta.com)
Wed, 26 Aug 1998 10:20:25 -0700 (PDT)


On 26 Aug 1998, Ulrich Drepper wrote:

> Martin Mares <mj@ucw.cz> writes:
>
> > Does this mean every program using threads needs to have its own LDT
> > and that starting a new thread involves yet another syscall to set up
> > his LDT entry?
>
> We are experimenting with this but yes, this is how it is currently
> implemented.

No, the kernel thinks that the memory management includes the LDT
information, so whenever two threads share the same vm space, they will
automatically share the same LDT too.

They obviously do not share the same register space, so two threads can
certainly easily have separate %fs and %gs, they just have to be pointers
to the same shared LDT.

I could be conviced to do otherwise, but this is how Wine wanted it as far
as I know, and it's also the "natural" way to do it..

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html