arm64: debug: remove hook registration, split exception entry
JIRA: https://issues.redhat.com/browse/RHEL-65658
CONFLICTS:
Minor context conflicts as RHEL-9 does not have the following commits:
25b84002afb9 ("arm64: Support Clang UBSAN trap codes for better reporting")
d683a8561889 ("ubsan: Remove regs from report_ubsan_failure()")
8ce71d270536 ("arm64/traps: Handle GCS exceptions")
13840229d6bd ("arm64: mops: Handle MOPS exceptions from EL1")
398edaa12f9c ("arm64/fpsimd: Do not discard modified SVE state")
This series simplifies the debug exception entry path by removing handler
registration mechanisms for the debug exception handlers, a holdover from
the arm kernel, as well as the break and stepping handlers.
This moves much of the code related to debug exceptions outside of
mm/fault.c where it didn't make much sense.
This allows us to split the debug exception entries: going from one common
path per EL for all debug exceptions to a unique one per exception and EL.
The result is a much simpler and fully static exception entry path, which
we tailor to the different exceptions and their constraints.
...
Original cover letter and testing procedure can be found here:
arm64: debug: remove hook registration, split exception entry (v6)
https://lore.kernel.org/linux-arm-kernel/20250707114109.35672-1-ada.coupriediaz@arm.com/
These are the upstream commits backported for this MR:
ad8b22648b7d arm64: debug: clean up single_step_handler logic
b1e2d95524e4 arm64: refactor aarch32_break_handler()
9a0e3b92b02e arm64: Return early when break handler is found on linked-list
3b84efc066f8 arm64: kprobes: Return DBG_HOOK_ERROR if kprobes can not handle a BRK
253751233b19 arm64: kretprobes: acquire the regs via a BRK exception
6adfdc5e2ef9 arm64: debug: call software breakpoint handlers statically
403b48aad5b3 arm64: debug: call step handlers statically
d4e0b1262094 arm64: debug: remove break/step handler registration infrastructure
eaff68b32861 arm64: entry: Add entry and exit functions for debug exceptions
43e2ae77fcab arm64: debug: split hardware breakpoint exception entry
80691d35523d arm64: debug: refactor reinstall_suspended_bps()
0ac7584c08ce arm64: debug: split single stepping exception entry
413f0bba005d arm64: debug: split hardware watchpoint exception entry
31575e11ecf7 arm64: debug: split brk64 exception entry
fc5e5d0477c5 arm64: debug: split bkpt32 exception entry
8b097881b54c trap: cleanup trap_init()
a8b8cce9d96d arm64: debug: remove debug exception registration infrastructure
Special note goes for commits 9a0e3b92b02e, 3b84efc066f8, 253751233b19 and
8b097881b54c that were added to fix minor context conflicts. Also, commit
Signed-off-by: Luis Claudio R. Goncalves lgoncalv@redhat.com