Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1588818
| From | "Steven Rostedt (VMware)" <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 3.5/5] trace/kprobes: Add back warning about offset in return probes |
| Date | 2017-02-27 18:10 +0100 |
| Message-ID | <tfwYa-b8-19@gated-at.bofh.it> (permalink) |
| References | <tdFCx-2v3-3@gated-at.bofh.it> <tdFCy-2v3-15@gated-at.bofh.it> <tfwEN-8dT-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Let's not remove the warning about offsets and return probes when the
offset is invalid.
Signed-off-by: Steven Rostedt (VMware) <rostedt@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;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 3/5] trace/kprobes: allow return probes with offsets and absolute addresses "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-02-22 15:00 +0100
Re: [PATCH v2 3/5] trace/kprobes: allow return probes with offsets and absolute addresses Steven Rostedt <rostedt@goodmis.org> - 2017-02-27 17:50 +0100
[PATCH v2 3.5/5] trace/kprobes: Add back warning about offset in return probes "Steven Rostedt (VMware)" <rostedt@goodmis.org> - 2017-02-27 18:10 +0100
Re: [PATCH v2 3.5/5] trace/kprobes: Add back warning about offset in return probes Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-28 01:30 +0100
csiph-web