> Imagine that some brilliant lightweight threading library does:
> 
>  - set GS to nonzero (by whatever means -- arch_prctl(ARCH_SET_GS,
> whatever) on a pre-IVB host followed by migration, some modify_ldt
> garbage, simple bloody-mindedness, whatever);

Migration is only possible when the CPUID flags match.

>  - WRGSBASE
>  - Use GS for a bit
> 
> This will work most of the time until it gets unlucky with preemption.

As soon as a kernel thread or something else schedules the value
will be lost.

> And yes, runtime library authors really do mess up in amazing ways.
> 
> It's an issue.  It needs conscious design.

Ok. So your only objection is the order of the context switch
updates?

-Andi

-- 
[email protected] -- Speaking for myself only.

Reply via email to