[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F1CC49C7-0F23-4E0D-AE59-C0D35C19BCED@kernel.org>
Date: Sun, 20 Jul 2025 11:07:02 -0700
From: Kees Cook <kees@...nel.org>
To: "H. Peter Anvin" <hpa@...or.com>
CC: Eugenio Pérez <eperezma@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
"Michael S. Tsirkin" <mst@...hat.com>, Al Viro <viro@...iv.linux.org.uk>,
Alexei Starovoitov <ast@...nel.org>, Alexey Dobriyan <adobriyan@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrii Nakryiko <andrii@...nel.org>, Arnd Bergmann <arnd@...nel.org>,
Borislav Petkov <bp@...en8.de>, Dan Williams <dan.j.williams@...el.com>,
Daniel Borkmann <daniel@...earbox.net>,
Dave Hansen <dave.hansen@...ux.intel.com>,
David Laight <David.Laight@...LAB.COM>,
David Lechner <dlechner@...libre.com>, Dinh Nguyen <dinguyen@...nel.org>,
Eduard Zingerman <eddyz87@...il.com>,
Gatlin Newhouse <gatlin.newhouse@...il.com>, Hao Luo <haoluo@...gle.com>,
Ingo Molnar <mingo@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jakub Sitnicki <jakub@...udflare.com>, Jan Hendrik Farr <kernel@...rr.cc>,
Jason Wang <jasowang@...hat.com>, Jiri Olsa <jolsa@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Josh Poimboeuf <jpoimboe@...nel.org>, KP Singh <kpsingh@...nel.org>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
Marc Herbert <Marc.Herbert@...ux.intel.com>,
Martin KaFai Lau <martin.lau@...ux.dev>, Mateusz Guzik <mjguzik@...il.com>,
Michal Luczaj <mhal@...x.co>, Miguel Ojeda <ojeda@...nel.org>,
Mykola Lysenko <mykolal@...com>, NeilBrown <neil@...wn.name>,
Peter Zijlstra <peterz@...radead.org>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Sami Tolvanen <samitolvanen@...gle.com>, Shuah Khan <shuah@...nel.org>,
Song Liu <song@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
Thomas Gleixner <tglx@...utronix.de>,
Thorsten Blum <thorsten.blum@...ux.dev>, Uros Bizjak <ubizjak@...il.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Yafang Shao <laoar.shao@...il.com>,
Ye Bin <yebin10@...wei.com>, Yonghong Song <yonghong.song@...ux.dev>,
Yufeng Wang <wangyufeng@...inos.cn>, bpf@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-sparse@...r.kernel.org,
virtualization@...ts.linux.dev, x86@...nel.org
Subject: Re: [PATCH v2 0/7] Replace "__auto_type" with "auto"
On July 19, 2025 11:50:37 PM PDT, "H. Peter Anvin" <hpa@...or.com> wrote:
>"auto" was defined as a keyword back in the K&R days, but as a storage
>type specifier. No one ever used it, since it was and is the default
>storage type for local variables.
>
>C++11 recycled the keyword to allow a type to be declared based on the
>type of an initializer. This was finally adopted into standard C in
>C23.
>
>gcc and clang provide the "__auto_type" alias keyword as an extension
>for pre-C23, however, there is no reason to pollute the bulk of the
>source base with this temporary keyword; instead define "auto" as a
>macro unless the compiler is running in C23+ mode.
Yeah, this is good. We have typeof() used extensively in macros all over. I'll try this for fortify macros and see if we see any binary output changes...
--
Kees Cook
Powered by blists - more mailing lists