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:	Tue, 17 Feb 2009 11:42:13 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Steven Rostedt <rostedt@...dmis.org>,
	Sam Ravnborg <sam@...nborg.org>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 00/15] [git pull] for tip/tracing/ftrace


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

> Ingo,
> 
> This is a patch series that offers a variety of features.
> 
> The first is to add:
> 
>  #### all functions enabled ####
> 
> to set_ftrace_filter when all functions will be traced when function
> tracing is on.
> 
> The next is to add a :command: interface, and the module command:
> 
>  echo '*:mod:ext4' > set_ftrace_filter
> 
> Will select all functions in the ext4 module.
> 
>  echo '!*write*:mod:ext4' > set_ftrace_filter
> 
> will remove all functions with the characters 'write' and are
> in ext4.

Very nice feature!

I'm wondering, would it be possible to somehow extend this to 
built-in drivers too, so that we get symmetry of usage 
independently of whether something is built in or a module? I 
suspect it needs some extensions to kbuild though ...

> Next we extend the :command: interface as well as add a way to
> hook tracers to specific functions. Instead of tracing all functions
> the same, this patch series adds a hash to be able to trace different
> functions differently.

That's a nice extension too!

Small naming detail: instead of calling it a 'hook' (which 
really has a bad sound to it for various reasons), how about 
calling it a 'trigger' and/or a 'callback'?

> I implement a 'traceon' and 'traceoff' to have a function 
> start or stop tracing when it is hit. It also includes a 
> counter for the number of times to implement the trace on/off.
> 
>  echo '*_lock:traceon:4' > set_ftrace_filter
>  echo '*_unlock:traceoff:5' > set_ftrace_filter

if there's no counter specified, does it default to 1 
[single-shot trigger] or infinity?

> This will have all functions that end with _lock turn on 
> tracing and all that end with _unlock disable it, 4 times 
> each.
> 
> The following patches are in:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> 
>     branch: tip/tracing/ftrace
> 
> 
> Steven Rostedt (15):
>       ftrace: state that all functions are enabled in set_ftrace_filter
>       ftrace: add do_for_each_ftrace_rec and while_for_each_ftrace_rec
>       ftrace: rename ftrace_match to ftrace_match_records
>       ftrace: break up ftrace_match_records into smaller components
>       ftrace: add module command function filter selection
>       ftrace: enable filtering only when a function is filtered on
>       ftrace: add command interface for function selection
>       ftrace: convert ftrace_lock from a spinlock to mutex
>       ftrace: consolidate mutexes
>       ftrace: trace different functions with a different tracer
>       ring-buffer: add tracing_is_on to test if ring buffer is enabled
>       ftrace: add traceon traceoff commands to enable/disable the buffers
>       ftrace: show selected functions in set_ftrace_filter
>       ftrace: add pretty print to selected fuction traces
>       ftrace: add pretty print function for traceon and traceoff hooks
> 
> ----
>  include/linux/ftrace.h         |   40 ++
>  include/linux/ring_buffer.h    |    2 +
>  kernel/trace/ftrace.c          |  929 +++++++++++++++++++++++++++++++---------
>  kernel/trace/ring_buffer.c     |    9 +
>  kernel/trace/trace_functions.c |  163 +++++++
>  5 files changed, 946 insertions(+), 197 deletions(-)

Pulled into tip:tracing/ftrace, thanks Steve!

	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