All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Andrew Lutomirski <luto@mit.edu>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	xen-devel@lists.xensource.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [semi-urgent Xen CS question] Re: git commit 9fd67b4ed0714ab718f1f9bd14c344af336a6df7 (x86-64: Give vvars their own page) breaks Xen PV guests (64-bit).
Date: Tue, 26 Jul 2011 23:20:41 +0100	[thread overview]
Message-ID: <CA54FC49.1E92C%keir.xen@gmail.com> (raw)
In-Reply-To: <CAObL_7Emqw0wg1pkvgYQBF7uPm5xCjFUpWsTso61-WRSoCtFzQ@mail.gmail.com>

On 26/07/2011 22:40, "Andrew Lutomirski" <luto@mit.edu> 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

  reply	other threads:[~2011-07-26 22:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25 15:54 git commit 9fd67b4ed0714ab718f1f9bd14c344af336a6df7 (x86-64: Give vvars their own page) breaks Xen PV guests (64-bit) Konrad Rzeszutek Wilk
2011-07-25 15:54 ` Konrad Rzeszutek Wilk
2011-07-25 16:10 ` Konrad Rzeszutek Wilk
2011-07-25 16:10   ` Konrad Rzeszutek Wilk
2011-07-25 18:10   ` Andrew Lutomirski
2011-07-26  7:18     ` Jan Beulich
2011-07-26  7:18       ` Jan Beulich
2011-07-26 16:18     ` Konrad Rzeszutek Wilk
2011-07-26 16:46       ` Ian Campbell
2011-07-26 19:01       ` Andrew Lutomirski
2011-07-26 20:51         ` Konrad Rzeszutek Wilk
2011-07-26 20:51           ` Konrad Rzeszutek Wilk
2011-07-26 20:55           ` Andrew Lutomirski
2011-07-26 20:55             ` Andrew Lutomirski
2011-07-26 21:06             ` Konrad Rzeszutek Wilk
2011-07-26 21:06               ` Konrad Rzeszutek Wilk
     [not found] ` <CAObL_7GpX=f3+tXA4ga6cBB_9VWBe6yVFvon=TzECQs5kcb-ag@mail.gmail.com>
     [not found]   ` <20110726153220.GA15110@dumpdata.com>
2011-07-26 19:08     ` [semi-urgent Xen CS question] " Andrew Lutomirski
2011-07-26 20:48       ` Keir Fraser
2011-07-26 21:10         ` Andrew Lutomirski
2011-07-26 21:40           ` Andrew Lutomirski
2011-07-26 22:20             ` Keir Fraser [this message]
2011-07-26 23:37             ` j.fitz.inge@gmail.com
2011-07-27  2:17               ` Andrew Lutomirski
2011-07-27 15:40                 ` Jeremy Fitzhardinge
2011-07-27 16:02                   ` Andrew Lutomirski
2011-07-27 17:19                     ` Jeremy Fitzhardinge
2011-07-28  4:33                       ` Andrew Lutomirski
2011-07-28  6:07                         ` Jeremy Fitzhardinge
2011-07-29 12:51                           ` Andrew Lutomirski
2011-07-29 15:31                             ` Jeremy Fitzhardinge
2011-07-31 18:56                               ` Konrad Rzeszutek Wilk
2011-07-31 19:14                                 ` Andrew Lutomirski
2011-08-02 14:10                                   ` Konrad Rzeszutek Wilk
2011-07-27 12:57           ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA54FC49.1E92C%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=jeremy@goop.org \
    --cc=konrad.wilk@oracle.com \
    --cc=luto@mit.edu \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.