Skip to content

Commit

Permalink
x86/traps: Fix typo in do_entry_CP()
Browse files Browse the repository at this point in the history
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: 5ad05b9 ("x86/traps: Implement #CP handler and extend #PF for shadow stacks")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
  • Loading branch information
andyhhp committed Nov 3, 2021
1 parent 3231ddf commit 512863e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xen/arch/x86/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,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 */
Expand Down

0 comments on commit 512863e

Please sign in to comment.