mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] trace/kprobes: allow return probes with offsets and absolute addresses
Date: Thu, 16 Feb 2017 08:43:04 +0900	[thread overview]
Message-ID: <20170216084304.352c744cc2bf26ed16170033@kernel.org> (raw)
In-Reply-To: <b0d00619619edab1b48688cb59e55f229898d3f6.1487181941.git.naveen.n.rao@linux.vnet.ibm.com>

On Wed, 15 Feb 2017 23:47:53 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:

> Since the kernel includes many non-global functions with same names, we
> will need to use offsets from other symbols (typically _text/_stext) or
> absolute addresses to place return probes on specific functions. Also,
> the core register_kretprobe() API never forbid use of offsets or
> absolute addresses with kretprobes.
> 
> Allow its use with the trace infrastructure.
> 

OK, Looks good to me.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Thanks!


> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> ---
>  kernel/trace/trace_kprobe.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index 7ad9e53ad174..2768cb60ebd7 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -679,10 +679,6 @@ static int create_trace_kprobe(int argc, char **argv)
>  		return -EINVAL;
>  	}
>  	if (isdigit(argv[1][0])) {
> -		if (is_return) {
> -			pr_info("Return probe point must be a symbol.\n");
> -			return -EINVAL;
> -		}
>  		/* an address specified */
>  		ret = kstrtoul(&argv[1][0], 0, (unsigned long *)&addr);
>  		if (ret) {
> @@ -698,10 +694,6 @@ static int create_trace_kprobe(int argc, char **argv)
>  			pr_info("Failed to parse symbol.\n");
>  			return ret;
>  		}
> -		if (offset && is_return) {
> -			pr_info("Return probe must be used without offset.\n");
> -			return -EINVAL;
> -		}
>  	}
>  	argc -= 2; argv += 2;
>  
> -- 
> 2.11.0
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2017-02-15 23:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14  8:31 [PATCH] kretprobes: reject registration if a symbol offset is specified Naveen N. Rao
2017-02-14  8:41 ` Ananth N Mavinakayanahalli
2017-02-14 10:32 ` Masami Hiramatsu
2017-02-15 17:53   ` Naveen N. Rao
2017-02-15 18:17     ` [PATCH 1/3] kretprobes: ensure probe location is at function entry Naveen N. Rao
2017-02-15 18:17       ` [PATCH 2/3] trace/kprobes: allow return probes with offsets and absolute addresses Naveen N. Rao
2017-02-15 23:43         ` Masami Hiramatsu [this message]
2017-02-15 18:17       ` [PATCH 3/3] perf: revert "perf probe: Fix probing kretprobes" Naveen N. Rao
2017-02-15 23:43         ` Masami Hiramatsu
2017-02-15 23:39       ` [PATCH 1/3] kretprobes: ensure probe location is at function entry Masami Hiramatsu
2017-02-16  7:51         ` Naveen N. Rao
2017-02-16  8:17       ` [PATCH 0/2] powerpc: kretprobe updates Naveen N. Rao
2017-02-16  8:17         ` [PATCH 1/2] powerpc: kretprobes: override default function entry offset Naveen N. Rao
2017-02-16  8:17         ` [PATCH 2/2] perf: powerpc: choose LEP with kretprobes Naveen N. Rao
2017-02-17 10:44         ` [PATCH 0/2] powerpc: kretprobe updates Masami Hiramatsu
2017-02-17 20:42           ` Arnaldo Carvalho de Melo
2017-02-19  4:42             ` Masami Hiramatsu
2017-02-20  9:50               ` Naveen N. Rao
2017-02-21 13:07                 ` Masami Hiramatsu
2017-02-22 13:39                   ` Naveen N. Rao
2017-02-20  9:46             ` Naveen N. Rao
2017-02-20 11:43             ` Naveen N. Rao
2017-02-21 13:06               ` Masami Hiramatsu
2017-02-15 23:28     ` [PATCH] kretprobes: reject registration if a symbol offset is specified Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170216084304.352c744cc2bf26ed16170033@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=acme@kernel.org \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome