Skip to content

ARM64: More flexible HW watchpoint

Pratyush Anand linux-arm-kernel lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 0 repliesNew
  2. v25 patches 5 repliesSuperseded
  3. v14 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- used __ffs() instead of ffs() - 1. Similarly for fls().
- fixed ptrace_hbp_get_addr() to report correct address to user space
- handling stepping for inexact watchpoint as well now.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5hw_breakpoint: Allow watchpoint of length 3,5,6 and 7include/uapi/linux/hw_breakpoint.h tools/include/uapi/linux/hw_breakpoint.h+8 -00 replies
2/5arm64: Allow hw watchpoint at varied offset from base addressarch/arm64/include/asm/hw_breakpoint.h arch/arm64/kernel/hw_breakpoint.c arch/arm64/kernel/ptrace.c+28 -280 replies
3/5arm64: hw_breakpoint: Handle inexact watchpoint addressesarch/arm64/kernel/hw_breakpoint.c+69 -270 replies
4/5arm64: Allow hw watchpoint of length 3,5,6 and 7arch/arm64/include/asm/hw_breakpoint.h arch/arm64/kernel/hw_breakpoint.c+40 -00 replies
5/5selftests: arm64: add test for unaligned/inexact watchpoint handlingtools/testing/selftests/breakpoints/Makefile tools/testing/selftests/breakpoints/breakpoint_test_arm64.c+240 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH V3 0/5] ARM64: More flexible HW watchpoint

Currently, we do not support all the byte select option provided by ARM64 specs for a HW watchpoint.

This patch set will help user to instrument a watchpoint with all possible byte select options.

Changes since v2:
- used __ffs() instead of ffs() - 1. Similarly for fls().
- fixed ptrace_hbp_get_addr() to report correct address to user space
- handling stepping for inexact watchpoint as well now.

Changes since v1:
- Introduced a new patch 3/5 where it takes care of the situation when HW does not report a watchpoint hit with the address that matches one of the watchpoints set.
- Added corresponding test case to test that functionality.

Pavel Labath (1):
arm64: hw_breakpoint: Handle inexact watchpoint addresses

Pratyush Anand (4):
hw_breakpoint: Allow watchpoint of length 3,5,6 and 7
arm64: Allow hw watchpoint at varied offset from base address
arm64: Allow hw watchpoint of length 3,5,6 and 7
selftests: arm64: add test for unaligned/inexact watchpoint handling

 arch/arm64/include/asm/hw_breakpoint.h             |   6 +-
 arch/arm64/kernel/hw_breakpoint.c                  | 153 +++++++++----
 arch/arm64/kernel/ptrace.c                         |   7 +-
 include/uapi/linux/hw_breakpoint.h                 |   4 +
 tools/include/uapi/linux/hw_breakpoint.h           |   4 +
 tools/testing/selftests/breakpoints/Makefile       |   5 +-
 .../selftests/breakpoints/breakpoint_test_arm64.c  | 236 +++++++++++++++++++++
 7 files changed, 372 insertions(+), 43 deletions(-)
 create mode 100644 tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
Signature · 1 line
2.7.4