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: <20181126083917.GA18783@krava>
Date:   Mon, 26 Nov 2018 09:39:17 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Eric Saint Etienne <eric.saint.etienne@...cle.com>
Cc:     Linux Kernel <linux-kernel@...r.kernel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Darren Kenny <darren.kenny@...cle.com>,
        Eric Saint-Etienne <eric.saintetienne@...il.com>
Subject: Re: [PATCH] perf symbols: Cannot disassemble some routines when
 debuginfo present

On Fri, Nov 23, 2018 at 10:24:21AM -0800, Eric Saint Etienne wrote:
> > > +		/*
> > > +		 * When using -ffunction-sections, only .text gets loaded by
> > > +		 * map_groups__find() into al->map. Consequently al->map address
> > > +		 * range encompass the whole code.
> > > +		 *
> > > +		 * But map__load() has just loaded many function maps by
> > > +		 * splitting al->map, which reduced al->map range drastically.
> > > +		 * Very likely the target address is now in one of those newly
> > > +		 * created function maps, so we need to lookup the map again
> > > +		 * to find that new map.
> > > +		 */
> > 
> > hum, so map__load actualy can split the map to create new maps?
> > 
> > cold you please point me to that code? I haven't touch this area for some
> > time and I can't find it
> 
> The split happens in dso_process_kernel_symbol() in symbol-elf.c where we
> call map_groups__find_by_name() to find an existing map, but with
> -ffunction-sections and a symbol belonging to new (function) map, such map
> doesn't exist yet so we end up creating one and adjusting existing maps
> accordingly because adjust_kernel_syms is set. Makes sense?
> 
> As of 4.20-rc3 the call chain is as follows:
> event:c:1573	   map__load()
> map.c:315	   dso__load()
> symobl.c:1528	   dso__load_kernel_sym()
> symbol.c:1896	   dso__load_vmlinux_path()
> 		   (or we directly call dso__load_vmlinux() at line 1892)
> symbol.c:1744	   dso__load_vmlinux()
> symbol.c:1719	   dso__load_sym()
> symbol-elf.c:1090  dso_process_kernel_symbol()

i see, thank for the pointers.. could you please mention
this in your comment and changelog as well?

also to document in the code that it's related to map__load
could you put it to the if contidion, like:

+               if (load_map && (al->addr < al->map->start || al->addr >= al->map->end))


thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ