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:   Fri, 09 Nov 2018 15:22:28 -0800
From:   Joe Perches <joe@...ches.com>
To:     Rasmus Villemoes <linux@...musvillemoes.dk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jason Baron <jbaron@...mai.com>
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v3 04/23] linux/net.h: use unique identifier for each
 struct _ddebug

On Sat, 2018-11-10 at 00:10 +0100, Rasmus Villemoes wrote:
> Changes on x86-64 later in this series require that all struct _ddebug
> descriptors in a translation unit uses distinct identifiers. Realize
> that for net_dbg_ratelimited by generating such an identifier via
> __UNIQUE_ID and pass that to an extra level of macros.
> 
> No functional change.

Why does this require an extra indirection _<macro>?

> Cc: netdev@...r.kernel.org
> Acked-by: Jason Baron <jbaron@...mai.com>
> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
> ---
>  include/linux/net.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/net.h b/include/linux/net.h
> index 651fca72286c..397243a25f56 100644
> --- a/include/linux/net.h
> +++ b/include/linux/net.h
> @@ -260,7 +260,7 @@ do {								\
>  #define net_info_ratelimited(fmt, ...)				\
>  	net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__)
>  #if defined(CONFIG_DYNAMIC_DEBUG)
> -#define net_dbg_ratelimited(fmt, ...)					\
> +#define _net_dbg_ratelimited(descriptor, fmt, ...)			\
>  do {									\
>  	DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);			\
>  	if (DYNAMIC_DEBUG_BRANCH(descriptor) &&				\
> @@ -268,6 +268,8 @@ do {									\
>  		__dynamic_pr_debug(&descriptor, pr_fmt(fmt),		\
>  		                   ##__VA_ARGS__);			\
>  } while (0)
> +#define net_dbg_ratelimited(fmt, ...)					\
> +	_net_dbg_ratelimited(__UNIQUE_ID(ddebug), fmt, ##__VA_ARGS__)
>  #elif defined(DEBUG)
>  #define net_dbg_ratelimited(fmt, ...)				\
>  	net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ