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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 3 Apr 2021 11:26:43 -0700
From:   John Johansen <john.johansen@...onical.com>
To:     Arnd Bergmann <arnd@...nel.org>, James Morris <jmorris@...ei.org>,
        "Serge E. Hallyn" <serge@...lyn.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] apparmor: avoid -Wempty-body warning

On 3/22/21 4:00 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> Building with 'make W=1' shows a warning for an empty macro:
> 
> security/apparmor/label.c: In function '__label_update':
> security/apparmor/label.c:2096:59: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
>  2096 |                 AA_BUG(labels_ns(label) != labels_ns(new));
> 
> Change the macro defintion to use no_printk(), which improves
> format string checking and avoids the warning.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Aked-by: John Johansen <john.johansen@...onical.com>

I have pulled it into the apparmor tree

> ---
>  security/apparmor/include/lib.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/include/lib.h b/security/apparmor/include/lib.h
> index 7d27db740bc2..67fbb81a11f3 100644
> --- a/security/apparmor/include/lib.h
> +++ b/security/apparmor/include/lib.h
> @@ -36,7 +36,7 @@
>  #define AA_BUG_FMT(X, fmt, args...)					\
>  	WARN((X), "AppArmor WARN %s: (" #X "): " fmt, __func__, ##args)
>  #else
> -#define AA_BUG_FMT(X, fmt, args...)
> +#define AA_BUG_FMT(X, fmt, args...) no_printk(fmt, ##args)
>  #endif
>  
>  #define AA_ERROR(fmt, args...)						\
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ