x86/traps: Fix typo in do_entry_CP()
PATCH 1/1 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().
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Bobby Eshleman <[email protected]>
--- xen/arch/x86/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/traps.c +1 -1
@@ -2047,7 +2047,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 */
Signature · 1 line
2.11.0
Quoted 7 lines · Andrew Cooper
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 intodebugger_trap_entry().Fixes 5ad05b9c2490 ("x86/traps: Implement #CP handler and extend #PF for shadow stacks")Signed-off-by Andrew Cooper <[email protected]>
Quoted 10 lines · Jan Beulich
Quoted 7 lines · Andrew Cooper
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 intodebugger_trap_entry().Fixes 5ad05b9c2490 ("x86/traps: Implement #CP handler and extend #PF for shadow stacks")Signed-off-by Andrew Cooper <[email protected]>Reviewed-by Jan Beulich <[email protected]>
It turns out that I forgot to commit this patch, and it now needs a Release Ack to go in.
It is very safe and obvious. It is passing the wrong constant into a debug function.
Luckily the impact is benign due to other properties of the logic, and would only cause problems for people adding manual debug logic.
~Andrew
Andrew Cooper writes ("Re: [PATCH] x86/traps: Fix typo in do_entry_CP()"):
Quoted 8 lines
It turns out that I forgot to commit this patch, and it now needs a Release Ack to go in.
It is very safe and obvious. It is passing the wrong constant into a debug function.
Luckily the impact is benign due to other properties of the logic, and would only cause problems for people adding manual debug logic.
Thanks,