linux/arch/arm64/kernel/probes
Ada Couprie Diaz 403b48aad5 arm64: debug: call step handlers statically
Software stepping checks for the correct handler by iterating over a list
of dynamically registered handlers and calling all of them until one
handles the exception.

This is the only generic way to handle software stepping handlers in arm64
as the exception does not provide an immediate that could be checked,
contrary to software breakpoints.

However, the registration mechanism is not exported and has only
two current users : the KGDB stepping handler, and the uprobe single step
handler.
Given that one comes from user mode and the other from kernel mode, call
the appropriate one by checking the source EL of the exception.
Add a stand-in that returns DBG_HOOK_ERROR when the configuration
options are not enabled.

Remove `arch_init_uprobes()` as it is not useful anymore and is
specific to arm64.

Unify the naming of the handler to XXX_single_step_handler(), making it
clear they are related.

Signed-off-by: Ada Couprie Diaz <ada.coupriediaz@arm.com>
Tested-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Reviewed-by: Will Deacon <will@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20250707114109.35672-5-ada.coupriediaz@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2025-07-08 13:27:41 +01:00
..
decode-insn.c Merge branch 'for-next/mops' into for-next/core 2024-11-14 12:07:28 +00:00
decode-insn.h arm64: probes: Remove probe_opcode_t 2024-10-15 18:16:20 +01:00
kprobes.c arm64: debug: call software breakpoint handlers statically 2025-07-08 13:27:41 +01:00
kprobes_trampoline.S arm64: debug: call software breakpoint handlers statically 2025-07-08 13:27:41 +01:00
Makefile
simulate-insn.c arm64: insn: Simulate nop instruction for better uprobe performance 2024-10-15 19:43:26 +01:00
simulate-insn.h arm64: insn: Simulate nop instruction for better uprobe performance 2024-10-15 19:43:26 +01:00
uprobes.c arm64: debug: call step handlers statically 2025-07-08 13:27:41 +01:00