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: <529C9EC0.70607@gmail.com>
Date:	Mon, 02 Dec 2013 07:52:48 -0700
From:	David Ahern <dsahern@...il.com>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
CC:	acme@...stprotocols.net, linux-kernel@...r.kernel.org,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	"yrl.pp-manager.tt@...achi.com" <yrl.pp-manager.tt@...achi.com>
Subject: Re: [PATCH 1/2] perf probe: Improve error message when function not
 found

On 12/1/13, 10:59 PM, Masami Hiramatsu wrote:
> (2013/12/02 9:07), David Ahern wrote:
>> When requesting a function from a userspace library the error message to
>> the user is less than helpful. e.g.,
>>
>>      perf probe -x /lib64/libpthread-2.14.90.so -a 'lock_full=__pthread_mutex_lock_full'
>>      no symbols found in /lib64/libpthread-2.14.90.so, maybe install a debug package?
>>      Failed to load map.
>>         Error: Failed to add events. (-22)
>>
>> In this cae the symbol really does exist but is a local symbol which is
>> filtered:
>>
>>      nm /lib64/libpthread-2.14.90.so | grep __pthread_mutex_lock_full
>>      0000000000005700 t __pthread_mutex_lock_full
>>
>> With this patch:
>>      perf probe -x /lib64/libpthread-2.14.90.so -a 'lock_full=__pthread_mutex_lock_full'
>>
>>      no symbols found in /lib64/libpthread-2.14.90.so, maybe install a debug package?
>>      Failed to find function in /lib64/libpthread-2.14.90.so. Perhaps it is a local variable?
> 
> Hmm, indeed current message is too less information, but your message looks
> wired. I think just showing "Failed to find requested symbol in %s" is enough. :)

I disagree. perf-probe filters non-global variables:

    if (sym->binding == STB_GLOBAL &&
        strfilter__compare(available_func_filter, sym->name))
        return 0;

That needs to be explicitly stated in the error message -- only global
symbols may be given.

Between the 2 original error messages I wasted 2 hours strace'ing perf
looking at files -- including all the debuginfo variants -- that perf
opens. nm/objdump and every other tool sees the symbols yet perf throws
out bizarre error messages -- "no symbols found in ..." and "Failed to
load map". Let's fix those messages with something meaningful.

David
--
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