Skip to content

tracing/wprobe: Fix to avoid inifinite watchpoint exception on arm64

Masami Hiramatsu (Google) linux-arm-kernel linux-perf-users linux-trace-kernel lkml 1 version In review

Get series with b4
b4 am 176179481538.959775.12326313742393696258.stgit@devnote2

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2perf: Introduce default_overflow_compatible flaginclude/linux/perf_event.h kernel/events/core.c+4 -70 replies
2/2tracing: wprobe: Make wprobe_handler default overflow_handler compatiblekernel/trace/trace_wprobe.c+7 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] tracing/wprobe: Fix to avoid inifinite watchpoint exception on arm64

Hi,

Here are patches which fixes a wprobe bug reported by Mark Brown on arm64[1]. The root cause was that the infinite watchpoint exception on the same instruction, because arm64 watchpoint exception happens before the memory access has done, it needs to configure a single-step after calling overflow handler. It does that only for the default overflow handlers, and not for custom overflow handler registered via hw_breakpoint interface.

[1] https://lore.kernel.org/all/[email protected]/

To fix this issue, this series introduces default_overflow_compatible flag in the perf_event and use it for identifying default overflow handlers instead of checking handler functions everytime[1/2], and set it in wprobe[2/2].

Thank you,

---

Masami Hiramatsu (Google) (2):
perf: Introduce default_overflow_compatible flag
tracing: wprobe: Make wprobe_handler default overflow_handler compatible

 include/linux/perf_event.h  |    9 ++-------
 kernel/events/core.c        |    2 ++
 kernel/trace/trace_wprobe.c |    7 +++++++
 3 files changed, 11 insertions(+), 7 deletions(-)

--
Masami Hiramatsu (Google) <[email protected]>