From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC5D5C54EBD for ; Fri, 6 Jan 2023 20:58:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236172AbjAFU6c (ORCPT ); Fri, 6 Jan 2023 15:58:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235962AbjAFU61 (ORCPT ); Fri, 6 Jan 2023 15:58:27 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EE8C73E21; Fri, 6 Jan 2023 12:58:26 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 14E165C00FF; Fri, 6 Jan 2023 15:58:24 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Fri, 06 Jan 2023 15:58:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1673038704; x=1673125104; bh=asiYST5Ghw xvQTVw1LJKwe5e2Vz+ZHE03cHN4ukynt4=; b=bCw5+cCEaGZbkn79Md3n/s+2JR jZSktKXnrbP2k2QNO/DtQ+6Gwf7M8V79PgGXQ+Uwi501+VljT1lAVzngKKcyIG3c bukY+sByr4LYTrNSDqdhs03LmiHl5eN4inMKMUx2/yGRVNZY0evvjduiUhiDQyPL JWHZ/BZ+5JQK6ed9tW3dB0bYDix1HiVroiWIxmiC+FdGfgiBwSxVJPCVT0EkV5Ya Fb7NokNkpLusu2g64Yk1srsbGnGg69FufTmb88LYJ3KL+berWdwKNp/MJGf7OLuU vjGOg+RBLYY5rYX1oMefRdBdBQBs9c3kA7pSjb943evbq46atF9D/+VeW6yg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1673038704; x=1673125104; bh=asiYST5GhwxvQTVw1LJKwe5e2Vz+ ZHE03cHN4ukynt4=; b=DG00yeM+19g/2hGS1FyWu9dJSrr4+kDzcyS9goTqNyiB fq3BuSyZWkU6RsJVlcw3ae1qIdwneyYM46Ttbr+siDwR3iuEk20Cl0X9F8kQIzFs epbxucBryVCmcZLmsCbAufiSDVsVQsb+kyicsbJC40Ssgrn65M/rW0haGlgv3gFt st5GHDonyN0lv05B0KDO6gA5KDA1Sujd7WGD//8mHNJOvxIVF0avSXO3bclr8hId +2oe33Xh6i2y0N9k3i8CsJNK5GUzgWUfQmHXhHkMfg8I6QIgP44l78J70514LA8w 6vhvykNk8r/xVQ7Mml83ROqOC4wb6QanXcqSQOtuBA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrkedtgddugeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepvefhffeltdegheeffffhtdegvdehjedtgfekueevgfduffettedtkeekueef hedunecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 58F17B60086; Fri, 6 Jan 2023 15:58:22 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-Id: In-Reply-To: <202301061209.4EA0C177@keescook> References: <20230106042844.give.885-kees@kernel.org> <202301061209.4EA0C177@keescook> Date: Fri, 06 Jan 2023 21:58:02 +0100 From: "Arnd Bergmann" To: "Kees Cook" , "Vincent MAILHOL" Cc: "Jann Horn" , "David S . Miller" , "Jakub Kicinski" , "Andrew Lunn" , "kernel test robot" , "Oleksij Rempel" , "Sean Anderson" , "Alexandru Tachici" , "Amit Cohen" , "Gustavo A. R. Silva" , Netdev , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, "Linux API" Subject: Re: minimum compiler for Linux UAPI (was Re: [PATCH v3] ethtool: Replace 0-length array with flexible array) Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org 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 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