mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
parisc: Handle kgdb breakpoints only in kernel context
commit 6888ff04e3 upstream.
The kernel kgdb break instructions should only be handled when running
in kernel context.
Cc: <stable@vger.kernel.org> # v5.4+
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
89eba5586a
commit
de0d7dd5ef
@@ -305,8 +305,8 @@ static void handle_break(struct pt_regs *regs)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_KGDB
|
#ifdef CONFIG_KGDB
|
||||||
if (unlikely(iir == PARISC_KGDB_COMPILED_BREAK_INSN ||
|
if (unlikely((iir == PARISC_KGDB_COMPILED_BREAK_INSN ||
|
||||||
iir == PARISC_KGDB_BREAK_INSN)) {
|
iir == PARISC_KGDB_BREAK_INSN)) && !user_mode(regs)) {
|
||||||
kgdb_handle_exception(9, SIGTRAP, 0, regs);
|
kgdb_handle_exception(9, SIGTRAP, 0, regs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user