From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40237 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934320AbbEOMce (ORCPT ); Fri, 15 May 2015 08:32:34 -0400 Message-ID: <1431693140.6315.109.camel@decadent.org.uk> Subject: Re: [ 05/48] x86_64, switch_to(): Load TLS descriptors before switching DS and ES From: Ben Hutchings To: Willy Tarreau Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Andy Lutomirski , Andi Kleen , Linus Torvalds , Ingo Molnar Date: Fri, 15 May 2015 13:32:20 +0100 In-Reply-To: <20150515080530.510828652@1wt.eu> References: <20150515080530.510828652@1wt.eu> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-LZJ4zJkvKhOXZU7Lzg8v" Mime-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: --=-LZJ4zJkvKhOXZU7Lzg8v Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 m= e know. >=20 > ------------------ >=20 > From: Andy Lutomirski >=20 > commit f647d7c155f069c1a068030255c300663516420e upstream. >=20 > Otherwise, if buggy user code points DS or ES into the TLS > array, they would be corrupted after a context switch. >=20 > This also significantly improves the comments and documents some > gotchas in the code. >=20 > 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. --=20 Ben Hutchings It is impossible to make anything foolproof because fools are so ingenious. --=-LZJ4zJkvKhOXZU7Lzg8v Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIVAwUAVVXnWee/yOyVhhEJAQpGig/9GSZib2YjlzxbkgxW2x+ZmKkXt/uGrg+X RR8rgLT2jJH9gbUpSeyCo4gQi3bHWKwmdOoArBIO/UDE84gcsV9RWpRDLQIKzWJ7 P/AQDM7zRPsYT6vHnBc2Isc63yk45zaVtksAZisUMEnGpm9WbTSrtC/QnuDTvwPm bGAoTQFB/AgaFWFPhCRuUtP/GbcxVPoM1gzSUihfbvbspJU9N+oum83HMGBOyc8d DZbRPuFwK/KXSOGwbniMP53KsB6lM9rNiD4AndexCS3G2EjBNNKnLN56J8MaOoKZ sCUbHcXQKY9HYHUbTmMeINd9869lwQfa80wp2gjvgKWx5yjlCibRiyf4MPjAT9RS Yi1GuEvwCKufLkFvhMhpPqBP2q05xB8sh+9GWBv34/7y3t+uspw97sKMSusuil5R t+Wc1tOhQmwB5YMd6QQoiSqGDRevNo7mojq3q1WuLch5hU5aeeUaOMdP0FsSWDbO 0hNgwPPSDdl0+LK4EKcAkdcbJ/uhHdkxvJm4+F6cUvkG1IUlakqteyl1eWRZ+9fS 0Yo68UiFRU5Ewa1jZcneDIVz/IKUM40myv2aYCPqajF+VEcsx2X7renTZ4xhcb18 cbNtkd9G429UFFaPUPf1uDYebosNU6F471qu/RdoevjJRCmcKkMS8ysjlGLrtowU 4lzlAzJn32w= =bJld -----END PGP SIGNATURE----- --=-LZJ4zJkvKhOXZU7Lzg8v--