Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2952395rwl; Fri, 6 Jan 2023 13:15:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuTzqWeGObwrnz9PzkFjig+1mti+iy+QkYgNw0sFvzJXj1x/YiytP7h6NUmkqPQtTav0RV/ X-Received: by 2002:a05:6a20:138e:b0:9d:efbe:2063 with SMTP id w14-20020a056a20138e00b0009defbe2063mr95939819pzh.25.1673039712301; Fri, 06 Jan 2023 13:15:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673039712; cv=none; d=google.com; s=arc-20160816; b=Tb3t+tLnEvvSU1jAQ64iKD/qMDAj33Hr+zonBcvlIy/ECODH/uZeSzQsJMWB4uY1Ay M80buVl2dpIxlWhhr2z0dAg0Chl+kqSdguRBzaMhWrNfbxLz546tzb4UJJeFmxToKBWE XCfIRSWg83OPqvr5SY7D9756/7K+fBPrsP4GB3fwHq8WGjtq5JC6cDybEkZBbitZeADE SYA+iiGnA1WlUfHFg1J7jjNzfSYtrIGgpvcXDHwTH/TTTxUSubc9blJMtf5yF8yAEiXn /0BT0WbRKXwYULF764Cxyk9BU/MJbfvBiIpmz3/1ACXwTyYwqSy93Gj3CcoSYbO6nWSR w2Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=asiYST5GhwxvQTVw1LJKwe5e2Vz+ZHE03cHN4ukynt4=; b=ttjrUFHZqJW1vUjC9syIMlbPvggiVzdxXd+nKr+YffHKaj7wAXLuS9ygqu4zNvGiYt I0Kta4WZ8ej+pn2hwIiKnFYAIJnKj3G12A7MPSiW4U0A+4FuBr6N7Z2LIESkaRyICBkN MnPp0zGnVNma+9Ib84DLznRYE/xVYJpHV1s9t6CwuZHhZIJ0REwmpRUKck/PMs3ndgJO 7Oeliyn3YgAD+dlix1HECserpbAgHpzSw7XEAksnhWUSd4BboTB9PNASXC8xd48+7hMQ zC5UVdcF30/+MGT33MD+jAO39B6rm4xAZuz4mh8TXgRXmOnjAc198eXtj8wUGr4R9EQ5 DBFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=bCw5+cCE; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=DG00yeM+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g1-20020a056a001a0100b00581da546a3csi2359840pfv.209.2023.01.06.13.15.05; Fri, 06 Jan 2023 13:15:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=bCw5+cCE; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=DG00yeM+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236265AbjAFU6e (ORCPT + 57 others); Fri, 6 Jan 2023 15:58:34 -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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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