aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <[email protected]>2018-02-06 03:05:31 +0000
committerSteven Rostedt (VMware) <[email protected]>2018-02-08 15:11:11 +0000
commit7b6586562708d2b3a04fe49f217ddbadbbbb0546 (patch)
treef0b26afa50ad73d1daa8dc00268b77c0ee033c60 /scripts/gcc-plugins/randomize_layout_plugin.c
parentvsprintf: Do not have bprintf dereference pointers (diff)
downloadkernel-7b6586562708d2b3a04fe49f217ddbadbbbb0546.tar.gz
kernel-7b6586562708d2b3a04fe49f217ddbadbbbb0546.zip
ftrace: Remove incorrect setting of glob search field
__unregister_ftrace_function_probe() will incorrectly parse the glob filter because it resets the search variable that was setup by filter_parse_regex(). Al Viro reported this: After that call of filter_parse_regex() we could have func_g.search not equal to glob only if glob started with '!' or '*'. In the former case we would've buggered off with -EINVAL (not = 1). In the latter we would've set func_g.search equal to glob + 1, calculated the length of that thing in func_g.len and proceeded to reset func_g.search back to glob. Suppose the glob is e.g. *foo*. We end up with func_g.type = MATCH_MIDDLE_ONLY; func_g.len = 3; func_g.search = "*foo"; Feeding that to ftrace_match_record() will not do anything sane - we will be looking for names containing "*foo" (->len is ignored for that one). Link: http://lkml.kernel.org/r/[email protected] Cc: [email protected] Fixes: 3ba009297149f ("ftrace: Introduce ftrace_glob structure") Reviewed-by: Dmitry Safonov <[email protected]> Reviewed-by: Masami Hiramatsu <[email protected]> Reported-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