[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/11] Compiler Attributes: Add __require_explicit_initialization macro
- To: Kees Cook <kees@xxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>
- From: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
- Date: Wed, 14 Oct 2026 09:44:29 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hsPwLhsDZInozncTdS3m6Cc033xIb80Yu7bEmy4I9fE=; fh=L6H7EPb7hTW+cJ3+u2BMq1G6CAt6RhdOe/toZLWtnj4=; b=kux7tFmBSru57IR1eHYRELrFRTQX3Zpx2IFE5f8KRFN0caN+izdFgaOGexAJVi1Bky EN4RJvdS2qVA1GVF7NSET64XvTS86rdTRabByGH6Kl+WhIsx0juWU6V4qj4gRpGydfyz BhrEOouJftAWU1t7Cj9Eue2AGlMoPj8wjnenNn/SvvbtyRrGmMegH9XDsYttAEL2n0Am RmAWUrHGV1/8NzkCUOIkmwd1dTApWZIGxWrhggDOaL6hIfeju0GJKJityluD/QSZk0NL Kmri+SzeJW48vyOs1ImKULUH0O0s2Tm9Vm3KapgFVuA2LobRqKctFRtC0wMoqX8QPCkS gVmg==; darn=lists.xenproject.org
- Arc-seal: i=1; a=rsa-sha256; t=1791996282; cv=none; d=google.com; s=arc-20260327; b=HEChk0KhBioVZRM/QcIEUHrR68ZEm7sraBhfpPWy9JUb29QzlKkYsAQwhIKZPgbjWG wACxGdSM1CICXLl/a9eqaDfhyeJrRb79Vh0FvL3mpf46ojY5/SQmXSMBfRkELZRK4iYt sd4xFv6RYLtjDpvjE49KnHfcL0ncs0tZmn6ZRI4kiTGieXeI6l9dGB7HoqWEnhlHaqPq l6BW6zJFw/K+IHN237hf+dDEZtw9aKGU5roJXoNCIUCpgDJFMhoBd2PWfHJw7JB6NZma DZF2/4JIQph6nP1DCmrZL5kGGxbdqpuxZJ6PYurRlQP1WojuNMouhZun5pQ33vQYfPQs q8rA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=google.com header.i="@google.com" header.h="Content-Transfer-Encoding:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
- Cc: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, "Rafael J . Wysocki" <rafael@xxxxxxxxxx>, Danilo Krummrich <dakr@xxxxxxxxxx>, Miguel Ojeda <ojeda@xxxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>, Bill Wendling <morbo@xxxxxxxxxx>, Justin Stitt <justinstitt@xxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Christophe Leroy <chleroy@xxxxxxxxxx>, Nayna Jain <nayna@xxxxxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Rich Felker <dalias@xxxxxxxx>, John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>, Viresh Kumar <viresh.kumar@xxxxxxxxxx>, David Teigland <teigland@xxxxxxxxxx>, Alexander Aring <aahringo@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, Vasily Gorbik <gor@xxxxxxxxxxxxx>, Alexander Gordeev <agordeev@xxxxxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>, Sven Schnelle <svens@xxxxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Zhihao Cheng <chengzhihao1@xxxxxxxxxx>, Felix Kuehling <Felix.Kuehling@xxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, driver-core@xxxxxxxxxxxxxxx, llvm@xxxxxxxxxxxxxxx, linux-hardening@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, gfs2@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, amd-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- Delivery-date: Wed, 14 Oct 2026 16:44:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Oct 14, 2026 at 9:37 AM Kees Cook <kees@xxxxxxxxxx> wrote:
>
> On Wed, Oct 14, 2026 at 01:28:55PM +0200, Miguel Ojeda wrote:
> > On Wed, Oct 14, 2026 at 12:40 AM Ian Rogers <irogers@xxxxxxxxxx> 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 <ojeda@xxxxxxxxxx>
>
> Yup, I can confirm, I only see it with 20+ too.
Fix up the comment and have a coin, witcher.
Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
>
> --
> Kees Cook
--
Thanks,
~Nick Desaulniers
|