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: <20170105231630.f12a63432335b659d467fe14@kernel.org>
Date:   Thu, 5 Jan 2017 23:16:30 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH perf/core 3/3] perf-probe: Fix to probe on gcc generated
 functions in modules

On Thu, 5 Jan 2017 20:20:19 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:

> On Wed, 4 Jan 2017 11:48:56 -0300
> Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> 
> > Em Wed, Jan 04, 2017 at 12:31:39PM +0900, Masami Hiramatsu escreveu:
> > > Fix to probe on gcc generated functions on modules. Since
> > > probing on a module is based on its symbol name, it should
> > > be adjusted on actual symbols.
> > > 
> > > E.g. without this fix, perf probe shows probe definition
> > > on non-exist symbol as below.
> > >   -----
> > >   $ perf probe -m build-x86_64/net/netfilter/nf_nat.ko -F in_range*
> > >   in_range.isra.12
> > >   $ perf probe -m build-x86_64/net/netfilter/nf_nat.ko -D in_range
> > >   p:probe/in_range nf_nat:in_range+0
> > >   -----
> > > With this fix, perf probe correctly shows a probe on
> > > gcc-generated symbol.
> > >   -----
> > >   $ perf probe -m build-x86_64/net/netfilter/nf_nat.ko -D in_range
> > >   p:probe/in_range nf_nat:in_range.isra.12+0
> > >   -----
> > 
> > Tested this one on a x86-64 fedora25 system, applied all three.
> > 
> > As always, please take a look at the patch when sent to Ingo, I usually
> > put some committer notes there, in this case I put the test steps I
> > performed, using e1000e.ko and e1000_flash_cycle_ich8lan.constprop.22
> > 
> > BTW, it would be cool if...
> > 
> > Oops, I retract that, while I was testing what I was went to ask you to
> > implement, I saw that this last patch broke this use case:
> > 
> > [root@...et ~]# perf probe -m e1000e e1000_xmit_frame
> > Failed to get ELF symbols for e1000e
> > Probe point 'e1000_xmit_frame' not found.
> >   Error: Failed to add events.
> > [root@...et ~]#
> 
> Oops, I missed that case.
> However, when I trided to fix that on fedora25,
> 
> $ perf probe -m i915 -vD assert_plane
> probe-definition(0): assert_plane
> symbol:assert_plane file:(null) line:0 offset:0 return:0 lazy:(null)
> 0 arguments
> No kprobe blacklist support, ignored
> Failed to get build-id from i915.
> Cache open error: -1
> Open Debuginfo file: /lib/modules/4.8.15-300.fc25.x86_64/kernel/drivers/gpu/drm/i915/i915.ko.xz
> Try to find probe point from debuginfo.
> Matched function: assert_plane [6fb806]
> found inline addr: 0x886a0
> Probe point found: assert_plane+0
> Found 1 probe_trace_events.
> text offset: 10030
> Failed to get ELF symbols for /lib/modules/4.8.15-300.fc25.x86_64/kernel/drivers/gpu/drm/i915/i915.ko.xz
> Post processing failed or all events are skipped. (-22)
> Probe point 'assert_plane' not found.
>   Error: Failed to add events. Reason: No such file or directory (Code: -2)
> 
> As far as I can see, elfutils's libdw supports compressed file, but
> libelf API (perf's API) seems not supporting it. This results in
> succeeding opening debuginfo, but failing ELF symbols.

Sorry, this is my fault, perf's map already supported that.
Anyway, I can get ELF headers from debuginfo. However, I'm still
trying to fix an text section offset issue in modules.

Thanks,

-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ