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]
Date:   Sun, 29 Dec 2019 20:34:48 +0200
From:   Thomas Backlund <tmb@...eia.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        <linux-kernel@...r.kernel.org>
CC:     <stable@...r.kernel.org>, Masami Hiramatsu <mhiramat@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.4 249/434] perf probe: Fix to show ranges of variables
 in functions without entry_pc

Den 29-12-2019 kl. 19:25, skrev Greg Kroah-Hartman:
> From: Masami Hiramatsu <mhiramat@...nel.org>
> 
> [ Upstream commit af04dd2f8ebaa8fbd46f698714acbf43da14da45 ]
> 
> Fix to show ranges of variables (--range and --vars option) in functions
> which DIE has only ranges but no entry_pc attribute.
> 
> Without this fix:
> 
>    # perf probe --range -V clear_tasks_mm_cpumask
>    Available variables at clear_tasks_mm_cpumask
>    	@<clear_tasks_mm_cpumask+0>
>    		(No matched variables)
> 
> With this fix:
> 
>    # perf probe --range -V clear_tasks_mm_cpumask
>    Available variables at clear_tasks_mm_cpumask
> 	@<clear_tasks_mm_cpumask+0>
> 		[VAL]	int	cpu	@<clear_tasks_mm_cpumask+[0-35,317-317,2052-2059]>
> 
> Committer testing:
> 
> Before:
> 
>    [root@...co ~]# perf probe --range -V clear_tasks_mm_cpumask
>    Available variables at clear_tasks_mm_cpumask
>            @<clear_tasks_mm_cpumask+0>
>                    (No matched variables)
>    [root@...co ~]#
> 
> After:
> 
>    [root@...co ~]# perf probe --range -V clear_tasks_mm_cpumask
>    Available variables at clear_tasks_mm_cpumask
>            @<clear_tasks_mm_cpumask+0>
>                    [VAL]   int     cpu     @<clear_tasks_mm_cpumask+[0-23,23-105,105-106,106-106,1843-1850,1850-1862]>
>    [root@...co ~]#
> 
> Using it:
> 
>    [root@...co ~]# perf probe clear_tasks_mm_cpumask cpu
>    Added new event:
>      probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask with cpu)
> 
>    You can now use it in all perf tools, such as:
> 
>    	perf record -e probe:clear_tasks_mm_cpumask -aR sleep 1
> 
>    [root@...co ~]# perf probe -l
>      probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask@...nel/cpu.c with cpu)
>    [root@...co ~]#
>    [root@...co ~]# perf trace -e probe:*cpumask
>    ^C[root@...co ~]#
> 
> Fixes: 349e8d261131 ("perf probe: Add --range option to show a variable's location range")
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Link: http://lore.kernel.org/lkml/157199323018.8075.8179744380479673672.stgit@devnote2
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
>   tools/perf/util/dwarf-aux.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c
> index 929b7c0567f4..4b1890204e99 100644
> --- a/tools/perf/util/dwarf-aux.c
> +++ b/tools/perf/util/dwarf-aux.c
> @@ -997,7 +997,7 @@ static int die_get_var_innermost_scope(Dwarf_Die *sp_die, Dwarf_Die *vr_die,
>   	bool first = true;
>   	const char *name;
>   
> -	ret = dwarf_entrypc(sp_die, &entry);
> +	ret = die_entrypc(sp_die, &entry);
>   	if (ret)
>   		return ret;
>   
> @@ -1060,7 +1060,7 @@ int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, struct strbuf *buf)
>   	bool first = true;
>   	const char *name;
>   
> -	ret = dwarf_entrypc(sp_die, &entry);
> +	ret = die_entrypc(sp_die, &entry);
>   	if (ret)
>   		return ret;
>   
> 

Still broken...

/usr/bin/ld: perf-in.o: in function `die_get_var_range':
/work/rpmbuild/BUILD/kernel-x86_64/linux-5.4/tools/perf/util/dwarf-aux.c:1085: 
undefined reference to `die_entrypc'
/usr/bin/ld: perf-in.o: in function `die_get_var_innermost_scope':
/work/rpmbuild/BUILD/kernel-x86_64/linux-5.4/tools/perf/util/dwarf-aux.c:1022: 
undefined reference to `die_entrypc'
collect2: error: ld returned 1 exit status

--
Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ