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:   Fri, 10 Dec 2021 10:33:48 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Michael Petlan <mpetlan@...hat.com>,
        Ian Rogers <irogers@...gle.com>,
        linux-perf-users@...r.kernel.org,
        "Frank Ch. Eigler" <fche@...hat.com>
Subject: Re: [RFC] perf record: Disable debuginfod by default

Em Fri, Dec 10, 2021 at 01:24:40PM +0100, Jiri Olsa escreveu:
> On Fri, Dec 10, 2021 at 09:04:25AM +0100, Peter Zijlstra wrote:
> > On Thu, Dec 09, 2021 at 09:04:25PM +0100, Jiri Olsa wrote:
> > > Adding single perf_debuginfod_setup function and using
> > > it also in perf buildid-cache command.

> > I'm still running with --no-buildid --no-buildid-cache or something like
> > that by default. As long as that remains working I'm good.

> you're good ;-) that will bypass the problem completely

And these days buildids come in PERF_RECORD_MMAP records when possible
(kernel new enough), so no extra step at the end for traversing
PERF_RECORD_MMAP records, read the DSO, find the build id, etc:

$ git log --pretty=fuller -1 --author=jolsa kernel/events/
commit 88a16a1309333e43d328621ece3e9fa37027e8eb
Author:     Jiri Olsa <jolsa@...nel.org>
AuthorDate: Thu Jan 14 14:40:44 2021 +0100
Commit:     Alexei Starovoitov <ast@...nel.org>
CommitDate: Thu Jan 14 19:29:58 2021 -0800

    perf: Add build id data in mmap2 event

    Adding support to carry build id data in mmap2 event.

    The build id data replaces maj/min/ino/ino_generation
    fields, which are also used to identify map's binary,
    so it's ok to replace them with build id data:

      union {
              struct {
                      u32       maj;
                      u32       min;
                      u64       ino;
                      u64       ino_generation;
              };
              struct {
                      u8        build_id_size;
                      u8        __reserved_1;
                      u16       __reserved_2;
                      u8        build_id[20];
              };
      };

    Replaced maj/min/ino/ino_generation fields give us size
    of 24 bytes. We use 20 bytes for build id data, 1 byte
    for size and rest is unused.

    There's new misc bit for mmap2 to signal there's build
    id data in it:

      #define PERF_RECORD_MISC_MMAP_BUILD_ID   (1 << 14)

    Signed-off-by: Jiri Olsa <jolsa@...nel.org>
    Signed-off-by: Alexei Starovoitov <ast@...nel.org>
    Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
    Link: https://lore.kernel.org/bpf/20210114134044.1418404-4-jolsa@kernel.org
$

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ