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  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, 12 Mar 2009 23:08:19 -0400 (EDT)
From:	Steven Rostedt <>
To:	Andrew Morton <>
cc:, Ingo Molnar <>,
	Peter Zijlstra <>,
	Frederic Weisbecker <>,
	Lai Jiangshan <>,
	KOSAKI Motohiro <>,
	Steven Rostedt <>
Subject: Re: [PATCH 08/16] tracing: have event_trace_printk use static

On Thu, 12 Mar 2009, Andrew Morton wrote:

> On Thu, 12 Mar 2009 22:37:12 -0400 Steven Rostedt <> wrote:
> > +		static const char *trace_printk_fmt			\
> > +		  __attribute__((section("__trace_printk_fmt"))) =	\
> > +			__builtin_constant_p(fmt) ? fmt : NULL;		\
> hm.  Does this put trace_printk_fmt into the __trace_printk_fmt
> section, or does it put *trace_printk_fmt in there?

We save the pointer into that section:

 0xc0432100:   "my format is to print this number %d\n"


section <__trace_printk_fmt>:
 0xc0483210:   0xc0432100  (trace_printk_fmt)

It would be difficult to make the string be located in the section when 
the caller simply does:

   trace_printk("my format is to print this number %d\n", mynum);

Although I guess we could try by using [] = fmt, but the pointer just 
seemed easier.

Note, for modules, we have a hash of all strings/pointers. When a module 
is loaded, we copy the strings into the hash (if it is not already there) 
and keep it loaded, even if the module is removed. This is because the 
pointer to this string would still be around inside the trace buffer.

-- Steve

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists