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  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, 31 Aug 2018 23:49:11 +0200
From:   Rasmus Villemoes <linux@...musvillemoes.dk>
To:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org,
        Eli Friedman <efriedma@...eaurora.org>,
        Christopher Li <sparse@...isli.org>,
        Kees Cook <keescook@...omium.org>,
        Ingo Molnar <mingo@...nel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Joe Perches <joe@...ches.com>,
        Dominique Martinet <asmadeus@...ewreck.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH 2/7] Compiler Attributes: use the no-underscores syntax

On 2018-08-31 19:05, Miguel Ojeda wrote:
> The attribute syntax optionally allows to surround attribute names
> with "__" in order to avoid collisions with macros of the same name
> (see https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html).
> 
> This homogenizes all attributes to use the syntax without underscores.

At the risk of bikeshedding, why not the other way around, exactly
because of what you write above? We have convenience macros anyway, so
those verbose leading/trailing underscores would only be in compiler*.h,
and some of the attribute names are common words that can appear as
#defines. E.g. error is defined
drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c ; if that used a
BUILD_BUG_ON somewhere, the

#define __compiletime_error(message) __attribute__((error(message)))

would break.

Rasmus

Powered by blists - more mailing lists