diff options
author | Andy Lutomirski <luto@kernel.org> | 2020-07-03 10:02:55 -0700 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-07-04 19:47:25 +0200 |
commit | f41f0824224eb12ad84de8972962dd54be5abe3b (patch) | |
tree | 6cf0f72f726f716884553c14fbc6318318de5776 /arch/x86/xen/xen-asm_64.S | |
parent | x86/entry, selftests: Further improve user entry sanity checks (diff) | |
download | linux-dev-f41f0824224eb12ad84de8972962dd54be5abe3b.tar.xz linux-dev-f41f0824224eb12ad84de8972962dd54be5abe3b.zip |
x86/entry/xen: Route #DB correctly on Xen PV
On Xen PV, #DB doesn't use IST. It still needs to be correctly routed
depending on whether it came from user or kernel mode.
Get rid of DECLARE/DEFINE_IDTENTRY_XEN -- it was too hard to follow the
logic. Instead, route #DB and NMI through DECLARE/DEFINE_IDTENTRY_RAW on
Xen, and do the right thing for #DB. Also add more warnings to the
exc_debug* handlers to make this type of failure more obvious.
This fixes various forms of corruption that happen when usermode
triggers #DB on Xen PV.
Fixes: 4c0dcd8350a0 ("x86/entry: Implement user mode C entry points for #DB and #MCE")
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/4163e733cce0b41658e252c6c6b3464f33fdff17.1593795633.git.luto@kernel.org
Diffstat (limited to '')
-rw-r--r-- | arch/x86/xen/xen-asm_64.S | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/xen/xen-asm_64.S b/arch/x86/xen/xen-asm_64.S index e1e1c7eafa60..aab1d99b2b48 100644 --- a/arch/x86/xen/xen-asm_64.S +++ b/arch/x86/xen/xen-asm_64.S @@ -29,10 +29,9 @@ _ASM_NOKPROBE(xen_\name) .endm xen_pv_trap asm_exc_divide_error -xen_pv_trap asm_exc_debug -xen_pv_trap asm_exc_xendebug +xen_pv_trap asm_xenpv_exc_debug xen_pv_trap asm_exc_int3 -xen_pv_trap asm_exc_xennmi +xen_pv_trap asm_xenpv_exc_nmi xen_pv_trap asm_exc_overflow xen_pv_trap asm_exc_bounds xen_pv_trap asm_exc_invalid_op |