Skip to content

Commit ec879e1

Browse files
committed
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: 334e551 ("tracing/probes: Add fprobe events for tracing function entry and exit.") Signed-off-by: Masami Hiramatsu (Google) <[email protected]> Cc: [email protected]
1 parent c17b750 commit ec879e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,7 @@ static inline bool is_good_system_name(const char *name)
22042204
static inline void sanitize_event_name(char *name)
22052205
{
22062206
while (*name++ != '\0')
2207-
if (*name == ':' || *name == '.')
2207+
if (*name == ':' || *name == '.' || *name == '*')
22082208
*name = '_';
22092209
}
22102210

0 commit comments

Comments
 (0)