diff options
author | Helge Deller <deller@gmx.de> | 2021-11-09 22:25:02 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-03-18 09:10:14 +0100 |
commit | 9b046d0245cec982c72a65d3ea1b834959a9708b (patch) | |
tree | d361a9686a4bc99ccc0122014c0800353e357d14 /arch/parisc/kernel/traps.c | |
parent | 46162ac2a6a425674b0e20a3e0668b21187f94bf (diff) |
parisc: Avoid using hardware single-step in kprobes
This patch changes the kprobe and kretprobe feature to use another
break instruction instead of relying on the hardware single-step
feature.
That way those kprobes now work in qemu as well, because in qemu we
don't emulate yet single-stepping.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/traps.c')
-rw-r--r-- | arch/parisc/kernel/traps.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 39576a9245c7..a6e61cf2cad0 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c @@ -302,7 +302,10 @@ static void handle_break(struct pt_regs *regs) parisc_kprobe_break_handler(regs); return; } - + if (unlikely(iir == PARISC_KPROBES_BREAK_INSN2)) { + parisc_kprobe_ss_handler(regs); + return; + } #endif #ifdef CONFIG_KGDB @@ -539,11 +542,6 @@ void notrace handle_interruption(int code, struct pt_regs *regs) /* Recovery counter trap */ regs->gr[0] &= ~PSW_R; -#ifdef CONFIG_KPROBES - if (parisc_kprobe_ss_handler(regs)) - return; -#endif - #ifdef CONFIG_KGDB if (kgdb_single_step) { kgdb_handle_exception(0, SIGTRAP, 0, regs); |