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 Nov 2015 22:13:24 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Frédéric Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...nel.org>, David Ahern <dsahern@...il.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Wang Nan <wangnan0@...wei.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: tracepoint filter problems

Em Mon, Nov 02, 2015 at 10:50:51AM +0100, Peter Zijlstra escreveu:
> On Thu, Oct 29, 2015 at 12:27:42PM -0300, Arnaldo Carvalho de Melo wrote:
> > In the example below 'perf trace' will ask to see just the 'open' syscall, and
> > it works for the started workload, namely 'perf record', but then it'll call
> > 'sleep 100000000000' and there the filter doesn't apply, bummer :-\

> > The inherit bit is set, sure, as we can see when adding -vv to the 'perf trace'
> > call, ideas?
 
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -6939,6 +6939,10 @@ static int perf_tp_filter_match(struct p
>  {
>  	void *record = data->raw->data;
>  
> +	/* only top level events have filters set */
> +	if (event->parent)
> +		event = event->parent;
> +
>  	if (likely(!event->filter) || filter_match_preds(event->filter, record))
>  		return 1;
>  	return 0;

Thank you!

Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>

  [root@...icio ~]# trace -e bpf,nanosleep perf record -e /tmp/foo.o sleep 1
     385.246 ( 0.062 ms): perf/13761 bpf(cmd: PROG_LOAD, uattr: 0x7ffd9900ac90, size: 48) = 3
    1424.278 (999.497 ms): sleep/13762 nanosleep(rqtp: 0x7ffd4583a6e0                   ) = 0
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.012 MB perf.data ]
  [root@...icio ~]#

- 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