Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589064

Re: [PATCH v2 3.5/5] trace/kprobes: Add back warning about offset in return probes

From Masami Hiramatsu <mhiramat@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3.5/5] trace/kprobes: Add back warning about offset in return probes
Date 2017-02-28 01:30 +0100
Message-ID <tfDPX-4VN-7@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> <tfwYa-b8-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 27 Feb 2017 11:52:04 -0500
"Steven Rostedt (VMware)" <rostedt@goodmis.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@kernel.org>

Thanks!

> 
> 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;
>  


-- 
Masami Hiramatsu <mhiramat@kernel.org>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


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