WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [semi-urgent Xen CS question] Re: git commit 9fd67b4ed07

To: Andrew Lutomirski <luto@xxxxxxx>
Subject: Re: [Xen-devel] [semi-urgent Xen CS question] Re: git commit 9fd67b4ed0714ab718f1f9bd14c344af336a6df7 (x86-64: Give vvars their own page) breaks Xen PV guests (64-bit).
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Tue, 26 Jul 2011 23:20:41 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Tue, 26 Jul 2011 15:21:45 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=ulLrP96mcmhHY37KYEjioEM4NgH/Q3qjEtAv37eHoYk=; b=ucNTyVRLy98zdzISe2j/7dLquqM6vEJ6I2mb9/Qe0IAy3h9l1ckF0o19+mZQud6H2c XroLj8rHLod1hbqwQBOJienb+MXJiSslEpEAktfTJ5lVenXkwt3AKe9M3eaYeGwshPaH QC7f45N6H/Xz6w2obsZfZwMF0gmx02+SBb4d4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAObL_7Emqw0wg1pkvgYQBF7uPm5xCjFUpWsTso61-WRSoCtFzQ@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcxL4kDfdZBtWfaEnkuXaRu5ZOUAxA==
Thread-topic: [Xen-devel] [semi-urgent Xen CS question] Re: git commit 9fd67b4ed0714ab718f1f9bd14c344af336a6df7 (x86-64: Give vvars their own page) breaks Xen PV guests (64-bit).
User-agent: Microsoft-Entourage/12.30.0.110427
On 26/07/2011 22:40, "Andrew Lutomirski" <luto@xxxxxxx> wrote:

> If we go into the iret patch (via auditing, for example), then the
> FIXUP_TOP_OF_STACK macro does movq $__USER_CS,CS+\offset(%rsp), which
> (unless it's buggy) writes __USER_CS into the appropriate spot.
> 
> So I don't see what part of the entry path needs patching.

You'll get Xen's flat CS values loaded if Xen uses SYSRET to return to guest
context. This will happen on return to guest userspace if the guest kernel
calls the iret hypercall specifying the VGCF_in_syscall flag. And that would
typically happen when returning to userspace after a syscall. So I guess the
typical user process will quickly end up using the Xen code selector rather
than Linux's own.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>