summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.c
diff options
context:
space:
mode:
authorPrashanth Nageshappa2012-02-24 08:41:39 +0100
committerArnaldo Carvalho de Melo2012-02-29 22:29:45 +0100
commit26b7952494772f0e695271fbd6cf83a852f60f25 (patch)
tree168c92dc039cbd205b848c33da7020ea5b02a074 /tools/perf/util/event.c
parentperf evlist: Return first evsel for non-sample event on old kernel (diff)
downloadkernel-qcow2-linux-26b7952494772f0e695271fbd6cf83a852f60f25.tar.gz
kernel-qcow2-linux-26b7952494772f0e695271fbd6cf83a852f60f25.tar.xz
kernel-qcow2-linux-26b7952494772f0e695271fbd6cf83a852f60f25.zip
perf probe: Ensure offset provided is not greater than function length
The perf probe command allows kprobe to be inserted at any offset from a function start, which results in adding kprobes to unintended location. Example: perf probe do_fork+10000 is allowed even though size of do_fork is ~904. This patch will ensure probe addition fails when the offset specified is greater than size of the function. Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jason Baron <jbaron@redhat.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Link: http://lkml.kernel.org/r/4F473F33.4060409@linux.vnet.ibm.com Signed-off-by: Prashanth Nageshappa <prashanth@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/event.c')
0 files changed, 0 insertions, 0 deletions