[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-d0e02579c282ccf34c79818045ec2d2934b56c19@git.kernel.org>
Date: Tue, 7 Mar 2017 00:20:52 -0800
From: "tip-bot for Steven Rostedt (VMware)" <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mhiramat@...nel.org, ananth@...ux.vnet.ibm.com,
linux-kernel@...r.kernel.org, hpa@...or.com, rostedt@...dmis.org,
naveen.n.rao@...ux.vnet.ibm.com, mingo@...nel.org,
tglx@...utronix.de, mpe@...erman.id.au, acme@...hat.com
Subject: [tip:perf/core] trace/kprobes: Add back warning about offset in
return probes
Commit-ID: d0e02579c282ccf34c79818045ec2d2934b56c19
Gitweb: http://git.kernel.org/tip/d0e02579c282ccf34c79818045ec2d2934b56c19
Author: Steven Rostedt (VMware) <rostedt@...dmis.org>
AuthorDate: Mon, 27 Feb 2017 11:52:04 -0500
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 3 Mar 2017 19:07:19 -0300
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@...dmis.org>
Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Acked-by: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: linuxppc-dev@...ts.ozlabs.org
Link: http://lkml.kernel.org/r/20170227115204.00f92846@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
kernel/trace/trace_kprobe.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 18775ef..2b7d0dd 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;
Powered by blists - more mailing lists