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:	Tue, 10 Mar 2009 16:29:50 +0100 (CET)
From:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
To:	Martin Schwidefsky <schwidefsky@...ibm.com>
cc:	Stephen Rothwell <sfr@...b.auug.org.au>, Greg KH <greg@...ah.com>,
	linux-next@...r.kernel.org, Jason Baron <jbaron@...hat.com>,
	Greg Banks <gnb@....com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Linux Kernel Development <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: driver-core tree build failure

On Tue, 10 Mar 2009, Martin Schwidefsky wrote:
> On Tue, 10 Mar 2009 14:31:17 +0100 (CET)
> Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com> wrote:
> 
> > crypto/zlib.c has:
> > 
> >     #define pr_fmt(fmt)     "%s: " fmt, __func__
> > 
> > If CONFIG_DYNAMIC_DEBUG is set, include/linux/kernel.h has:
> > 
> > #define pr_debug(fmt, ...) do { \
> > 	dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
> > 	} while (0)
> > 
> > include/linux/dynamic_debug.h has:
> > 
> > #define dynamic_pr_debug(fmt, ...) do {					\
> > 	static struct _ddebug descriptor				\
> > 	__used								\
> > 	__attribute__((section("__verbose"), aligned(8))) =		\
> > 	{ KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH,	\
> > 		DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT };	\
> > 	if (__dynamic_dbg_enabled(descriptor))				\
> > 		printk(KERN_DEBUG KBUILD_MODNAME ":" fmt,		\
> > 				##__VA_ARGS__);				\
> > 	} while (0)
> 
> The dynamic_pr_debug macro currently works only with pr_fmt definitions
> that do not add additional parameters. The way how we use the pr_fmt
> macro is:
> 
> #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
> 
> The same could be done with the problematic pr_fmt definition:
> 
> #define pr_fmt(fmt)     __func__ ": " fmt

No, that also doesn't work:

| crypto/zlib.c:150: error: expected '}' before string constant
| crypto/zlib.c:150: error: expected ')' before '__func__'
| crypto/zlib.c:162: error: expected '}' before string constant
| crypto/zlib.c:162: error: expected ')' before '__func__'
| crypto/zlib.c:166: error: expected '}' before string constant
| crypto/zlib.c:166: error: expected ')' before '__func__'
| crypto/zlib.c:170: error: expected '}' before string constant
| crypto/zlib.c:170: error: expected ')' before '__func__'

> > BTW, Martin: Is `#define pr_fmt(fmt)     "%s: " fmt, __func__' a valid and
> > intended usage of your pr_fmt() infrastructure?
> 
> The indended use is a simple prefix to the format string. To paste an
> additional parameter is an interesting use of the pr_fmt macro ..

Bummer, I was so happy I could do things like

| #define pr_fmt(fmt)	"%s:%u: " fmt, __func__, __LINE__

...

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@...ycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
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