diff options
author | Helge Deller <deller@gmx.de> | 2023-05-24 14:31:14 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-05-24 15:46:12 +0200 |
commit | df419492e428b6a2bce98d0f613c58a13da6666c (patch) | |
tree | 8c8659915267ac71b98d9456343647e6a40083c7 /arch/parisc/kernel | |
parent | 2028315cf59bb899a5ac7e87dc48ecb8fac7ac24 (diff) |
parisc: Handle kprobes breakpoints only in kernel context
The kernel kprobes break instructions should only be handled when running
in kernel context.
Cc: <stable@vger.kernel.org> # v5.18+
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r-- | arch/parisc/kernel/traps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 13df6169f9e2..4d5f7b167a65 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c @@ -295,11 +295,11 @@ static void handle_break(struct pt_regs *regs) } #ifdef CONFIG_KPROBES - if (unlikely(iir == PARISC_KPROBES_BREAK_INSN)) { + if (unlikely(iir == PARISC_KPROBES_BREAK_INSN && !user_mode(regs))) { parisc_kprobe_break_handler(regs); return; } - if (unlikely(iir == PARISC_KPROBES_BREAK_INSN2)) { + if (unlikely(iir == PARISC_KPROBES_BREAK_INSN2 && !user_mode(regs))) { parisc_kprobe_ss_handler(regs); return; } |