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:   Sun, 24 Jul 2022 13:23:27 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Fangrui Song <maskray@...gle.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Ian Rogers <irogers@...gle.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] perf symbol: Skip recording symbols in
 '.gnu.warning.*' sections

On Sat, Jul 23, 2022 at 08:42:20PM -0700, Fangrui Song wrote:
> On Sat, Jul 23, 2022 at 7:29 PM Leo Yan <leo.yan@...aro.org> wrote:
> >
> > Some symbols are observed their 'st_value' field are zeros.  E.g.
> > libc.so.6 in Ubuntu contains a symbol '__evoke_link_warning_getwd' which
> > resides in the '.gnu.warning.getwd' section, unlike normal symbols, this
> > kind of symbols are only used for linker warning.
> >
> > This patch skips to record symbols from '.gnu.warning.*' sections by
> > detecting the sub string '.gnu.warning' is contained in section name.
> >
> > Signed-off-by: Leo Yan <leo.yan@...aro.org>
> 
> Presumably __evoke_link_warning_getwd is due to `clang -fuse-ld=lld
> -static ...` on a file calling the deprecated getwd.
> GNU ld and gold implement a .gnu.warning.* feature which removes the
> section. ld.lld just ignores this section as the usefulness of the
> functionality is unclear.
> 
> The section .gnu.warning.getwd does not have the SHF_ALLOC flag. Such
> sections are not part of memory images and I think it is more generic
> ignoring all symbols residing in a non-SHF_ALLOC section.

Good point!  Will refine the patch for this and send out soon.

Thanks a lot, Fangrui.

Powered by blists - more mailing lists