[PATCH 0/2] arm64/debug: clean up some HW BP edge cases

Ada Couprie Diaz ada.coupriediaz at arm.com
Wed May 27 09:15:51 PDT 2026


Hi,

This is a small series focused on fixing some unsoundess and edge case
related to hardware breakpoints and watchpoints.

It is motivated in part by the recent discussion on the
FEAT_Debugv8p6 series[0][1] regarding unclear guarantees on interruptions.

It doesn't address the issue of instrumentation, as NO_KPROBE is not
sufficient to prevent it (specifically ftrace) and would require a pass
over the whole debug handling code.

The bugs themselves are very much of the self-inflicted
"you should not be doing this" kind and not urgent, but it does solve
some of the questions on the FEAT_Dbugv8p6 series.

Most of the raw additions are comments trying to give more context to
understand `hw_breakpoint_thread_switch()`.

Thanks in advance !
Ada

Based on v7.1-rc5

[0]: https://lore.kernel.org/linux-arm-kernel/20241216040831.2448257-1-anshuman.khandual@arm.com/
[1]: https://lore.kernel.org/linux-arm-kernel/adeE4MD0RgapI8aL@J2N7QTR9R3/

Ada Couprie Diaz (2):
  arm64/debug: update perf slots in sync with BP registers
  arm64/debug: mask exceptions when switching cpu-bound watchpoints

 arch/arm64/kernel/hw_breakpoint.c | 52 +++++++++++++++++++++----------
 1 file changed, 36 insertions(+), 16 deletions(-)


base-commit: e7ae89a0c97ce2b68b0983cd01eda67cf373517d
-- 
2.43.0




More information about the linux-arm-kernel mailing list