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:	Mon, 2 Mar 2015 23:45:12 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc:	Naohiro Aota <naota@...sp.net>,
	Peter Zijlstra <peterz@...radead.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>, namhyung@...nel.org,
	Jiri Olsa <jolsa@...hat.com>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH perf/core 2/4] perf-probe: Fix to handle aliased symbols
 in glibc

Em Tue, Mar 03, 2015 at 11:39:02AM +0900, Masami Hiramatsu escreveu:
> (2015/03/03 0:46), Arnaldo Carvalho de Melo wrote:
> > Em Mon, Mar 02, 2015 at 09:49:53PM +0900, Masami Hiramatsu escreveu:
> >> With this patch;
> >>   -----
> >>   # ./perf probe -x /usr/lib64/libc-2.17.so -V malloc
> >>   Available variables at malloc
> >>           @<__libc_malloc+0>
> >>                   size_t  bytes
> >>   # ./perf probe -x /usr/lib64/libc-2.17.so -a "malloc bytes"
> >>   Added new event:
> >>     probe_libc:malloc    (on malloc in /usr/lib64/libc-2.17.so with bytes)
> >>
> >>   You can now use it in all perf tools, such as:
> >>
> >>           perf record -e probe_libc:malloc -aR sleep 1
> > 
> >> Reported-by: Arnaldo Carvalho de Melo <acme@...nel.org>
> > 
> > Humm, not working for me, after the patch:
> > 
> > [root@...andy ~]# perf probe -x /usr/lib64/libc-2.17.so -V malloc
> > Available variables at malloc
> >         @<__malloc_check_init+96>
> >                 (No matched variables)
> 

Will try after a 'make build-test' finishes for the current batch

> > [root@...andy ~]#
> > 
> > And then the one asking for 'bytes' to be collectd fails.
> > 
> > After processing the other patches I'll try to debug this...
> > 
> > [root@...andy ~]# cat /etc/redhat-release 
> > Red Hat Enterprise Linux Server release 7.0 (Maipo)
> > [root@...andy ~]# rpm -q glibc glibc-debuginfo
> > glibc-2.17-55.el7_0.3.x86_64
> > glibc-debuginfo-2.17-55.el7_0.1.x86_64
>                               ^^^ why is this different from the glibc version??
> 
> > [root@...andy ~]#
> > [acme@...andy linux]$ readelf -Ws /usr/lib64/libc-2.17.so| grep malloc
> [...]
> >   4849: 0000000000080050   107 FUNC    LOCAL  DEFAULT   12 __malloc_check_init
> 
> __malloc_check_init+96(0x60) becomes 0x80050 + 0x60 = 0x800b0
> 
> >   5351: 00000000000800c0   245 FUNC    LOCAL  DEFAULT   12 __malloc
> >   1170: 00000000000800c0   245 FUNC    GLOBAL DEFAULT   12 malloc@@GLIBC_2.2.5
> 
> that is not 0x800c0, so something goes wrong when translating the address
> to probe point. Could you check the patch 1/4 was applied?
> Actually there is a bug in the routine which gets the probe point from
> address. 1/4 fixes it.

This one?

commit 0104fe69e0287cf3635657b4c6b26a18e0091697
Author: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Date:   Mon Mar 2 21:49:46 2015 +0900

    perf probe: Remove bias offset to find probe point by address
    
    Remove bias offset to find probe point by address.

----------------

Yes, it is applied.

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