summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2017-02-27 17:52:04 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-03-03 23:07:19 +0100
commitd0e02579c282ccf34c79818045ec2d2934b56c19 (patch)
treee5da9a4703da748b8159d15da4502713150ffde1 /kernel
parentperf intel-PT/BTS: Add missing initialization (diff)
downloadlinux-d0e02579c282ccf34c79818045ec2d2934b56c19.tar.xz
linux-d0e02579c282ccf34c79818045ec2d2934b56c19.zip
trace/kprobes: Add back warning about offset in return probes
Let's not remove the warning about offsets and return probes when the offset is invalid. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170227115204.00f92846@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_kprobe.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 18775ef182f8..2b7d0dd938ba 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -695,6 +695,11 @@ static int create_trace_kprobe(int argc, char **argv)
pr_info("Failed to parse symbol.\n");
return ret;
}
+ if (offset && is_return &&
+ !arch_function_offset_within_entry(offset)) {
+ pr_info("Given offset is not valid for return probe.\n");
+ return -EINVAL;
+ }
}
argc -= 2; argv += 2;