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]
Date:	Thu, 11 Nov 2010 12:21:43 +0000
From:	Jamie Iles <jamie@...ieiles.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Jamie Iles <jamie@...ieiles.com>, Ming Lei <tom.leiming@...il.com>,
	Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Russell King <linux@....linux.org.uk>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [Questions] How to run 'perf top' on ARM to profile kernel
 functions with modules loaded

On Thu, Nov 11, 2010 at 01:06:16PM +0100, Peter Zijlstra wrote:
> On Thu, 2010-11-11 at 09:17 +0000, Jamie Iles wrote:
> > On Thu, Nov 11, 2010 at 03:52:07PM +0800, Ming Lei wrote:
> > > 2010/11/11 Ming Lei <tom.leiming@...il.com>:
> > > > Hi,
> > > >
> > > > 'perf top' can't display any functions when modules are loaded on ARM.
> > > 
> > > Sorry, should be can't display any kernel functions when modules are loaded
> > > on ARM.
> > I've noticed this myself and I spent a bit of time looking into it last week 
> > but didn't get too far. I did wonder if it was something to do with the map 
> > fixups after loading the modules. If you look at the raw events after a perf 
> > record with 'perf report -D' then the last module has a size that takes it to 
> > 0xFFFFFFFF which overlaps with the rest of the kernel symbols.
> > 
> > On x86 it looks like the modules are loaded after the kernel image in VM 
> > unlike ARM.
> 
> Order shouldn't matter, but that overlap is very likely what kills it.
> That module size is buggy.
I'm guessing that its in util/symbol.c:__map_groups__fixup_end():

	for (nd = rb_next(prevnd); nd; nd = rb_next(nd)) {
                prev = curr;
                curr = rb_entry(nd, struct map, rb_node);
                prev->end = curr->start - 1;
        }

        /*
         * We still haven't the actual symbols, so guess the
         * last map final address.
         */
        curr->end = ~0UL;

I've noticed that if I change the symbol_conf.{use_modules,try_vmlinux_path} 
then I can get perf events for kernel symbols from /proc/kallsyms but nothing 
for the modules.

Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ