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] [day] [month] [year] [list]
Date:   Thu, 20 Feb 2020 15:51:24 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     "Jin, Yao" <yao.jin@...ux.intel.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v1 0/2] perf report: Support annotation of code without
 symbols

On Thu, Feb 20, 2020 at 10:42:11PM +0800, Jin, Yao wrote:
> 
> 
> On 2/20/2020 8:06 PM, Jiri Olsa wrote:
> > On Thu, Feb 20, 2020 at 08:03:18PM +0800, Jin, Yao wrote:
> > > 
> > > 
> > > On 2/20/2020 7:56 PM, Jiri Olsa wrote:
> > > > On Thu, Feb 20, 2020 at 08:59:00AM +0800, Jin Yao wrote:
> > > > > For perf report on stripped binaries it is currently impossible to do
> > > > > annotation. The annotation state is all tied to symbols, but there are
> > > > > either no symbols, or symbols are not covering all the code.
> > > > > 
> > > > > We should support the annotation functionality even without symbols.
> > > > > 
> > > > > The first patch uses al_addr to print because it's easy to dump
> > > > > the instructions from this address in binary for branch mode.
> > > > > 
> > > > > The second patch supports the annotation on stripped binary.
> > > > > 
> > > > > Jin Yao (2):
> > > > >     perf util: Print al_addr when symbol is not found
> > > > >     perf annotate: Support interactive annotation of code without symbols
> > > > 
> > > > looks good, but I'm getting crash when annotating unresolved kernel address:
> > > > 
> > > > jirka
> > > > 
> > > > 
> > > 
> > > Thanks for reporting the issue.
> > > 
> > > I guess you are trying the "0xffffffff81c00ae7", let me try to reproduce
> > > this issue.
> > 
> > yes, I also checked and it did not happen before
> > 
> > jirka
> > 
> 
> Hi Jiri,
> 
> Can you try this fix?
> 
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index ff5711899234..5144528b2931 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -2497,7 +2497,7 @@ add_annotate_opt(struct hist_browser *browser,
>                  struct map_symbol *ms,
>                  u64 addr)
>  {
> -       if (ms->map->dso->annotate_warned)
> +       if (!ms->map || !ms->map->dso || ms->map->dso->annotate_warned)
>                 return 0;
> 
>         if (!ms->sym) {
> 
> It's tested OK at my side.

yep, the crash is gone

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ