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: <20090403115100.GH31399@elte.hu>
Date:	Fri, 3 Apr 2009 13:51:00 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Tom Zanussi <tzanussi@...il.com>, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 4/4] tracing/filters: use ring_buffer_discard_commit
	for discarded events


* Steven Rostedt <rostedt@...dmis.org> wrote:

> > [  240.462396]  [<ffffffff802c843b>] trace_function+0xab/0xc0
> 
> Oo, you have trace filters in trace_function. I'm not sure we want 
> that. If we do, please make it a separate function register. That 
> is, the function tracer is such a extreme hot path, that I would 
> like to avoid as many branch conditionals as possible. With the 
> dynamic function tracing, we can pick functions that do conditions 
> when we want them, and we can pick those that do not. If you look 
> at some of the register_ftrace_function callers, you will see 
> where I've picked different functions to be called by the tracer 
> depending on what the options are.

Actually, i like Tom's idea very much: as it allows pretty flexible 
context based filtering - not just function based filtering.

So we could filter for:

 -    a specific PID

 - or a pattern of ->comm strings ['bash' or 'sshd' or 'hackbench']

 - or we could filter for non-zero preempt-counts
   (i.e. critical sections only).

So this extends the function symbol based regexp mechanism in a 
quite natural way, and it would be sad to not do this just because 
it's ... arguably hard to implement robustly ;-)

The filter expression predicaments are pre-constructed and static at 
the point of execution, so they rely on no external facility other 
than some internal C code. So it should be possible to do this.

And if the tracepoint causes runtime overhead .. we need to optimize 
that. We could register a different, filter-aware mcount callback 
depending on whether there's any filter defined there.

	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