]> xenbits.xensource.com Git - xen.git/commitdiff
x86/pv: Don't deliver #GP for a SYSENTER with NT set
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 20 Oct 2020 13:04:32 +0000 (15:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Oct 2020 13:04:32 +0000 (15:04 +0200)
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>
master commit: 61d4a04349895edc5a5868274b906ba61ef24f47
master date: 2020-09-24 21:02:35 +0100

xen/arch/x86/x86_64/entry.S

index bb6577513a62c3899cd01d78558161d086741e6b..4f8b58af561f9d7dcda85a1bb5a2f7f72462ad13 100644 (file)
@@ -299,7 +299,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