x86: force EFLAGS.IF on when exiting to PV guests
authorJan Beulich <jbeulich@suse.com>
Wed, 21 Dec 2016 15:46:13 +0000 (16:46 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 21 Dec 2016 15:46:13 +0000 (16:46 +0100)
commit0e47f92b072548800223f9a21ea051a017173915
treec7ec8770364984b8b9e1de108d600574c4ec3e30
parent8867a48e058ab04bd269cab12ef4de5ee8ad5b7b
x86: force EFLAGS.IF on when exiting to PV guests

Guest kernels modifying instructions in the process of being emulated
for another of their vCPU-s may effect EFLAGS.IF to be cleared upon
next exiting to guest context, by converting the being emulated
instruction to CLI (at the right point in time). Prevent any such bad
effects by always forcing EFLAGS.IF on. And to cover hypothetical other
similar issues, also force EFLAGS.{IOPL,NT,VM} to zero.

This is CVE-2016-10024 / XSA-202.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_64/compat/entry.S
xen/arch/x86/x86_64/entry.S