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: <20160920080557.5db69ddd16524ca6abcb3d83@kernel.org>
Date:   Tue, 20 Sep 2016 08:05:57 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Namhyung Kim <namhyung@...nel.org>,
        David Ahern <dsahern@...il.com>
Subject: Re: failed to add c++ probe

On Mon, 19 Sep 2016 11:54:02 +0200
Jiri Olsa <jolsa@...hat.com> wrote:

> hi,
> Thomas reported failure to add an uprobe on libstdc++.so.6 like:
> 
> [jolsa@...va perf]$ sudo ./perf probe -x /usr/lib64/libstdc++.so.6 'std::ostream::flush'
> Semantic error :There is non-digit char in line number.
>   Error: Command Parse Error.

Ah, I should start adding mangling support on perf probe...


> it does not work also if I use the mangled name like:
> 
> [jolsa@...va perf]$ sudo ./perf probe -x /usr/lib64/libstdc++.so.6 '_ZSt5flushIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_'
> Probe point '_ZSt5flushIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_' not found.
>   Error: Failed to add events.

Hmm, could you try to find mangled symbol from the library as below?

./perf probe -x /usr/lib64/libstdc++.so.6 -F \*

And also try to do adding probe with -v option again?

In my case, I could find the mangled symbol, but failed to setup the probe...

$ sudo ./perf probe -x /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -v _ZSt5flushIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_
probe-definition(0): _ZSt5flushIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_ 
symbol:_ZSt5flushIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_ file:(null) line:0 offset:0 return:0 lazy:(null)
0 arguments
symbol:catch file:(null) line:0 offset:0 return:0 lazy:(null)
symbol:throw file:(null) line:0 offset:0 return:0 lazy:(null)
symbol:rethrow file:(null) line:0 offset:0 return:0 lazy:(null)
Could not open debuginfo. Try to use symbols.
Opening /sys/kernel/debug/tracing//uprobe_events write=1
Writing event: p:probe_libstdc++/_ZSt5flushIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_ /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21:0x1114c0
Failed to write event: Invalid argument
  Error: Failed to add events. Reason: Invalid argument (Code: -22)

dmsg -k said;

[143725.339609] Failed to allocate trace_uprobe.(-22)
[143725.339612] Failed to parse address or file.

It seems we need to fix trace_uprobe.c at least.

Thank you!

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ