From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] xen: Fix possible user space selector corruption Date: Fri, 4 Oct 2013 14:33:53 +0100 Message-ID: <524EC3C1.4010304__44695.7124433995$1380894776$gmane$org@citrix.com> References: <1380788677.30462.1.camel@hamster.uk.xensource.com> <524D4132.3000809@citrix.com> <1380804692.30462.3.camel@hamster.uk.xensource.com> <20131004132033.GA26673@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VS5mh-0001CK-PB for xen-devel@lists.xenproject.org; Fri, 04 Oct 2013 13:51:11 +0000 In-Reply-To: <20131004132033.GA26673@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xenproject.org, Frediano Ziglio , Boris Ostrovsky , linux-kernel@vger.kernel.org, David Vrabel List-Id: xen-devel@lists.xenproject.org On 04/10/13 14:20, Konrad Rzeszutek Wilk wrote: > On Thu, Oct 03, 2013 at 01:51:32PM +0100, Frediano Ziglio wrote: >> On Thu, 2013-10-03 at 11:04 +0100, Andrew Cooper wrote: >>> On 03/10/13 09:24, Frediano Ziglio wrote: >>>> >>>> Bisecting the code commit 7076aada1040de4ed79a5977dbabdb5e5ea5e249 appears >>>> to be the first one that have this issue. >>>> >>>> Signed-off-by: Frediano Ziglio >>> In terms of the correctness of the fix, >>> >>> Reviewed-by: Andrew Cooper > Should this also go in stable tree? Very much so. The change which exposed it for us was from 3.7 iirc, but I believe it has been a latent bug for as long as the native early boot code uses __USER_DS. >>> However, I am not sure the comment is necessary. The prevailing style >>> is for no justification of loads of segment selectors on boot, and the >>> comment itself refers simply to an interaction issue of 32bit on Xen >>> when making use of sysenter. >>> >> Suggestion for the comment ?? >> >> Frediano My suggestion was to omit the comment entirely, or simplify it to just: /* Xen starts us with XEN_FLAT_RING1_DS, but linux code expects __USER_DS */ Anyone who wants the full explanation can read the patch description. ~Andrew