Steven Rostedt (VMware)
7b65865627
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/20180127031706.GE13338@ZenIV.linux.org.uk
Cc: stable@vger.kernel.org
Fixes: 3ba0092971 ("ftrace: Introduce ftrace_glob structure")
Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-02-08 10:11:11 -05:00
..
blktrace.c
blktrace: fix trace mutex deadlock
2017-11-27 12:03:58 -07:00
bpf_trace.c
bpf: fix corruption on concurrent perf_event_output calls
2017-12-12 09:51:12 -08:00
ftrace.c
ftrace: Remove incorrect setting of glob search field
2018-02-08 10:11:11 -05:00
Kconfig
tracing: Prevent PROFILE_ALL_BRANCHES when FORTIFY_SOURCE=y
2018-01-15 14:15:31 -05:00
Makefile
Tracing updates for 4.15:
2017-11-17 14:58:01 -08:00
power-traces.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
ring_buffer.c
ring-buffer: Fix duplicate results in mapping context to bits in recursive lock
2018-01-18 15:45:48 -05:00
ring_buffer_benchmark.c
ring-buffer: Have ring_buffer_alloc_read_page() return error on offline CPU
2017-08-02 14:23:02 -04:00
rpm-traces.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace.c
tracing: Make sure the parsed string always terminates with '\0'
2018-01-23 15:57:28 -05:00
trace.h
Tracing updates for 4.15:
2017-11-17 14:58:01 -08:00
trace_benchmark.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_benchmark.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_branch.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_clock.c
trace_entries.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_event_perf.c
perf/ftrace: Small cleanup
2017-10-16 18:13:28 -04:00
trace_events.c
tracing: Make sure the parsed string always terminates with '\0'
2018-01-23 15:57:28 -05:00
trace_events_filter.c
mm: treewide: remove GFP_TEMPORARY allocation flag
2017-09-13 18:53:16 -07:00
trace_events_filter_test.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_events_hist.c
tracing: Reimplement log2
2017-10-04 13:10:39 -04:00
trace_events_trigger.c
tracing: Update stack trace skipping for ORC unwinder
2018-01-23 15:57:00 -05:00
trace_export.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_functions.c
tracing: Update stack trace skipping for ORC unwinder
2018-01-23 15:57:00 -05:00
trace_functions_graph.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_hwlat.c
trace_irqsoff.c
tracing: Add support for preempt and irq enable/disable events
2017-10-10 18:58:43 -04:00
trace_kdb.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_kprobe.c
Tracing updates for 4.15:
2017-11-17 14:58:01 -08:00
trace_mmiotrace.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_nop.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_output.c
sched/debug: Rename task-state printing helpers
2017-10-10 11:43:29 +02:00
trace_output.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_printk.c
trace_probe.c
tracing: Make traceprobe parsing code reusable
2017-10-04 13:06:44 -04:00
trace_probe.h
bpf: Revert bpf_overrid_function() helper changes.
2017-11-11 18:24:55 +09:00
trace_sched_switch.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_sched_wakeup.c
Merge branch 'linus' into sched/core, to pick up fixes
2017-11-08 10:17:15 +01:00
trace_selftest.c
Tracing updates for 4.15:
2017-11-17 14:58:01 -08:00
trace_selftest_dynamic.c
ftrace: Mark function tracer test functions noinline/noclone
2018-01-23 15:57:29 -05:00
trace_seq.c
trace_stack.c
tracing: Have stack trace not record if RCU is not watching
2017-12-14 20:48:22 -05:00
trace_stat.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_stat.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
trace_syscalls.c
Tracing updates for 4.15:
2017-11-17 14:58:01 -08:00
trace_uprobe.c
trace_uprobe: Display correct offset in uprobe_events
2018-01-23 15:57:29 -05:00
tracing_map.c
tracing: Remove lookups from tracing_map hitcount
2017-10-04 13:05:42 -04:00
tracing_map.h
Tracing updates for 4.15:
2017-11-17 14:58:01 -08:00