diff options
| author | Tomislav Novak <[email protected]> | 2023-06-20 17:54:11 +0000 |
|---|---|---|
| committer | Russell King (Oracle) <[email protected]> | 2023-08-14 11:16:58 +0000 |
| commit | e6b51532d5273eeefba84106daea3d392c602837 (patch) | |
| tree | d2ebbb9dbaa8e2afb41620cc03f9324d57b79aec /tools/perf/scripts/python/sctop.py | |
| parent | Linux 6.5-rc1 (diff) | |
| download | kernel-e6b51532d5273eeefba84106daea3d392c602837.tar.gz kernel-e6b51532d5273eeefba84106daea3d392c602837.zip | |
ARM: 9316/1: hw_breakpoint: fix single-stepping when using bpf_overflow_handler
Arm platforms use is_default_overflow_handler() to determine if the
hw_breakpoint code should single-step over the breakpoint trigger or
let the custom handler deal with it.
Since bpf_overflow_handler() currently isn't recognized as a default
handler, attaching a BPF program to a PERF_TYPE_BREAKPOINT event causes
it to keep firing (the instruction triggering the data abort exception
is never skipped). For example:
# bpftrace -e 'watchpoint:0x10000:4:w { print("hit") }' -c ./test
Attaching 1 probe...
hit
hit
[...]
^C
(./test performs a single 4-byte store to 0x10000)
This patch replaces the check with uses_default_overflow_handler(),
which accounts for the bpf_overflow_handler() case by also testing
if one of the perf_event_output functions gets invoked indirectly,
via orig_default_handler.
Link: https://lore.kernel.org/linux-arm-kernel/[email protected]/
Signed-off-by: Tomislav Novak <[email protected]>
Tested-by: Samuel Gosselin <[email protected]> # arm64
Reviewed-by: Catalin Marinas <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Russell King (Oracle) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions
