Skip to content

Commit df41949

Browse files
committed
parisc: Handle kprobes breakpoints only in kernel context
The kernel kprobes break instructions should only be handled when running in kernel context. Cc: <[email protected]> # v5.18+ Signed-off-by: Helge Deller <[email protected]>
1 parent 2028315 commit df41949

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/parisc/kernel/traps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ static void handle_break(struct pt_regs *regs)
295295
}
296296

297297
#ifdef CONFIG_KPROBES
298-
if (unlikely(iir == PARISC_KPROBES_BREAK_INSN)) {
298+
if (unlikely(iir == PARISC_KPROBES_BREAK_INSN && !user_mode(regs))) {
299299
parisc_kprobe_break_handler(regs);
300300
return;
301301
}
302-
if (unlikely(iir == PARISC_KPROBES_BREAK_INSN2)) {
302+
if (unlikely(iir == PARISC_KPROBES_BREAK_INSN2 && !user_mode(regs))) {
303303
parisc_kprobe_ss_handler(regs);
304304
return;
305305
}

0 commit comments

Comments
 (0)