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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YiPJN1yaFKILinpE@krava>
Date:   Sat, 5 Mar 2022 21:33:59 +0100
From:   Jiri Olsa <olsajiri@...il.com>
To:     James Clark <james.clark@....com>
Cc:     acme@...nel.org, linux-perf-users@...r.kernel.org,
        coresight@...ts.linaro.org, Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 0/1] perf: Set build-id using build-id header on new
 mmap records

On Fri, Mar 04, 2022 at 09:09:55AM +0000, James Clark wrote:
> Changes since v1:
>  * Add read lock around dso find
>  * Bracket style fix
> 
> Hi,
> 
> We are seeing an issue with doing Coresight decode off target where
> initially the correct dso from ~/.debug is used, but after a new thread
> in the perf.data file is passed with its mmap record, the local version
> of the dso is picked up instead. This happens if the binary exists in the
> same path on both devices, for example /bin/ls.
> 
> Initially when parsing the build-ids in the header, the dso for /bin/ls
> will be created, and the file will correctly point to
> ~/.debug/bin/ls/2f15ad836be3339dec0e2e6a3c637e08e48aacbd/elf, but for any
> new threads or mmaps that are also for /bin/ls, they will not have a
> build-id set so they point to /bin/ls on the local machine rather than the
> debug folder.
> 
> To fix this I made it possible to look up which existing dsos have
> build id's set that originate from the header and then copy that build-id
> onto the new dso if the name matches. Another way to do it would
> be to stop comparing the mmap id so it matches on filename only, but I
> think we do want to differentiate between different mmaps, even if they
> have the same name, which is how it works in this version.
> 
> Applies to perf/core 56dce8681
> 
> James Clark (1):
>   perf: Set build-id using build-id header on new mmap records

Acked-by: Jiri Olsa <jolsa@...nel.org>

thanks,
jirka

> 
>  tools/perf/util/dso.h    |  1 +
>  tools/perf/util/header.c |  1 +
>  tools/perf/util/map.c    | 20 +++++++++++++++++---
>  3 files changed, 19 insertions(+), 3 deletions(-)
> 
> -- 
> 2.28.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ