From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH for-4.7 v2 2/2] xen/x86: Introduce a new VMASSIST for architectural behaviour of iopl
Date: Thu, 7 Apr 2016 23:30:19 +0100 [thread overview]
Message-ID: <5706DF7B.5030002@citrix.com> (raw)
In-Reply-To: <5706E55902000078000E602F@prv-mh.provo.novell.com>
On 07/04/2016 22:55, Jan Beulich wrote:
>>>> On 07.04.16 at 23:39, <andrew.cooper3@citrix.com> wrote:
>> @@ -1763,7 +1765,8 @@ static void load_segments(struct vcpu *n)
>> vcpu_info(n, evtchn_upcall_mask) = 1;
>>
>> regs->entry_vector |= TRAP_syscall;
>> - regs->_eflags &= 0xFFFCBEFFUL;
>> + regs->_eflags &= ~(X86_EFLAGS_AC|X86_EFLAGS_VM|X86_EFLAGS_RF|
>> + X86_EFLAGS_NT|X86_EFLAGS_IOPL|X86_EFLAGS_TF);
> Why AC, which didn't get cleared before? Did you just copy
> the 64-bit variant from below?
Yes,
> Assuming so, with it removed Reviewed-by: Jan Beulich <jbeulich@suse.com>
Why keep the disparity?
Looking this up again, architecturally speaking, its wrong. AC does not
get cleared on a 32 or 64bit task switch; It only gets cleared on a real
mode task switch.
I presume you are refering to c/s eb97b7dc2b "[XEN] Fix x86/64 bug where
a guest application can crash the guest OS by setting AC flag in
RFLAGS.", from 2006? Such a PV VM is already vulnerable from other
means. I suppose this explains why 32bit PV kernels end up leaking AC
back into userspace.
Yuck - yet more non-architectural and non-documented PV ABI caused by
Xen trying to bugfix its way around broken PV kernels.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-07 22:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 21:39 [PATCH for-4.7 v2 1/2] xen/x86: Remove the use of vm86_mode() Andrew Cooper
2016-04-07 21:39 ` [PATCH for-4.7 v2 2/2] xen/x86: Introduce a new VMASSIST for architectural behaviour of iopl Andrew Cooper
2016-04-07 21:55 ` Jan Beulich
2016-04-07 22:30 ` Andrew Cooper [this message]
2016-04-07 22:53 ` Jan Beulich
2016-04-07 23:05 ` Andrew Cooper
2016-04-08 9:30 ` [PATCH for-4.7 v3 " Andrew Cooper
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=5706DF7B.5030002@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--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 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.