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: <d60047d0-5b0c-4c1e-b656-b7cbc236b23c@app.fastmail.com>
Date:   Fri, 06 Jan 2023 21:58:02 +0100
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Kees Cook" <keescook@...omium.org>,
        "Vincent MAILHOL" <mailhol.vincent@...adoo.fr>
Cc:     "Jann Horn" <jannh@...gle.com>,
        "David S . Miller" <davem@...emloft.net>,
        "Jakub Kicinski" <kuba@...nel.org>, "Andrew Lunn" <andrew@...n.ch>,
        "kernel test robot" <lkp@...el.com>,
        "Oleksij Rempel" <linux@...pel-privat.de>,
        "Sean Anderson" <sean.anderson@...o.com>,
        "Alexandru Tachici" <alexandru.tachici@...log.com>,
        "Amit Cohen" <amcohen@...dia.com>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Netdev <netdev@...r.kernel.org>, linux-kernel@...r.kernel.org,
        linux-hardening@...r.kernel.org,
        "Linux API" <linux-api@...r.kernel.org>
Subject: Re: minimum compiler for Linux UAPI (was Re: [PATCH v3] ethtool: Replace
 0-length array with flexible array)

On Fri, Jan 6, 2023, at 21:13, Kees Cook wrote:
> On Fri, Jan 06, 2023 at 11:25:14PM +0900, Vincent MAILHOL wrote:
>> On Fri. 6 Jan 2023 at 22:19, Jann Horn <jannh@...gle.com> wrote:
>> 
>>   What are the minimum compiler requirements to build a program using
>> the Linux UAPI?
>
> You're right -- we haven't explicitly documented this. C99 seems like
> the defacto minimum, though.
>
>> And, after research, I could not find the answer. The requirements to
>> build the kernel are well documented:
>> 
>>   https://docs.kernel.org/process/changes.html#changes
>> 
>> But no clue for the uapi. I guess that at one point in 2006, people
>> decided that it was time to set the minimum requirement to C99. Maybe
>> this matches the end of life of the latest pre-C99 GCC version? The
>> detailed answer must be hidden somewhere on lkml.
>
> I would make the argument that the requirements for building Linux UAPI
> should match that of building the kernel...

I think it's a bit more nuanced than that: glibc does not require
C99 but does include some kernel headers from generic library
headers, so I would not make the assumption that it's always
safe to use C99 features. On the other hand, Linux specific
device drivers whose header is only really used from one
application are free to make assumptions about the toolchain.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ