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]
Date:	Wed, 25 Feb 2009 08:01:51 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Peter Zijlstra <peterz@...radead.org>
cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Theodore Tso <tytso@....edu>,
	Arjan van de Ven <arjan@...radead.org>,
	Pekka Paalanen <pq@....fi>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Jason Baron <jbaron@...hat.com>,
	Martin Bligh <mbligh@...gle.com>,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Jens Axboe <jens.axboe@...cle.com>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 1/4] tracing: add DEFINE_TRACE_FMT to tracepoint.h


On Wed, 25 Feb 2009, Peter Zijlstra wrote:

> On Tue, 2009-02-24 at 21:56 -0500, Steven Rostedt wrote:
> 
> > +#define DEFINE_TRACE_FMT(name, proto, args, fmt)		\
> > +	DECLARE_TRACE(name, TPPROTO(proto), TPARGS(args))
> > +
> 
> If TPPROTO and TPARGS were anything but empty stubs, the above would add
> them twice, no?

I guess I can rename them too.

The problem comes from passing in more than one argument. If a proto or 
args has a comma, you get a nasty error about unmatched number of 
parameters.

I believe that they were purposely made to be empty stubs to allow for 
multiple parameters. But you are right, if that changes we need to fix it.

Since the above is only to protect against the substitution into multiple 
parameters, we could probably create a new macro name to just be

 #define PARAMS(args...) args
 #define DEFINE_TRACE_FMT(name, proto, args, fmt) \
	DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))

-- Steve

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