]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracing: fprobe-event: Sanitize wildcard for fprobe event name
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Sat, 16 Aug 2025 14:10:51 +0000 (23:10 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:34 +0000 (16:28 +0200)
commitd0570a5b9ccc43fffd37d5b1153bf6158a58d1e6
tree5c598b6e3815193d0ccda98608fbf0bc97166ad3
parentd9e157fcfebc126cd19b2333a6417a840c24e529
tracing: fprobe-event: Sanitize wildcard for fprobe event name

commit ec879e1a0be8007aa232ffedcf6a6445dfc1a3d7 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace.h