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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090507113217.GK28398@elte.hu>
Date:	Thu, 7 May 2009 13:32:17 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH 3/5] tracing/events: add rcu locking around trace event
	prints


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

> Somehow this patch got dropped. I believe Ted's work requires it.
> 
> I'm not sure if we need to include rcupdate.h or not to use 
> rcu_read_lock. I think it may be fine to include it in ftrace.h. 
> 
> Jeremy, does this patch effect anything that you are doing?
> 
> -- Steve
> 
> On Wed, 15 Apr 2009, Steven Rostedt wrote:
> 
> > From: Steven Rostedt <srostedt@...hat.com>
> > 
> > Some trace events need to have a way to print out data that his
> > allocated, but will be freed later. Using a function that can allocate
> > memory, and free it with call_rcu, can be useful.
> > 
> > This patch adds rcu locking around the print part of the TRACE_EVENT
> > macro to facilitate this.
> > 
> > Reported-by: Theodore Tso <tytso@....edu>
> > Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> > ---
> >  include/trace/ftrace.h |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
> > index 60c5323..6fb06bd 100644
> > --- a/include/trace/ftrace.h
> > +++ b/include/trace/ftrace.h
> > @@ -62,7 +62,9 @@
> >   *
> >   *	field = (typeof(field))entry;
> >   *
> > + *	rcu_read_lock();
> >   *	ret = trace_seq_printf(s, <TP_printk> "\n");
> > + *	rcu_read_unlock();
> >   *	if (!ret)
> >   *		return TRACE_TYPE_PARTIAL_LINE;
> >   *
> > @@ -99,7 +101,9 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags)	\
> >  									\
> >  	field = (typeof(field))entry;					\
> >  									\
> > +	rcu_read_lock();						\
> >  	ret = trace_seq_printf(s, #call ": " print);			\
> > +	rcu_read_unlock();						\
> >  	if (!ret)							\
> >  		return TRACE_TYPE_PARTIAL_LINE;				\

Hm, this patch adds usage for RCU primitives, but doesnt include 
rcupdate.h.

	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