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]
Message-ID: <1468032048.8360.85.camel@perches.com>
Date:	Fri, 08 Jul 2016 19:40:48 -0700
From:	Joe Perches <joe@...ches.com>
To:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	mingo@...nel.org, luto@...nel.org, hpa@...or.com,
	peterz@...radead.org, brgerst@...il.com,
	torvalds@...ux-foundation.org, tglx@...utronix.de,
	luto@...capital.net, dvlasenk@...hat.com, fweisbec@...il.com,
	jpoimboe@...hat.com, bp@...e.de, bp@...en8.de,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/debug] printk: Make the printk*once() variants return
 a value

On Fri, 2016-07-08 at 05:08 -0700, tip-bot for Borislav Petkov wrote:
> printk: Make the printk*once() variants return a value
[]
> diff --git a/include/linux/printk.h b/include/linux/printk.h
[]
> @@ -108,11 +108,14 @@ struct va_format {
>   * Dummy printk for disabled debugging statements to use whilst maintaining
>   * gcc's format checking.
>   */
> -#define no_printk(fmt, ...)			\
> -do {						\
> -	if (0)					\
> -		printk(fmt, ##__VA_ARGS__);	\
> -} while (0)
> +#define no_printk(fmt, ...)				\
> +({							\
> +	do {						\
> +		if (0)					\
> +			printk(fmt, ##__VA_ARGS__);	\
> +	} while (0);					\
> +	0;						\
> +})

This change isn't described in the commit message and there
doesn't seem to be a need to change this.

And as statement expressions these no longer need
"do { <foo> } while (0)" this could have been be simplified to

#define no_printk(fmt, ...)
({
	if (0)
		printk(fmt, ##__VA_ARGS__);
})

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ