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:   Tue, 11 Apr 2023 17:24:08 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Petr Vorel <pvorel@...e.cz>
Cc:     Kevin Brodsky <kevin.brodsky@....com>,
        linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
        Masahiro Yamada <masahiroy@...nel.org>,
        Sam Ravnborg <sam@...nborg.org>,
        Petr Vorel <petr.vorel@...il.com>,
        Ruben Ayrapetyan <ruben.ayrapetyan@....com>
Subject: Re: [PATCH RESEND] uapi/linux/const.h: Prefer ISO-friendly
 __typeof__

On Tue, 11 Apr 2023 23:39:46 +0200 Petr Vorel <pvorel@...e.cz> wrote:

> > Hi Kevin,
> 
> > > typeof is (still) a GNU extension, which means that it cannot be
> > > used when building ISO C (e.g. -std=c99). It should therefore be
> > > avoided in uapi headers in favour of the ISO-friendly __typeof__.
> 
> > IMHO UAPI are built with -std=c90 -Wall -Werror=implicit-function-declaration
> > (see usr/include/Makefile).
> > But one or the other, you're right both require __typeof__.
> 
> > "If you are writing a header file that must work when included in ISO C
> > programs, write __typeof__ instead of typeof."
> > https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Typeof.html
> 
> > Reviewed-by: Petr Vorel <pvorel@...e.cz>
> > Tested-by: Petr Vorel <pvorel@...e.cz>
> 
> IMHO problem was introduced when -std=c90 was added (back then the code was in
> include/uapi/linux/kernel.h).

Well...  what actually _is_ the problem?  Presumably build issues under
some circumstances.  Could we please see an instance of those issues
and a description of the circumstances under which they occur?

> Fixes: d6fc9fcbaa65 ("kbuild: compile-test exported headers to ensure they are self-contained")

Might need a cc:stable, depending on the answers to the above.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ