]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
x86/pv: Don't deliver #GP for a SYSENTER with NT set
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 26 Jun 2020 13:56:23 +0000 (14:56 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 24 Sep 2020 20:02:35 +0000 (21:02 +0100)
It is a matter of guest kernel policy what to do with offending userspace, and
terminating said userspace may not be the action chosen.

Linux explicitly tolerates this case.

Reported-by: Andy Lutomirski <luto@kernel.org>
Fixes: fdac951560 ("x86: clear EFLAGS.NT in SYSENTER entry path")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_64/entry.S

index 71a00e846b3482b9aec88c87c272cdcf32f75740..44a110b9c83cdcb9536c23ea141e25e2bb555b32 100644 (file)
@@ -313,7 +313,6 @@ UNLIKELY_START(nz, sysenter_nt_set)
         pushfq
         andl  $~X86_EFLAGS_NT,(%rsp)
         popfq
-        xorl  %eax,%eax
 UNLIKELY_END(sysenter_nt_set)
         testq %rax,%rax
         leal  (,%rcx,TBF_INTERRUPT),%ecx