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: <20170111005459.9e003bbe56ecc7213cc97e49@kernel.org>
Date:   Wed, 11 Jan 2017 00:54:59 +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 4/4] perf-probe: Find probe events without
 target module

On Sat,  7 Jan 2017 14:28:42 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:

> Find probe events without -m "module" option. If perf-probe
> failed to find given function in kernel image, it tries to
> find same symbol and module in kallsyms, and retry search
> in the found module. E.g.
> 
>   # perf probe -D i915_capabilities
>   p:probe/i915_capabilities i915:i915_capabilities+0
> 
> Note: without -m option, perf probe can not find inlined
> function since there is no symbol information in kallsyms.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> Suggested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
>  tools/perf/util/probe-event.c |   74 ++++++++++++++++++++++++++++++-----------
>  1 file changed, 55 insertions(+), 19 deletions(-)
> 
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 6a6f44d..09bd093 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -858,11 +858,7 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
>  
>  	debuginfo__delete(dinfo);
>  
> -	if (ntevs == 0)	{	/* No error but failed to find probe point. */
> -		pr_warning("Probe point '%s' not found.\n",
> -			   synthesize_perf_probe_point(&pev->point));
> -		return -ENOENT;
> -	} else if (ntevs < 0) {
> +	if (ntevs < 0) {
>  		/* Error path : ntevs < 0 */
>  		pr_debug("An error occurred in debuginfo analysis (%d).\n", ntevs);
>  		if (ntevs == -EBADF)
> @@ -2073,8 +2069,10 @@ static int find_perf_probe_point_from_map(struct probe_trace_point *tp,
>  	} else {
>  		if (tp->symbol && !addr) {
>  			if (kernel_get_symbol_address_by_name(tp->symbol,
> -						&addr, true, false) < 0)
> +						&addr, true, false) < 0) {
> +				ret = 0;
>  				goto out;

Oops, I've found that this is not needed and breaks --list result.
I'll update it.

Thanks.


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ