linux-imx/kernel/trace
Masami Hiramatsu bd7c606e67 tracing: probeevent: Fix to support minus offset from symbol
commit c5d343b6b7 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>
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>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2018-06-01 00:30:24 +01:00
..
blktrace.c blktrace: fix unlocked access to init/start-stop/teardown 2018-02-13 18:32:15 +00:00
ftrace.c ftrace: Fix ftrace enable ordering of sysctl ftrace_enabled 2015-05-09 23:16:27 +01:00
Kconfig ftrace: Update the kconfig for DYNAMIC_FTRACE 2013-03-20 15:03:28 +00:00
Makefile Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-26 17:03:38 +02:00
power-traces.c perf: Clean up power events by introducing new, more generic ones 2011-01-04 08:16:54 +01:00
ring_buffer_benchmark.c ring-buffer-benchmark: Fix the wrong sched_priority of producer 2015-08-07 00:32:15 +01:00
ring_buffer.c ring-buffer: Mask out the info bits when returning buffer page length 2018-03-03 15:50:52 +00:00
rpm-traces.c PM / Runtime: Introduce trace points for tracing rpm_* functions 2011-09-27 22:53:27 +02:00
trace_branch.c tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_clock.c tracing: Add a counter clock for those that do not trust clocks 2011-09-19 11:35:58 -04:00
trace_entries.h tracing: Fix ftrace stack trace entries 2012-04-13 08:33:47 -07:00
trace_event_perf.c tracing: New flag to allow non privileged users to use a trace event 2010-11-18 14:37:40 +01:00
trace_events_filter_test.h tracing/filter: Add startup tests for events filter 2011-08-19 14:35:59 -04:00
trace_events_filter.c tracing/filter: Do not allow infix to exceed end of string 2015-08-12 16:33:17 +02:00
trace_events.c tracing: Do not add event files for modules that fail tracepoints 2014-04-02 00:58:57 +01:00
trace_export.c tracing: Fix ftrace stack trace entries 2012-04-13 08:33:47 -07:00
trace_functions_graph.c tracing: Still trace filtered irq functions when irq trace is disabled 2011-07-07 22:26:27 -04:00
trace_functions.c ftrace: Fix regression of :mod:module function enabling 2011-07-07 11:30:08 -04:00
trace_irqsoff.c tracing: Have preempt(irqs)off trace preempt disabled functions 2016-05-01 00:05:20 +02:00
trace_kdb.c kdb,ftdump: Remove reference to internal kdb include 2010-10-22 15:34:11 -05:00
trace_kprobe.c tracing: probeevent: Fix to support minus offset from symbol 2018-06-01 00:30:24 +01:00
trace_mmiotrace.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
trace_nop.c tracing/ftrace: make nop-tracer use polling wait for events on pipe 2009-03-23 09:22:15 +01:00
trace_output.c tracing: Fix stacktrace of latency tracers (irqsoff and friends) 2012-05-11 13:14:35 +01:00
trace_output.h tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_printk.c tracing: Clean up tb_fmt to not give faulty compile warning 2011-08-10 20:36:32 -04:00
trace_sched_switch.c tracing: Remove obsolete sched_switch tracer 2011-02-08 17:14:56 -05:00
trace_sched_wakeup.c tracing: Prevent buffer overwrite disabled for latency tracers 2013-03-27 02:41:15 +00:00
trace_selftest_dynamic.c ftrace: Add self-tests for multiple function trace users 2011-05-18 19:24:51 -04:00
trace_selftest.c ftrace: Fix selftest goto location on error 2017-11-26 13:51:07 +00:00
trace_stack.c tracing: Check return value of tracing_init_dentry() 2013-05-13 15:02:17 +01:00
trace_stat.c tracing: Check return value of tracing_init_dentry() 2013-05-13 15:02:17 +01:00
trace_stat.h tracing/stat: Add stat_release() callback 2009-07-10 12:14:05 +02:00
trace_syscalls.c tracing/syscalls: Ignore numbers outside NR_syscalls' range 2014-12-14 16:23:53 +00:00
trace_workqueue.c jump label: Initialize workqueue tracepoints *before* they are registered 2010-09-22 16:30:03 -04:00
trace.c tracing: Use strlcpy() instead of strcpy() in __trace_find_cmdline() 2017-06-05 21:13:55 +01:00
trace.h tracing: Prevent buffer overwrite disabled for latency tracers 2013-03-27 02:41:15 +00:00