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:	Sat, 9 Jun 2007 22:03:18 +0400
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Jack Stone <jack@...keye.stone.uk.eu.org>
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com,
	Ian Kent <raven@...maw.net>
Subject: Re: [PATCH 6/7] Add pr_debug_pid to kernel.h

On Sat, Jun 09, 2007 at 09:18:36AM +0100, Jack Stone wrote:
> This patch adds a new function to kernel.h. This function prints out the
> pid of the current process and the name of the function where it was
> called from followed by the debug message and a newline.

NO! We don't add macros for every debug format people use into core
headers. I think you should stop after pr_err().

> --- linux.orig/include/linux/kernel.h
> +++ linux/include/linux/kernel.h
> @@ -228,6 +228,8 @@ extern void print_hex_dump(const char *l
>  /* If you are writing a driver, please use dev_dbg instead */
>  #define pr_debug(fmt,arg...) \
>  	printk(KERN_DEBUG fmt,##arg)
> +#define pr_debug_pid(fmt,arg...) \
> +	printk(KERN_DEBUG "pid %d: %s: " fmt "\n" , current->pid ,
> __FUNCTION__, ##args)
>  #define pr_err(fmt,arg...) \
>  	printk(KERN_ERR fmt,##arg)
>  #else
> @@ -236,6 +238,11 @@ static inline int __attribute__ ((format
>  	return 0;
>  }
> 
> +static inline int __attribute__ ((format (printf, 1, 2)))
> pr_debug_pid(const char * fmt, ...)
> +{
> +	return 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