aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <[email protected]>2017-02-27 11:52:04 -0500
committerArnaldo Carvalho de Melo <[email protected]>2017-03-03 19:07:19 -0300
commitd0e02579c282ccf34c79818045ec2d2934b56c19 (patch)
treee5da9a4703da748b8159d15da4502713150ffde1
parentf1c4d1ad39b5f7c617572f93658bb7159ec9c686 (diff)
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 <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> Acked-by: Naveen N. Rao <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-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;