aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <[email protected]>2018-02-06 03:18:11 +0000
committerSteven Rostedt (VMware) <[email protected]>2018-02-08 15:11:47 +0000
commit07234021410bbc27b7c86c18de98616c29fbe667 (patch)
treee9e4e58e5a3ec3b8ab8b35811f1a2935795828bf /scripts/gcc-plugins/randomize_layout_plugin.c
parentftrace: Remove incorrect setting of glob search field (diff)
downloadkernel-07234021410bbc27b7c86c18de98616c29fbe667.tar.gz
kernel-07234021410bbc27b7c86c18de98616c29fbe667.zip
tracing: Fix parsing of globs with a wildcard at the beginning
Al Viro reported: For substring - sure, but what about something like "*a*b" and "a*b"? AFAICS, filter_parse_regex() ends up with identical results in both cases - MATCH_GLOB and *search = "a*b". And no way for the caller to tell one from another. Testing this with the following: # cd /sys/kernel/tracing # echo '*raw*lock' > set_ftrace_filter bash: echo: write error: Invalid argument With this patch: # echo '*raw*lock' > set_ftrace_filter # cat set_ftrace_filter _raw_read_trylock _raw_write_trylock _raw_read_unlock _raw_spin_unlock _raw_write_unlock _raw_spin_trylock _raw_spin_lock _raw_write_lock _raw_read_lock Al recommended not setting the search buffer to skip the first '*' unless we know we are not using MATCH_GLOB. This implements his suggested logic. Link: http://lkml.kernel.org/r/[email protected] Cc: [email protected] Fixes: 60f1d5e3bac44 ("ftrace: Support full glob matching") Reviewed-by: Masami Hiramatsu <[email protected]> Reported-by: Al Viro <[email protected]> Suggsted-by: Al Viro <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions