android_kernel_oneplus_msm8998/kernel/trace
Masami Hiramatsu 79eb32ec31 tracing: probeevent: Fix to support minus offset from symbol
commit c5d343b6b7badd1f5fe0873eff2e8d63a193e732 upstream.

In Documentation/trace/kprobetrace.txt, it says

 @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol)

However, the parser doesn't parse minus offset correctly, since
commit 2fba0c8867 ("tracing/kprobes: Fix probe offset to be
unsigned") drops minus ("-") offset support for kprobe probe
address usage.

This fixes the traceprobe_split_symbol_offset() to parse minus
offset again with checking the offset range, and add a minus
offset check in kprobe probe address usage.

Link: http://lkml.kernel.org/r/152129028983.31874.13419301530285775521.stgit@devbox

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Fixes: 2fba0c8867 ("tracing/kprobes: Fix probe offset to be unsigned")
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-28 18:40:15 +02:00
..
blktrace.c blktrace: fix unlocked registration of tracepoints 2018-02-25 11:03:35 +01:00
bpf_trace.c bpf: make tracing helpers gpl only 2015-10-26 21:53:34 -07:00
ftrace.c ftrace: Remove incorrect setting of glob search field 2018-02-16 20:09:47 +01:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-11-10 18:11:41 -08:00
Makefile Makefile: Mute warning for __builtin_return_address(>0) for tracing only 2016-09-30 10:18:35 +02:00
power-traces.c PM / sleep: export suspend_resume trace event 2015-01-30 02:10:41 +01:00
ring_buffer.c ring-buffer: Mask out the info bits when returning buffer page length 2018-01-02 20:33:22 +01:00
ring_buffer_benchmark.c ring_buffer: Remove unneeded smp_wmb() before wakeup of reader benchmark 2015-11-03 16:19:02 -05:00
rpm-traces.c
trace.c tracing: Fix crash when it fails to alloc ring buffer 2018-01-02 20:33:22 +01:00
trace.h tracing: Remove unused ftrace_cpu_disabled per cpu variable 2015-11-07 13:25:14 -05:00
trace_benchmark.c tracing: Only benchmark the time tracepoints take if tracing is on 2015-11-02 13:34:58 -05:00
trace_benchmark.h tracing: Add tracepoint benchmark tracepoint 2014-05-29 22:49:54 -04:00
trace_branch.c tracing: Remove {start,stop}_branch_trace 2015-10-21 10:10:09 -04:00
trace_clock.c tracing: Export tracing clock functions 2015-05-12 15:56:57 -04:00
trace_entries.h tracing: %pF is only for function pointers 2015-03-25 08:57:22 -04:00
trace_event_perf.c treewide: Remove old email address 2015-11-23 09:44:58 +01:00
trace_events.c tracing: Fix converting enum's from the map in trace_event_eval_update() 2018-01-23 19:50:16 +01:00
trace_events_filter.c tracing: Fix freeing of filter in create_filter() when set_str is false 2017-08-30 10:19:24 +02:00
trace_events_filter_test.h
trace_events_trigger.c tracing: Rename ftrace_raw_##call event structures to trace_event_raw_##call 2015-05-13 21:48:40 -04:00
trace_export.c tracing: ftrace_event_is_function() can return boolean 2015-11-02 14:28:05 -05:00
trace_functions.c tracing/trivial: Fix typos and make an int into a bool 2014-11-20 10:05:36 -05:00
trace_functions_graph.c fgraph: Handle a case where a tracer ignores set_graph_notrace 2017-01-09 08:07:50 +01:00
trace_irqsoff.c tracing: Have preempt(irqs)off trace preempt disabled functions 2016-04-12 09:08:59 -07:00
trace_kdb.c tracing: Move trace_flags from global to a trace_array field 2015-09-30 15:22:55 -04:00
trace_kprobe.c tracing: probeevent: Fix to support minus offset from symbol 2018-03-28 18:40:15 +02:00
trace_mmiotrace.c tracing: Pass trace_array into trace_buffer_unlock_commit() 2015-09-25 17:38:44 -04:00
trace_nop.c tracing: Remove unneeded includes of debugfs.h and fs.h 2015-01-22 11:19:48 -05:00
trace_output.c tracing: Move trace_flags from global to a trace_array field 2015-09-30 15:22:55 -04:00
trace_output.h tracing: Turn seq_print_user_ip() into a static function 2015-09-28 10:16:12 -04:00
trace_printk.c tracing: Handle NULL formats in hold_module_trace_bprintk_format() 2016-07-27 09:47:32 -07:00
trace_probe.c tracing: probeevent: Fix to support minus offset from symbol 2018-03-28 18:40:15 +02:00
trace_probe.h tracing: probeevent: Fix to support minus offset from symbol 2018-03-28 18:40:15 +02:00
trace_sched_switch.c sched/core: Fix trace_sched_switch() 2015-10-06 17:08:15 +02:00
trace_sched_wakeup.c Most of the changes are clean ups and small fixes. Some of them have 2015-11-06 13:30:20 -08:00
trace_selftest.c ftrace: Fix selftest goto location on error 2017-09-27 11:00:16 +02:00
trace_selftest_dynamic.c
trace_seq.c tracing: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:37 -08:00
trace_stack.c tracing/stacktrace: Show entire trace if passed in function not found 2016-02-17 12:30:57 -08:00
trace_stat.c tracing: Convert the tracing facility over to use tracefs 2015-02-03 12:48:41 -05:00
trace_stat.h
trace_syscalls.c tracing: Move trace_flags from global to a trace_array field 2015-09-30 15:22:55 -04:00
trace_uprobe.c tracing/uprobes: Do not print '0x (null)' when offset is 0 2015-08-26 10:43:01 -03:00