public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 0/8] tracing/fprobe: Fix fprobe_ip_table related bugs
@ 2026-04-17 16:17 Masami Hiramatsu (Google)
  2026-04-17 16:17 ` [PATCH v9 1/8] tracing/fprobe: Reject registration of a registered fprobe before init Masami Hiramatsu (Google)
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Masami Hiramatsu (Google) @ 2026-04-17 16:17 UTC (permalink / raw)
  To: Steven Rostedt, Masami Hiramatsu
  Cc: Menglong Dong, Mathieu Desnoyers, jiang.biao, linux-kernel,
	linux-trace-kernel

Hi,

Here is the 9th version of fprobe bugfix series.
The previous version is here.

https://lore.kernel.org/all/177633460058.3479617.11868368413034643565.stgit@mhiramat.tok.corp.google.com/

This version ensures the ftrace_ops filter is cleared when unregistering
an fprobe, even if memory allocation fails during the unregistration
process[2/8] and fixed module unloading issues by removing
fprobe_graph_active and fprobe_ftrace_active to handle cases where
fprobes are removed after a module is unloaded[6/8], and update
selftests/ftrace to updated the module test to use "trace-events-sample"
instead of "trace_events_sample", added checks for module unloading and
removed the core-kernel event case, and ensures the test module exists
when unloading it in the EXIT handler.[7/8]
(Also, this rebased on probes-v7.1)

There seems RCU sync issue repeatedly reported but it is in fprobe API
level issue. Unlike kprobes, fprobe users should use kfree_rcu() or
call synchronize_rcu() explicitly by themselves, because it will
use some common resource in its handler. Tracing subsystem does that.

Thank you!

Masami Hiramatsu (Google) (8):
      tracing/fprobe: Reject registration of a registered fprobe before init
      tracing/fprobe: Unregister fprobe even if memory allocation fails
      tracing/fprobe: Remove fprobe from hash in failure path
      tracing/fprobe: Avoid kcalloc() in rcu_read_lock section
      tracing/fprobe: Check the same type fprobe on table as the unregistered one
      tracing/fprobe: Fix to unregister ftrace_ops if it is empty on module unloading
      selftests/ftrace: Add a testcase for fprobe events on module
      selftests/ftrace: Add a testcase for multiple fprobe events


 kernel/trace/fprobe.c                              |  469 +++++++++++++-------
 .../test.d/dynevent/add_remove_fprobe_module.tc    |   87 ++++
 .../test.d/dynevent/add_remove_multiple_fprobe.tc  |   69 +++
 3 files changed, 464 insertions(+), 161 deletions(-)
 create mode 100644 tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe_module.tc
 create mode 100644 tools/testing/selftests/ftrace/test.d/dynevent/add_remove_multiple_fprobe.tc


base-commit: e0a384434ae1bdfb03954c46c464e3dbd3223ad6
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-04-20  1:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-17 16:17 [PATCH v9 0/8] tracing/fprobe: Fix fprobe_ip_table related bugs Masami Hiramatsu (Google)
2026-04-17 16:17 ` [PATCH v9 1/8] tracing/fprobe: Reject registration of a registered fprobe before init Masami Hiramatsu (Google)
2026-04-17 16:18 ` [PATCH v9 2/8] tracing/fprobe: Unregister fprobe even if memory allocation fails Masami Hiramatsu (Google)
2026-04-17 16:18 ` [PATCH v9 3/8] tracing/fprobe: Remove fprobe from hash in failure path Masami Hiramatsu (Google)
2026-04-17 16:18 ` [PATCH v9 4/8] tracing/fprobe: Avoid kcalloc() in rcu_read_lock section Masami Hiramatsu (Google)
2026-04-17 16:18 ` [PATCH v9 5/8] tracing/fprobe: Check the same type fprobe on table as the unregistered one Masami Hiramatsu (Google)
2026-04-17 16:18 ` [PATCH v9 6/8] tracing/fprobe: Fix to unregister ftrace_ops if it is empty on module unloading Masami Hiramatsu (Google)
2026-04-17 16:18 ` [PATCH v9 7/8] selftests/ftrace: Add a testcase for fprobe events on module Masami Hiramatsu (Google)
2026-04-20  1:42   ` Masami Hiramatsu
2026-04-17 16:18 ` [PATCH v9 8/8] selftests/ftrace: Add a testcase for multiple fprobe events Masami Hiramatsu (Google)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox