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-next>] [day] [month] [year] [list]
Message-Id: <1254424323.1799.84.camel@Joe-Laptop.home>
Date:	Thu, 01 Oct 2009 12:12:03 -0700
From:	Joe Perches <joe@...ches.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>
Subject: [RFC PATCH] kernel.h: Add pr_debug_noopt

Many times a developer always wants to emit a KERN_DEBUG level
logging message even if DEBUG is not defined.

These messages today do not have a "pr_<level>" equivalent
and must be coded with printk(KERN_DEBUG.

This means that pr_fmt is not used with these logging messages.

I propose a new shortcut #define pr_<level> be added to kernel.h
to handle these KERN_DEBUG cases not prefixed with pr_fmt.

I'm not happy with the name.  Some good alternatives are
already in use in a couple of places.

pr_dbg is #defined in drivers/char/isicom.c
pr_vdebug is #defined in drivers/usb/gadget/u_serial.c

I think it's appropriate to remove and substitute one
or both of these #defines from the files in drivers
and use one or both in kernel.h

Suggestions?

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index d3cd23f..f1f53b9 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -380,6 +380,8 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
         printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
 #define pr_info(fmt, ...) \
         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_debug_noopt(fmt, ...) \
+	printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
 #define pr_cont(fmt, ...) \
 	printk(KERN_CONT fmt, ##__VA_ARGS__)
 


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