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  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:   Tue, 5 May 2020 13:13:24 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Ian Rogers <irogers@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org, Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v2 2/3] lib kallsyms: parse using io api

Em Tue, May 05, 2020 at 04:25:21PM +0200, Jiri Olsa escreveu:
> On Fri, May 01, 2020 at 03:13:14PM -0700, Ian Rogers wrote:
> 
> SNIP
> 
> > diff --git a/tools/lib/symbol/kallsyms.c b/tools/lib/symbol/kallsyms.c
> > index 1a7a9f877095..e335ac2b9e19 100644
> > --- a/tools/lib/symbol/kallsyms.c
> > +++ b/tools/lib/symbol/kallsyms.c
> > @@ -1,7 +1,9 @@
> >  // SPDX-License-Identifier: GPL-2.0
> >  #include "symbol/kallsyms.h"
> > +#include "api/io.h"
> >  #include <stdio.h>
> > -#include <stdlib.h>
> > +#include <sys/stat.h>
> > +#include <fcntl.h>
> >  
> >  u8 kallsyms2elf_type(char type)
> >  {
> > @@ -15,74 +17,62 @@ bool kallsyms__is_function(char symbol_type)
> >  	return symbol_type == 'T' || symbol_type == 'W';
> >  }
> >  
> > -/*
> > - * While we find nice hex chars, build a long_val.
> > - * Return number of chars processed.
> > - */
> > -int hex2u64(const char *ptr, u64 *long_val)
> 
> hi,
> when you remove in here hex2u64, you'll break the compile:
> 
> 	  LINK     perf
> 	/usr/bin/ld: perf-in.o: in function `modules__parse':
> 	/home/jolsa/linux-perf/tools/perf/util/symbol.c:607: undefined reference to `hex2u64'
> 	/usr/bin/ld: /home/jolsa/linux-perf/tools/perf/util/symbol.c:607: undefined reference to `hex2u64'
> 	/usr/bin/ld: perf-in.o: in function `dso__load_perf_map':
> 	/home/jolsa/linux-perf/tools/perf/util/symbol.c:1477: undefined reference to `hex2u64'
> 	/usr/bin/ld: /home/jolsa/linux-perf/tools/perf/util/symbol.c:1483: undefined reference to `hex2u64'
> 	collect2: error: ld returned 1 exit status
> 	make[2]: *** [Makefile.perf:629: perf] Error 1
> 	make[1]: *** [Makefile.perf:225: sub-make] Error 2
> 	make: *** [Makefile:70: all] Error 2
> 
> that hex2u64 move needs to come before this change

I noticed this and fixed it all, was about to send this note I've added:

---------------

Also we can't remove hex2u64() in this patch as this breaks the build:

  /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `modules__parse':
  /home/acme/git/perf/tools/perf/util/symbol.c:607: undefined reference to `hex2u64'
  /usr/bin/ld: /home/acme/git/perf/tools/perf/util/symbol.c:607: undefined reference to `hex2u64'
  /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `dso__load_perf_map':
  /home/acme/git/perf/tools/perf/util/symbol.c:1477: undefined reference to `hex2u64'
  /usr/bin/ld: /home/acme/git/perf/tools/perf/util/symbol.c:1483: undefined reference to `hex2u64'
  collect2: error: ld returned 1 exit status

Leave it there, move it in the next patch.

Powered by blists - more mailing lists