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:	Thu, 18 Nov 2010 07:22:11 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Darren Hart <dvhart@...ux.intel.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"jason.wessel" <jason.wessel@...driver.com>,
	Ted Ts'o <tytso@....edu>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [RFC][PATCH 2/2] [PATCH 2/2] tracing: Make event based
 trace_printk()

On Thu, 2010-11-18 at 13:50 +0800, Lai Jiangshan wrote:
> On 11/18/2010 11:58 AM, Steven Rostedt wrote:
> > +#define trace_printk(fmt, args...)					\
> > +	do {								\
> > +		static struct event_printk_struct			\
> > +		__attribute__((__aligned__(4)))				\
> > +		__attribute__((section("_trace_printk")))		\
> > +		______t = {						\
> > +			.format = fmt,					\
> 
> if fmt is not constant, the compiler will complain...

Ah you are right. I added that after I wrote all this code and wanted
the format to print in the file. The original code required the compile
check below.

-- Steve

> 
> > +			.func = __func__,				\
> > +			.file = __FILE__,				\
> > +			.line = __LINE__,				\
> > +		};							\
> > +		__trace_printk_check_format(fmt, ##args);		\
> > +		if (!__builtin_constant_p(fmt))				\
> > +			trace_printk_can_only_have_constant_format();	\
> 
> so this is not need.
> 
> > +		if (unlikely(__event_printk_test(&______t.enable)))	\
> > +			__trace_bprintk(_THIS_IP_, fmt, ##args); \
> > +	} while (0)


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