[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] x86/pv: Don't deliver #GP for a SYSENTER with NT set


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 23 Sep 2020 11:18:46 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>
  • Delivery-date: Wed, 23 Sep 2020 10:19:30 +0000
  • Ironport-sdr: 0MXcKkTWrLrLn8yv8ToK47VSTrzinnxMF1i9a+OGSqiCi8d6tKFb6ZRiFXVKoFKHcC5dAUSHm8 N5bMGGGgLefXbr4fH+afLlowzTDTFpOLKmhfkRbdXGE+BOt539di5wT5L7BjCYsVycg55dCHP8 f4bD11OoYC1MI2fZTTQ7n9dMzeWmPN/jRq02lI0IZZFofawrsUS0y4X5+mOQA9ZJ8u9G9lBb/Y CGpYfzKBiaNMHAz5xZsFVhVjpEYsMx0FPAGQDArcJMHZaM+By72ijCra90u9h+Q0DWBx23oICp 0GY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
Fixes: fdac951560 ("x86: clear EFLAGS.NT in SYSENTER entry path")
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Andy Lutomirski <luto@xxxxxxxxxx>
---
 xen/arch/x86/x86_64/entry.S | 1 -
 1 file changed, 1 deletion(-)

diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
index 71a00e846b..44a110b9c8 100644
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -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
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.