ARM: 8124/1: don't enter kgdb when userspace executes a kgdb break instruction
authorOmar Sandoval <[email protected]>
Fri, 1 Aug 2014 17:14:06 +0000 (18:14 +0100)
committerRussell King <[email protected]>
Sat, 2 Aug 2014 14:20:30 +0000 (15:20 +0100)
commit6bf755db4d5e7ccea61fb17727a183b9bd8945b1
tree74ca99a04770e5ff8598bbf63e30a1d9025dc338
parentc5cc87fa8ddf971682fc5dd112e2dfacb11f30cd
ARM: 8124/1: don't enter kgdb when userspace executes a kgdb break instruction

The kgdb breakpoint hooks (kgdb_brk_fn and kgdb_compiled_brk_fn)
should only be entered when a kgdb break instruction is executed
from the kernel. Otherwise, if kgdb is enabled, a userspace program
can cause the kernel to drop into the debugger by executing either
KGDB_BREAKINST or KGDB_COMPILED_BREAK.

Acked-by: Will Deacon <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: Russell King <[email protected]>
arch/arm/kernel/kgdb.c