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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 710F9CC6B2D for ; Wed, 14 Oct 2026 16:37:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 09B9310E1A2; Wed, 14 Oct 2026 16:37:52 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id E54E510F6BF; Wed, 14 Oct 2026 16:37:44 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id C9B3E4094A; Wed, 14 Oct 2026 16:37:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3E201F000C4; Wed, 14 Oct 2026 16:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791995864; bh=ovAqcUcR1GnKTtcInlqEnrexmz1gsb8w6q2FfK1T5r4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=GwrpOxogXrqhTXQ0pfmjgGMR/nhqs689d6d2T2UbxyqwEi+VJ/4ET2F3bxSsa/yCN EaglIPzBQ4qutHm/Eihe0pPBAWe+NlyY72FoJLC4Rcx8zYnrd+VBcodEifrd7JTzwT 8EqOjY6NHHc/4uGTfqT13dIP1aP05fs1tpq0wWe/LFtLEAv3fcER387/hVuHvXtsuD UxSDlOug9/2BlYA6zAYEAL+qTg5TM5momYM01f0IFfrqT1XCvpcIhwvzWCD/yfd3Rd ixvRP2r8X3I5Gfn87O/r4tNbn1q5lLdLD9Jj9tp7JpRRBzFzF6fUQnw/3GazF0kGmz Z7FdXtLFV/36A== Date: Wed, 14 Oct 2026 09:37:44 -0700 From: Kees Cook To: Miguel Ojeda Cc: Ian Rogers , Greg Kroah-Hartman , "Rafael J . Wysocki" , Danilo Krummrich , Miguel Ojeda , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jonathan Corbet , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Nayna Jain , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Viresh Kumar , David Teigland , Alexander Aring , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Richard Weinberger , Zhihao Cheng , Felix Kuehling , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , driver-core@lists.linux.dev, llvm@lists.linux.dev, linux-hardening@vger.kernel.org, linux-doc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, gfs2@lists.linux.dev, xen-devel@lists.xenproject.org, linux-s390@vger.kernel.org, linux-mtd@lists.infradead.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/11] Compiler Attributes: Add __require_explicit_initialization macro Message-ID: <202610140937.B68C8C9AAC@keescook> References: <20261013223946.1836757-1-irogers@google.com> <20261013223946.1836757-2-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Wed, Oct 14, 2026 at 01:28:55PM +0200, Miguel Ojeda wrote: > On Wed, Oct 14, 2026 at 12:40 AM Ian Rogers wrote: > > > > +/* > > + * Optional: not supported by gcc > > + * > > + * clang: https://clang.llvm.org/docs/AttributeReference.html#require-explicit-initialization > > + */ > > +#if __has_attribute(__require_explicit_initialization__) > > +# define __require_explicit_initialization __attribute__((__require_explicit_initialization__)) > > +#else > > +# define __require_explicit_initialization > > +#endif > > The LPC slides mention Clang 14+, but from a quick test in Compiler > Explorer and a `git log --grep` on the LLVM repository to confirm, it > seems the attribute was introduced in Clang 20+, no? > > If that is correct, then it is not available in all LLVM versions we > support (LLVM 17+), so we should add: > > * Optional: only supported since clang >= 20.0 > > With that: > > Acked-by: Miguel Ojeda Yup, I can confirm, I only see it with 20+ too. -- Kees Cook