Re: X86_64 BUG: missing FS/GS LDT reload on fork()

From: Samuel Thibault
Date: Fri Apr 23 2010 - 19:01:29 EST


Hello,

H. Peter Anvin, le Fri 23 Apr 2010 11:01:05 -0700, a écrit :
> On 04/23/2010 10:04 AM, Samuel Thibault wrote:
> > I have an issue with FS/GS LDT reload in the child of fork(). The
> > attached testcase fails quite often. It sets an LDT entry up, uses
> > prctl to set gs's base to a 64bit value, then loads gs with the LDT
> > entry. The LDT entry is now in effect. After a fork call, the LDT entry
> > is not in effect any more, the 64bit base is back!
>
> Okay... I have to say that I'm more than a bit confused why you're doing
> this,

:D

I'm fixing a user-level thread library with TLS support.

> The following patch looks like it should address that.

Indeed, it fixes the issue here.

Samuel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/