linux_dsm_epyc7002/kernel/trace
Steven Rostedt (VMware) 1f9b3546cf tracing: Have traceprobe_probes_write() not access userspace unnecessarily
The code in traceprobe_probes_write() reads up to 4096 bytes from userpace
for each line. If userspace passes in several lines to execute, the code
will do a large read for each line, even though, it is highly likely that
the first read from userspace received all of the lines at once.

I changed the logic to do a single read from userspace, and to only read
from userspace again if not all of the read from userspace made it in.

I tested this by adding printk()s and writing files that would test -1, ==,
and +1 the buffer size, to make sure that there's no overflows and that if a
single line is written with +1 the buffer size, that it fails properly.

Link: http://lkml.kernel.org/r/20170209180458.5c829ab2@gandalf.local.home

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2017-02-15 09:00:55 -05:00
..
blktrace.c
bpf_trace.c
ftrace.c ftrace: Have set_graph_function handle multiple functions in one write 2017-02-03 10:59:52 -05:00
Kconfig
Makefile
power-traces.c
ring_buffer_benchmark.c
ring_buffer.c This release has a few updates: 2016-12-15 13:49:34 -08:00
rpm-traces.c
trace_benchmark.c tracing: Allow benchmark to be enabled at early_initcall() 2016-12-09 09:16:15 -05:00
trace_benchmark.h tracing: Have the reg function allow to fail 2016-12-09 09:13:30 -05:00
trace_branch.c tracing: Add the constant count for branch tracer 2017-01-19 08:57:41 -05:00
trace_clock.c
trace_entries.h tracing: Add the constant count for branch tracer 2017-01-19 08:57:41 -05:00
trace_event_perf.c
trace_events_filter_test.h
trace_events_filter.c tracing/filter: Define op as the enum that it is 2016-11-14 16:42:59 -05:00
trace_events_hist.c
trace_events_trigger.c
trace_events.c tracing: Have system enable return error if one of the events fail 2016-12-09 09:15:41 -05:00
trace_export.c
trace_functions_graph.c tracing/fgraph: Have wakeup and irqsoff tracers ignore graph functions too 2016-12-09 09:21:35 -05:00
trace_functions.c
trace_hwlat.c tracing: Make __buffer_unlock_commit() always_inline 2016-11-23 20:30:51 -05:00
trace_irqsoff.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
trace_kdb.c
trace_kprobe.c kprobes/trace: Fix kprobe selftest for newer gcc 2016-12-12 21:21:43 -05:00
trace_mmiotrace.c
trace_nop.c
trace_output.c tracing: Add new trace_marker_raw 2016-11-15 15:13:59 -05:00
trace_output.h
trace_printk.c
trace_probe.c tracing: Have traceprobe_probes_write() not access userspace unnecessarily 2017-02-15 09:00:55 -05:00
trace_probe.h
trace_sched_switch.c
trace_sched_wakeup.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
trace_selftest_dynamic.c
trace_selftest.c
trace_seq.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_syscalls.c
trace_uprobe.c uprobe: Find last occurrence of ':' when parsing uprobe PATH:OFFSET 2017-01-17 12:57:47 -05:00
trace.c tracing: Reset parser->buffer to allow multiple "puts" 2017-02-03 10:59:31 -05:00
trace.h tracing: Have COMM event filter key be treated as a string 2017-02-10 14:19:45 -05:00
tracing_map.c
tracing_map.h