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: <20210211235230.GA1370062@kernel.org>
Date:   Thu, 11 Feb 2021 20:52:30 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Dmitry Safonov <dima@...sta.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Dmitry Safonov <0x7f454c46@...il.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Ingo Molnar <mingo@...hat.com>,
        Jacek Caban <jacek@...eweavers.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Peter Zijlstra <peterz@...radead.org>,
        Remi Bernon <rbernon@...eweavers.com>
Subject: Re: [PATCH] perf: Use (long) for iterator for bfd symbols

Em Thu, Feb 11, 2021 at 06:14:03PM +0900, Namhyung Kim escreveu:
> Hello,
> 
> On Tue, Feb 9, 2021 at 11:51 PM Dmitry Safonov <dima@...sta.com> wrote:
> >
> > GCC (GCC) 8.4.0 20200304 fails to build perf with:
> > : util/symbol.c: In function 'dso__load_bfd_symbols':
> > : util/symbol.c:1626:16: error: comparison of integer expressions of different signednes
> > :   for (i = 0; i < symbols_count; ++i) {
> > :                 ^
> > : util/symbol.c:1632:16: error: comparison of integer expressions of different signednes
> > :    while (i + 1 < symbols_count &&
> > :                 ^
> > : util/symbol.c:1637:13: error: comparison of integer expressions of different signednes
> > :    if (i + 1 < symbols_count &&
> > :              ^
> > : cc1: all warnings being treated as errors
> >
> > It's unlikely that the symtable will be that big, but the fix is
> > oneliner and as perf has CORE_CFLAGS += -Wextra, which makes build to
> > fail together with CORE_CFLAGS += -Werror
> >
> > Fixes: eac9a4342e54 ("perf symbols: Try reading the symbol table with libbfd")
> > Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> > Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Jacek Caban <jacek@...eweavers.com>
> > Cc: Jiri Olsa <jolsa@...hat.com>
> > Cc: Mark Rutland <mark.rutland@....com>
> > Cc: Namhyung Kim <namhyung@...nel.org>
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Remi Bernon <rbernon@...eweavers.com>
> > Signed-off-by: Dmitry Safonov <dima@...sta.com>
> 
> Acked-by: Namhyung Kim <namhyung@...nel.org>

Thanks, applied.

- Arnaldo

 
> Thanks,
> Namhyung
> 
> 
> > ---
> >  tools/perf/util/symbol.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> > index 64a039cbba1b..1645fb4ec9ed 100644
> > --- a/tools/perf/util/symbol.c
> > +++ b/tools/perf/util/symbol.c
> > @@ -1561,12 +1561,11 @@ static int bfd2elf_binding(asymbol *symbol)
> >  int dso__load_bfd_symbols(struct dso *dso, const char *debugfile)
> >  {
> >         int err = -1;
> > -       long symbols_size, symbols_count;
> > +       long symbols_size, symbols_count, i;
> >         asection *section;
> >         asymbol **symbols, *sym;
> >         struct symbol *symbol;
> >         bfd *abfd;
> > -       u_int i;
> >         u64 start, len;
> >
> >         abfd = bfd_openr(dso->long_name, NULL);
> > --
> > 2.30.0
> >

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ