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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87egtbv965.fsf@sejong.aot.lge.com>
Date:	Mon, 10 Nov 2014 15:53:06 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Jiri Olsa <jolsa@...hat.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 1/3] perf tools: Allow vmlinux to fallback to kallsyms on NO_LIBELF=1

On Fri, 7 Nov 2014 12:29:31 -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Nov 07, 2014 at 02:20:04PM +0900, Namhyung Kim escreveu:
>> When libelf is not used, perf cannot not show symbol names since it
>> doesn't access the ELF symbol table.  But kernel is different as it
>> can fallback to kallsyms.
>> 
>> It worked w/o libelf, but recent change to use vmlinux for kernel
>> symbols break it.
>> 
>> With this change, it now can show kernel symbols again:
>
> Ok, but since you added that minimal ELF symtab loading, isn't better to
> try that first, i.e. if we find a vmlinux file with a build-id and with
> symbols in it...
>
> If that isn't the case, i.e. no vmlinux was found, then we fallback to
> kallsyms, to check if that is available.
>
> I.e. with your new minimalistic ELF symtab loader if we have a suitable
> vmlinux but no kallsyms, we end up resolving no symbols even having that
> nice vmlinux :-)

Yeah, maybe.  But it'd add a substantial complexity also and I tried to
make it simple and small only to show usual userspace symbols.

I think that about a half of the complexity of the dso__load_sym() in
symbol-elf.c came from the kernel (and module) support.  And expecting
kallsyms on the system is not a high barrier IMHO.  So I decided to just
fall back to kallsyms for kernel dsos.  Mayby we can add the kernel
support incrementally later.

Thanks,
Namhyung
--
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