[PATCH v2 3.5/5] trace/kprobes: Add back warning about offset in return probes
Steven Rostedt (VMware)
rostedt at goodmis.org
Tue Feb 28 03:52:04 AEDT 2017
Let's not remove the warning about offsets and return probes when the
offset is invalid.
Signed-off-by: Steven Rostedt (VMware) <rostedt at goodmis.org>
---
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 3f4f788..f626235 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;
More information about the Linuxppc-dev
mailing list