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:	Wed, 18 Jun 2008 09:08:12 -0700
From:	Greg KH <greg@...ah.com>
To:	Jason Baron <jbaron@...hat.com>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	joe@...ches.com, nick@...k-andrew.net, randy.dunlap@...cle.com
Subject: Re: [PATCH 2/8] dynamic debug - core infrastructure

On Fri, Jun 13, 2008 at 03:00:39PM -0400, Jason Baron wrote:
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -595,6 +595,22 @@ extern const char *dev_driver_string(struct device *dev);
>  #ifdef DEBUG
>  #define dev_dbg(dev, format, arg...)		\
>  	dev_printk(KERN_DEBUG , dev , format , ## arg)
> +#elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
> +#define dev_dbg(dev, format, ...) do {				    	     \
> +	static char mod_name[]						     \
> +	__attribute__((section("__verbose_strings")))			     \
> +	 = KBUILD_MODNAME;						     \
> +	static struct mod_debug foobar					     \
> +	__used								     \
> +	__attribute__((section("__verbose"), aligned(8))) =		     \
> +	{ mod_name, mod_name, "0", "0", NULL };				     \

Does the compiler merge all of these variables together into one within
the same file?

If not, should we have a new macro, one per file, for this information?

> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -14,6 +14,7 @@
>  #include <linux/compiler.h>
>  #include <linux/bitops.h>
>  #include <linux/log2.h>
> +#include <linux/dynamic_printk.h>
>  #include <asm/byteorder.h>
>  #include <asm/bug.h>
>  
> @@ -288,15 +289,86 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
>  #define pr_info(fmt, arg...) \
>  	printk(KERN_INFO fmt, ##arg)
>  
> -#ifdef DEBUG
> -/* If you are writing a driver, please use dev_dbg instead */

Hm, this comment is still correct, please don't delete it :)

Other than those minor nits, and the fact that your patch has a lot of
trailing whitespace, it's looking very good so far.

thanks,

greg k-h
--
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