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]
Message-ID: <Yo/EytFDKnOEiWCa@kernel.org>
Date:   Thu, 26 May 2022 15:19:54 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     James Clark <james.clark@....com>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org, broonie@...nel.org,
        german.gomez@....com, John Garry <john.garry@...wei.com>,
        Will Deacon <will@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>, linux-doc@...r.kernel.org
Subject: Re: [PATCH v1 4/6] perf tools: Use dynamic register set for Dwarf
 unwind

Em Thu, May 26, 2022 at 12:44:33PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, May 09, 2022 at 03:42:52PM +0100, James Clark escreveu:
> > Architectures can detect availability of extra registers at
> > runtime so use this more complete set for unwinding. This
> > will include the VG register on arm64 in a later commit.
> > 
> > If the function isn't implemented then PERF_REGS_MASK is
> > returned and there is no change.
> 
> Committer notes:
> 
> Added util/perf_regs.c to tools/perf/util/python-ext-sources so that
> 'perf test python' passes, i.e. the perf python binding has all the
> symbols it needs, addressing:
> 
>   $ perf test -v python
>    19: 'import perf' in python                                         :
>   --- start ---
>   test child forked, pid 2037817
>   python usage test: "echo "import sys ; sys.path.append('/tmp/build/perf/python'); import perf" | '/usr/bin/python3' "
>   Traceback (most recent call last):
>     File "<stdin>", line 1, in <module>
>   ImportError: /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so: undefined symbol: arch__user_reg_mask
>   test child finished with -1
>   ---- end ----
>   'import perf' in python: FAILED!
>   $

Too old to support?

  69     7.19 ubuntu:16.04-x-arm64          : FAIL gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)
    arch/arm64/util/perf_regs.c: In function 'arch__user_reg_mask':
    arch/arm64/util/perf_regs.c:151:28: error: 'HWCAP_SVE' undeclared (first use in this function)
      if (getauxval(AT_HWCAP) & HWCAP_SVE)
                                ^
    arch/arm64/util/perf_regs.c:151:28: note: each undeclared identifier is reported only once for each function it appears in
    /git/perf-5.18.0/tools/build/Makefile.build:139: recipe for target 'util' failed
    make[5]: *** [util] Error 2
    /git/perf-5.18.0/tools/build/Makefile.build:139: recipe for target 'arm64' failed
    make[4]: *** [arm64] Error 2
    /git/perf-5.18.0/tools/build/Makefile.build:139: recipe for target 'arch' failed
    make[3]: *** [arch] Error 2


⬢[acme@...lbox perf]$ find . -name "*.h" | xargs grep -w HWCAP_SVE
./arch/arm64/include/uapi/asm/hwcap.h:#define HWCAP_SVE		(1 << 22)
⬢[acme@...lbox perf]$ 

  
> > Signed-off-by: James Clark <james.clark@....com>
> > ---
> >  tools/perf/util/evsel.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> > index d38722560e80..a881784da966 100644
> > --- a/tools/perf/util/evsel.c
> > +++ b/tools/perf/util/evsel.c
> > @@ -875,7 +875,7 @@ static void __evsel__config_callchain(struct evsel *evsel, struct record_opts *o
> >  					   "specifying a subset with --user-regs may render DWARF unwinding unreliable, "
> >  					   "so the minimal registers set (IP, SP) is explicitly forced.\n");
> >  			} else {
> > -				attr->sample_regs_user |= PERF_REGS_MASK;
> > +				attr->sample_regs_user |= arch__user_reg_mask();
> >  			}
> >  			attr->sample_stack_user = param->dump_size;
> >  			attr->exclude_callchain_user = 1;
> > -- 
> > 2.28.0
> 
> -- 
> 
> - Arnaldo

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ