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, 6 Sep 2010 15:54:56 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Pekka Enberg <penberg@...nel.org>
Cc:	Avi Kivity <avi@...hat.com>, Pekka Enberg <penberg@...helsinki.fi>,
	Tom Zanussi <tzanussi@...il.com>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-perf-users@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: disabling group leader perf_event


* Pekka Enberg <penberg@...nel.org> wrote:

> On 09/06/2010 03:43 PM, Ingo Molnar wrote:
> >> > Yes. The filter engine is a safe, in-kernel interpreted language in
> >> > the making. The C syntax was chosen because it's close to the heart
> >> > of every kernel developer.
> >> >
> * Avi Kivity <avi@...hat.com> wrote:
> >> > It might make sense to bring this concept a few steps further. Looks
> >> > rather complex but also rather cool ...
> >>
> >> Is this a roundabout way of saying "jit"?
> 
> On Mon, Sep 6, 2010 at 3:59 PM, Ingo Molnar <mingo@...e.hu> wrote:
> > Partly. I'm not sure we want to actually upload programs in bytecode
> > form. ASCII is just fine - just like a .gz Javascript is fine for web
> > apps. (and in most cases compresses down better than the bytecode
> > equivalent)
> >
> > So a clear language (the simpler initially the better) plus an in-kernel
> > compiler.
> >
> > This could be used for far more than just instrumentation: IMO security
> > policies could be expressed in such a way. (Simplified, they are quite
> > similar to filters installed on syscall entry/exit, with the ability of
> > the filter to influence whether the syscall is performed.)
> 
> Filter engine? I've never heard of it before. Where does it live?

It's in kernel/trace/trace_events_filter.c, and currently bound to trace 
events - but that is just an implementational detail really.

It allows us to do things like:

   perf record -a -g -e sched:sched_switch \
              --filter "prev_pid == 0 && prev_prio == 120" sleep 10

This profiles context switches that go into the idle task from 
SCHED_NORMAL tasks (and excludes all other types of context switches). 
I.e. this counts 'go idle' events and excludes all other types of 
context switches.

You can also see/use it via /debug/tracing/events/*/*/filter. Allowed 
fields are those that are named in /debug/tracing/events/*/*/format.

Thanks,

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