lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191025143513.GB15617@kernel.org>
Date:   Fri, 25 Oct 2019 11:35:13 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Jiri Olsa <jolsa@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [BUGFIX PATCH 3/6] perf/probe: Fix to probe an inline function
 which has no entry pc

Em Fri, Oct 25, 2019 at 05:46:43PM +0900, Masami Hiramatsu escreveu:
> Fix perf probe to probe an inlne function which has no entry pc
> or low pc but only has ranges attribute.
> 
> This seems very rare case, but I could find a few examples, as
> same as probe_point_search_cb(), use die_entrypc() to get the
> entry address in probe_point_inline_cb() too.
> 
> Without this patch,
>   # tools/perf/perf probe -D __amd_put_nb_event_constraints
>   Failed to get entry address of __amd_put_nb_event_constraints.
>   Probe point '__amd_put_nb_event_constraints' not found.
>     Error: Failed to add events.
> 
> With this patch,
>   # tools/perf/perf probe -D __amd_put_nb_event_constraints
>   p:probe/__amd_put_nb_event_constraints amd_put_event_constraints+43

Here I got it slightly different:

Before:

  [root@...co ~]# perf probe -D __amd_put_nb_event_constraints
  Failed to get entry address of __amd_put_nb_event_constraints.
  Probe point '__amd_put_nb_event_constraints' not found.
    Error: Failed to add events.
  [root@...co ~]#

After:

  [root@...co ~]# perf probe -D __amd_put_nb_event_constraints
  p:probe/__amd_put_nb_event_constraints _text+33789
  [root@...co ~]#


----

I'm now checking if this is because I applied patch 4/6 before 3/6
 
> Fixes: 4ea42b181434 ("perf: Add perf probe subcommand, a kprobe-event setup helper")
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> ---
>  tools/perf/util/probe-finder.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index 71633f55f045..2fa932bcf960 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -930,7 +930,7 @@ static int probe_point_inline_cb(Dwarf_Die *in_die, void *data)
>  		ret = find_probe_point_lazy(in_die, pf);
>  	else {
>  		/* Get probe address */
> -		if (dwarf_entrypc(in_die, &addr) != 0) {
> +		if (die_entrypc(in_die, &addr) != 0) {
>  			pr_warning("Failed to get entry address of %s.\n",
>  				   dwarf_diename(in_die));
>  			return -ENOENT;

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ