From: Andrew Cooper Date: Fri, 19 Nov 2021 08:40:19 +0000 (+0100) Subject: x86/traps: Fix typo in do_entry_CP() X-Git-Tag: archive/raspbian/4.14.3+32-g9de3671772-1_deb11u1+rpi1^2^2~48^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9d3bac49a54ffacd44d7fffda307b211d78b2ce0;p=xen.git x86/traps: Fix typo in do_entry_CP() The call to debugger_trap_entry() should pass the correct vector. The break-for-gdbsx logic is in practice unreachable because PV guests can't generate #CP, but it will interfere with anyone inserting custom debugging into debugger_trap_entry(). Fixes: 5ad05b9c2490 ("x86/traps: Implement #CP handler and extend #PF for shadow stacks") Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich master commit: 512863ed238d7390f74d43f0ba298b1dfa8f4803 master date: 2021-11-03 19:13:17 +0000 --- diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index a38f10ad28..d8dd583a4a 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1975,7 +1975,7 @@ void do_entry_CP(struct cpu_user_regs *regs) const char *err = "??"; unsigned int ec = regs->error_code; - if ( debugger_trap_entry(TRAP_debug, regs) ) + if ( debugger_trap_entry(X86_EXC_CP, regs) ) return; /* Decode ec if possible */