[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170228090152.77bd628efd295d66af852b58@kernel.org>
Date: Tue, 28 Feb 2017 09:01:52 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: "Steven Rostedt (VMware)" <rostedt@...dmis.org>
Cc: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>,
Ingo Molnar <mingo@...hat.com>,
Michael Ellerman <mpe@...erman.id.au>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v2 3.5/5] trace/kprobes: Add back warning about offset
in return probes
On Mon, 27 Feb 2017 11:52:04 -0500
"Steven Rostedt (VMware)" <rostedt@...dmis.org> wrote:
> Let's not remove the warning about offsets and return probes when the
> offset is invalid.
Agreed, This looks good to me.
Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Thanks!
>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.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;
>
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists