[GIT PULL] probes: Fixes for v6.17-rc2

Masami Hiramatsu (Google) posted 1 patch 1 month, 2 weeks ago
kernel/trace/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[GIT PULL] probes: Fixes for v6.17-rc2
Posted by Masami Hiramatsu (Google) 1 month, 2 weeks ago
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>
Re: [GIT PULL] probes: Fixes for v6.17-rc2
Posted by pr-tracker-bot@kernel.org 1 month, 2 weeks ago
The pull request you sent on Thu, 21 Aug 2025 08:21:29 +0900:

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

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/068a56e56fa81e42fc5f08dff34fab149bb60a09

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html