lkml.org 
[lkml]   [2015]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [ 05/48] x86_64, switch_to(): Load TLS descriptors before switching DS and ES
From
Date
On Fri, 2015-05-15 at 10:05 +0200, Willy Tarreau wrote:
> 2.6.32-longterm review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Andy Lutomirski <luto@amacapital.net>
>
> commit f647d7c155f069c1a068030255c300663516420e upstream.
>
> Otherwise, if buggy user code points DS or ES into the TLS
> array, they would be corrupted after a context switch.
>
> This also significantly improves the comments and documents some
> gotchas in the code.
>
> Before this patch, the both tests below failed. With this
> patch, the es test passes, although the gsbase test still fails.
[...]

This depends on the changes to FPU/MMX/SSE state management that you
didn't apply to 2.6.32. Note this comment:

/* Must be after DS reload */
unlazy_fpu(prev_p);

Ben.

--
Ben Hutchings
It is impossible to make anything foolproof because fools are so ingenious.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-05-15 19:01    [W:0.246 / U:2.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site