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: <20220516131023.GA2329080@roeck-us.net>
Date:   Mon, 16 May 2022 06:10:23 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     linux-kbuild@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Masahiro Yamada <masahiroy@...nel.org>, llvm@...ts.linux.dev,
        Jonathan Corbet <corbet@....net>,
        Federico Vaga <federico.vaga@...a.pv.it>,
        Alex Shi <alexs@...nel.org>, Hu Haowen <src.res@...il.cn>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-doc-tw-discuss@...ts.sourceforge.net,
        linux-arm-kernel@...ts.infradead.org,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        greybus-dev@...ts.linaro.org, linux-staging@...ts.linux.dev,
        linux-btrfs@...r.kernel.org
Subject: Re: [PATCH] [v2] Kbuild: move to -std=gnu11

On Mon, Feb 28, 2022 at 11:27:43AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> During a patch discussion, Linus brought up the option of changing
> the C standard version from gnu89 to gnu99, which allows using variable
> declaration inside of a for() loop. While the C99, C11 and later standards
> introduce many other features, most of these are already available in
> gnu89 as GNU extensions as well.

The downside is that backporting affected patches to older kernel branches
now fails with error messages such as

mm/kfence/core.c: In function ‘kfence_init_pool’:
mm/kfence/core.c:595:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

Just something to keep in mind when writing patches.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ