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]
Message-ID: <20210212123421.GC1398414@kernel.org>
Date:   Fri, 12 Feb 2021 09:34:21 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Nicholas Fraser <nfraser@...eweavers.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Ian Rogers <irogers@...gle.com>,
        "Frank Ch. Eigler" <fche@...hat.com>,
        Song Liu <songliubraving@...com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Kim Phillips <kim.phillips@....com>,
        Tommi Rantala <tommi.t.rantala@...ia.com>,
        Remi Bernon <rbernon@...eweavers.com>,
        linux-kernel@...r.kernel.org,
        Ulrich Czekalla <uczekalla@...eweavers.com>,
        Huw Davies <huw@...eweavers.com>
Subject: Re: [PATCH 4/4] perf report: Fix return value when loading PE DSO

Em Wed, Feb 10, 2021 at 02:18:02PM -0500, Nicholas Fraser escreveu:
> The first time dso__load() was called on a PE file it always returned -1
> error. This caused the first call to map__find_symbol() to always fail
> on a PE file so the first sample from each PE file always had symbol
> <unknown>. Subsequent samples succeed however because the DSO is already
> loaded.
> 
> This fixes dso__load() to return 0 when successfully loading a DSO with
> libbfd.

You forgot to add this:

Fixes: eac9a4342e5447ca ("perf symbols: Try reading the symbol table with libbfd")

This helps, for instance, the stable@...nel.org guys, since their
scripts will scrape this and find that it should also go to whatever
stable releases are based on:

  $ git tag --contains eac9a4342e5447ca | grep ^v[45].* | grep -v -- -rc
  v5.10
  $

Applied and added the Fixes tag,

- Arnaldo
 
> Signed-off-by: Nicholas Fraser <nfraser@...eweavers.com>
> ---
>  tools/perf/util/symbol.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> index aa9ae875b995..492c873713cc 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -1861,8 +1861,10 @@ int dso__load(struct dso *dso, struct map *map)
>  		if (nsexit)
>  			nsinfo__mountns_enter(dso->nsinfo, &nsc);
>  
> -		if (bfdrc == 0)
> +		if (bfdrc == 0) {
> +			ret = 0;
>  			break;
> +		}
>  
>  		if (!is_reg || sirc < 0)
>  			continue;
> -- 
> 2.30.0
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ