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 v6.17-rc2
Date: Thu, 21 Aug 2025 08:21:29 +0900	[thread overview]
Message-ID: <20250821082129.f12b601c3263e2fd3324b618@kernel.org> (raw)

Hi Linus,

Probes fixes for v6.17-rc2:

- tracing: fprobe-event: Sanitize wildcard for fprobe event name
  Fprobe event accepts wildcards for the target functions, but
  unless the user specifies its event name, it makes an event with
  the wildcards. Replace the wildcard '*' with the underscore '_'.


Please pull the latest probes-fixes-v6.17-rc2 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-fixes-v6.17-rc2

Tag SHA1: 79f2c8d9a0956a85dadb6c8cd1c972e87777969b
Head SHA1: ec879e1a0be8007aa232ffedcf6a6445dfc1a3d7


Masami Hiramatsu (Google) (1):
      tracing: fprobe-event: Sanitize wildcard for fprobe event name

----
 kernel/trace/trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit ec879e1a0be8007aa232ffedcf6a6445dfc1a3d7
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date:   Sat Aug 16 23:10:51 2025 +0900

    tracing: fprobe-event: Sanitize wildcard for fprobe event name
    
    Fprobe event accepts wildcards for the target functions, but unless user
    specifies its event name, it makes an event with the wildcards.
    
      /sys/kernel/tracing # echo 'f mutex*' >> dynamic_events
      /sys/kernel/tracing # cat dynamic_events
      f:fprobes/mutex*__entry mutex*
      /sys/kernel/tracing # ls events/fprobes/
      enable         filter         mutex*__entry
    
    To fix this, replace the wildcard ('*') with an underscore.
    
    Link: https://lore.kernel.org/all/175535345114.282990.12294108192847938710.stgit@devnote2/
    
    Fixes: 334e5519c375 ("tracing/probes: Add fprobe events for tracing function entry and exit.")
    Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
    Cc: stable@vger.kernel.org

diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 1dbf1d3cf2f1..5a6688832da8 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -2204,7 +2204,7 @@ static inline bool is_good_system_name(const char *name)
 static inline void sanitize_event_name(char *name)
 {
 	while (*name++ != '\0')
-		if (*name == ':' || *name == '.')
+		if (*name == ':' || *name == '.' || *name == '*')
 			*name = '_';
 }
 
-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

             reply	other threads:[~2025-08-20 23:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 23:21 Masami Hiramatsu [this message]
2025-08-20 23:31 ` 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=20250821082129.f12b601c3263e2fd3324b618@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

all inboxes | Powered by JetHome®