Hi all,
Our debug exception handling code is a bit of a horror show. Userspace
can trigger kprobe logic to run (which ends up just returning back to
the brk instruction instead of delivering a SIGTRAP) and can also enter
KGDB if it is enabled (which causes a kernel panic due to a NULL
dereference).
These patch fix those problems and tidy up the code so that they're less
likely to happen again in future.
Will
--->8
Will Deacon (10):
arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug
signals
arm64: debug: Ensure debug handlers check triggering exception level
arm64: debug: Remove unused return value from do_debug_exception()
arm64: debug: Rename addr parameter for non-watchpoint exception hooks
arm64: debug: Remove meaningless comment
arm64: debug: Separate debug hooks based on target exception level
arm64: kprobes: Avoid calling kprobes debug handlers explicitly
arm64: debug: Remove redundant user_mode(regs) checks from debug
handlers
arm64: probes: Move magic BRK values into brk-imm.h
arm64: debug: Clean up brk_handler()
arch/arm64/include/asm/brk-imm.h | 4 ++
arch/arm64/include/asm/debug-monitors.h | 24 +++----
arch/arm64/include/asm/esr.h | 4 +-
arch/arm64/include/asm/kprobes.h | 2 -
arch/arm64/kernel/debug-monitors.c | 111 ++++++++++++++++++--------------
arch/arm64/kernel/kgdb.c | 28 ++++----
arch/arm64/kernel/probes/kprobes.c | 16 ++++-
arch/arm64/kernel/probes/uprobes.c | 19 ++----
arch/arm64/kernel/traps.c | 21 ++----
arch/arm64/mm/fault.c | 19 ++----
10 files changed, 127 insertions(+), 121 deletions(-)
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel