From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
David Vrabel <david.vrabel@citrix.com>,
xen-devel <xen-devel@lists.xen.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrew Lutomirski <luto@kernel.org>
Subject: Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit
Date: Fri, 13 Nov 2015 20:23:48 -0500 [thread overview]
Message-ID: <56468D24.8030801@oracle.com> (raw)
In-Reply-To: <CALCETrVAEKrPiMX9O43pqkEC=xqc2qJ=VBNsV5iMMvW09W07hQ@mail.gmail.com>
On 11/13/2015 06:26 PM, Andy Lutomirski wrote:
> On Fri, Nov 13, 2015 at 3:18 PM, Boris Ostrovsky
> <boris.ostrovsky@oracle.com> wrote:
>> After 32-bit syscall rewrite, and specifically after commit 5f310f739b4c
>> ("x86/entry/32: Re-implement SYSENTER using the new C path"), the stack
>> frame that is passed to xen_sysexit is no longer a "standard" one (i.e.
>> it's not pt_regs).
>>
>> We need to adjust it so that subsequent xen_iret can use it.
> I'm wondering if this should be more straightforward:
>
> movq %rsp, %rdi
> call do_fast_syscall_32
> testl %eax, %eax
> jz .Lsyscall_32_done
>
> /* Opportunistic SYSRET */
> sysret32_from_system_call:
> XEN_DO_SYSRET32
>
> where XEN_DO_SYSRET32 is a simple pv op that, on Xen, jumps to a
> variant of Xen's iret path that knows that the fast path is okay.
This patch is for 32-bit kernel. I actually haven't looked at compat
code (probably because our tests don't try that), I need to do that too.
As for XEN_DO_SYSRET32 --- we'd presumably need to have a nop for
baremetal otherwise current paravirt op will use native_usergs_sysret32
(for compat code). Which means a new pv_op, I think.
-boris
next prev parent reply other threads:[~2015-11-14 1:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-13 23:18 [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Boris Ostrovsky
2015-11-13 23:26 ` Andy Lutomirski
2015-11-14 1:23 ` Boris Ostrovsky [this message]
2015-11-15 18:02 ` Andy Lutomirski
2015-11-16 16:25 ` Boris Ostrovsky
2015-11-16 19:03 ` Andy Lutomirski
2015-11-16 19:59 ` Borislav Petkov
2015-11-16 20:11 ` Andy Lutomirski
2015-11-16 20:22 ` Borislav Petkov
2015-11-16 20:48 ` Boris Ostrovsky
2015-11-16 20:50 ` Andy Lutomirski
2015-11-16 21:00 ` Borislav Petkov
[not found] ` <20151116210314.GA10307@char.us.oracle.com>
2015-11-16 21:04 ` Andy Lutomirski
2015-11-17 10:53 ` Joao Martins
2015-11-16 21:55 ` H. Peter Anvin
2015-11-17 14:40 ` Boris Ostrovsky
2015-11-17 18:49 ` Andy Lutomirski
2015-11-17 19:12 ` [Xen-devel] " Andrew Cooper
2015-11-17 19:16 ` Andy Lutomirski
2015-11-17 19:21 ` Borislav Petkov
2015-11-17 19:29 ` Andrew Cooper
2015-11-17 19:36 ` Andy Lutomirski
2015-11-17 19:37 ` Boris Ostrovsky
2015-11-17 19:38 ` Boris Ostrovsky
2015-11-16 20:31 ` Boris Ostrovsky
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=56468D24.8030801@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=xen-devel@lists.xen.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox