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: <55F8501C.1080108@siemens.com>
Date:	Tue, 15 Sep 2015 19:06:36 +0200
From:	Jan Kiszka <jan.kiszka@...mens.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] trace-cmd: Leave out absolute addresses to fix bogus
 symbol resolutions

On 2015-09-15 19:00, Steven Rostedt wrote:
> On Tue, 15 Sep 2015 18:30:22 +0200
> Jan Kiszka <jan.kiszka@...mens.com> wrote:
> 
>> On 2015-07-31 16:04, Jan Kiszka wrote:
>>> On x86, page_fault_* tracepoints report userspace address via kernel
>>> symbols because all the per-cpu variable offsets are in kallsyms,
>>> occupying the lower address space. Fix this by skipping over absolute
>>> addresses while processing kallsyms.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@...mens.com>
>>> ---
>>>  trace-util.c | 8 ++++++--
>>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/trace-util.c b/trace-util.c
>>> index 8a81dd0..da20e4c 100644
>>> --- a/trace-util.c
>>> +++ b/trace-util.c
>>> @@ -434,8 +434,12 @@ void parse_proc_kallsyms(struct pevent *pevent,
>>>  		if (mod)
>>>  			mod[strlen(mod) - 1] = 0;
>>>  
>>> -		/* Hack for arm arch that adds a lot of bogus '$a' functions */
>>> -		if (func[0] != '$')
>>> +		/*
>>> +		 * Hacks for
>>> +		 *  - arm arch that adds a lot of bogus '$a' functions
>>> +		 *  - x86-64 that reports per-cpu variable offsets as absolute
>>> +		 */
>>> +		if (func[0] != '$' && ch != 'A')
>>>  			pevent_register_function(pevent, func, addr, mod);
>>>  		free(func);
>>>  		free(mod);
>>>
>>
>> Ping.
> 
> Thanks for the reminder ping.
> 
> Hmm, I don't see anything marked 'A' in my kallsyms. Have a config I
> can test to see what you are seeing?

Huh? Your /proc/kallsyms doesn't start like this?

0000000000000000 A irq_stack_union
0000000000000000 A __per_cpu_start
...

That's from a stock distro SUSE kernel I'm running (config attached).

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

Download attachment "config-4.2.0-4.g9f67920-desktop.xz" of type "application/x-xz" (35516 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ