mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu (Google) <mhiramat@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [GIT PULL] probes: Fixes for v7.1
Date: Wed, 22 Apr 2026 09:54:18 +0900	[thread overview]
Message-ID: <20260422095418.4674fe1a3b1bd5fcc7186f67@kernel.org> (raw)

Hi Linus,

Probes fixes for v7.1

- fprobe: Fixed several bugs, which includes followings:
  . Prevention of re-registration: Added an earlier check to reject
   re-registering an already active fprobe before its state is modified
   during the initialization phase.
  . Robustness in failure paths:
   - Ensured fprobes are correctly removed from all internal tables and
    properly RCU-freed during registration failure.
   - Modified unregister_fprobe() to proceed with unregistration even if
    temporary memory allocation fails.
  . RCU safety in module unloading: Avoided a potential "sleep in RCU"
   warning by removing a kcalloc() call in the module notifier path. This
   also tries to remove fprobe_hash_node even if memory allocation fails.
  . Type-aware unregistration: Fixed a bug where unregistering an fprobe
   did not account for different types (entry-only vs. entry-exit) at the
   same address, which previously left "junk" entries in the underlying
   ftrace/fgraph ops.
  . Unregistration of empty ftrace_ops: Avoided unneeded performance
   overhead because of making registered ftrace_ops empty (means trace
   all functions.) This counts remaining entries and unregister ftrace_ops
   when it becomes empty.

 - ftracetest: In addition to the fix, two new selftests to check above
   fixes, are included:
   . Module Unloading Test: Specifically verifies that fprobe events on
    a module are correctly cleaned up and do not trigger "trace-all"
    behavior when the module is removed.
   . Multiple Fprobe Events Test: Ensures that having multiple fprobes on
    the same function correctly manages the ftrace hash map during
    removal.


Please pull the latest probes-v7.1-2 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-v7.1-2

Tag SHA1: 02ae3fda580c7421659230990bd1520a908f9808
Head SHA1: 453553e1ed53ca364454e155ba33e110d02c75cd


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                              | 472 ++++++++++++++-------
 .../test.d/dynevent/add_remove_fprobe_module.tc    |  87 ++++
 .../test.d/dynevent/add_remove_multiple_fprobe.tc  |  69 +++
 3 files changed, 466 insertions(+), 162 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
---------------------------

-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

             reply	other threads:[~2026-04-22  0:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22  0:54 Masami Hiramatsu [this message]
2026-04-22 20:38 ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260422095418.4674fe1a3b1bd5fcc7186f67@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome