Skip to content

tracing: fprobe-events: Register fprobe only when the event is enabled

Masami Hiramatsu (Google) linux-trace-kernel lkml 2 versions In review

Get series with b4
b4 am 174343532655.843280.15317319860632975273.stgit@devnote2

Versions newest first · linked by author and title

  1. v2 Latest7 patches 2 repliesIn review
  2. v11 patch 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7tracing: fprobe events: Fix possible UAF on moduleskernel/trace/trace_fprobe.c+17 -91 reply
2/7tracing: fprobe: Cleanup fprobe hash when module unloadingkernel/trace/fprobe.c+101 -21 reply
3/7tracing: tprobe-events: Remove mod field from tprobe-eventkernel/trace/trace_fprobe.c+9 -140 replies
4/7tracing: tprobe-events: Support multiple tprobes on the same tracepointinclude/linux/module.h kernel/trace/trace_fprobe.c+205 -500 replies
5/7tracing: fprobe-events: Register fprobe-events only when it is enabledinclude/linux/fprobe.h kernel/trace/fprobe.c kernel/trace/trace_fprobe.c+126 -1210 replies
6/7selftests: tracing: Enable fprobe events before checking enable_functionstools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc+19 -110 replies
7/7tracing: tprobe-events: Register tracepoint when enable tprobe eventkernel/trace/trace_fprobe.c+217 -1650 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/7] tracing: fprobe-events: Register fprobe only when the event is enabled

Hi,
Here is the 2nd version of the series to register fprobe only when the fprobe event is enabled. The previous version is here;

https://lore.kernel.org/all/174212767109.348872.18231451508464729427.stgit@devnote2/

In this version, I added fixes([1/7] and [2/7]) related to module unloading ([1/7] should be handled separatedly) and updates according to the previous thread.

Steve suggested the fprobe-events are always registered when it is defined, even if it is disabled and that makes system overhead. This series registeres the fprobes only when the event is enabled.

Thank you,

---

Masami Hiramatsu (Google) (7):
tracing: fprobe events: Fix possible UAF on modules
tracing: fprobe: Cleanup fprobe hash when module unloading
tracing: tprobe-events: Remove mod field from tprobe-event
tracing: tprobe-events: Support multiple tprobes on the same tracepoint
tracing: fprobe-events: Register fprobe-events only when it is enabled
selftests: tracing: Enable fprobe events before checking enable_functions
tracing: tprobe-events: Register tracepoint when enable tprobe event

 include/linux/fprobe.h                             |    5 
 include/linux/module.h                             |    4 
 kernel/trace/fprobe.c                              |  108 ++++
 kernel/trace/trace_fprobe.c                        |  593 +++++++++++++-------
 .../ftrace/test.d/dynevent/add_remove_fprobe.tc    |   30 +
 5 files changed, 531 insertions(+), 209 deletions(-)

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