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:	Wed, 12 May 2010 16:57:52 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Masami Hiramatsu <mhiramat@...hat.com>
Cc:	rostedt@...dmis.org, Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 11/11] Uprobes traceevents patch.

On Thu, Apr 01, 2010 at 12:16:56AM -0400, Masami Hiramatsu wrote:
> Hi Steven,
> 
> Steven Rostedt wrote:
> > On Wed, 2010-03-31 at 21:23 +0530, Srikar Dronamraju wrote:
> > 
> >>  libftrace-y := ftrace.o
> >> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
> >> index 2825ef2..9fe02ab 100644
> >> --- a/kernel/trace/trace.h
> >> +++ b/kernel/trace/trace.h
> >> @@ -126,6 +126,18 @@ struct kretprobe_trace_entry {
> >>  	(offsetof(struct kretprobe_trace_entry, args) +	\
> >>  	(sizeof(unsigned long) * (n)))
> >>  
> >> +struct uprobe_trace_entry {
> >> +	struct trace_entry	ent;
> >> +	pid_t			pid;
> > 
> > Unless pid is not the current pid, ent already records it.
> 
> Indeed.
> 
> >> +	unsigned long		ip;
> >> +	int			nargs;
> >> +	unsigned long		args[];
> >> +};
> > 
> > Note, you want to really add this to trace_entries.h instead:
> > 
> > FTRACE_ENTRY(uprobe, uprobe_trace_entry,
> > 
> > 	TRACE_GRAPH_ENT,
> > 
> > 	F_STRUCT(
> > 		__field(	unsigned long,	ip	)
> > 		__field(	int,		nargs	)
> > 		__dynamic_array(unsigned long,	args	)
> > 	),
> > 
> > 	F_printk("%lx nrargs:%u", __entry->ip, __entry->nargs)
> > );
> > 
> > 
> > This will put this event into the events/ftrace directory. Don't worry
> > about the printk format, we can write a plugin for it to override it if
> > need be.
> 
> Hmm, interesting idea. But this dynamic event definition allows us
> to filter events based on each argument value.
> 
> As you can see this code, 
> 
> >> +struct probe_arg {
> >> +	struct fetch_func	fetch;
> >> +	const char		*name;
> >> +};
> 
> each argument can have unique name. Therefore user can write a filter
> by using these names.
> 
> Moreover, dynamic events (at least kprobe-tracer) are going to support
> 'types' for each argument. this means that the arg[] in *probe_trace_entry
> will be no longer an unsigned long array.
> 
> Thank you,


Yeah, I don't think we should FTRACE_ENTRY for that. The format files for
[k|u]probes events are created dynamically on top of what the user requested,
which is a very nice feature.

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