From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07BAF84D02; Sun, 20 Jul 2025 18:07:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753034826; cv=none; b=k5+bxXHdpvNXNadt5bRi06wkiTAUlww5szAxqIEiTMuU42RfhtpYBpv5JJMBLXdY+cmMN50gTbqtJkooz+aMMjj2QNJIG+FHLutqslkb/nNf/wTimxe8cGvDJsCkgLMgyMa84YmdmNDsJUeMUokVRz0PiSJBZ2cLHhBwilvk+S8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753034826; c=relaxed/simple; bh=KdWwGjYoJDSltOHUgbcqHnR8whKcVBigwZqCJWFeLek=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=Xl2ZSkLOMJJxgFv31HLljFzwzAewFl+wfzb2pCdk/lFYXVgoeoLVVtJRPt8TPPCxCQU1u8XE1fTfm8trAYBT+5M4TGYaj4FlXLMH8J8tQVF0k0nvv0IruCIzANprg9TtmZdajwDvLcqXC/iTdksGh861Oj7aGHKsy4x18mvtsfU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=en1vXU/X; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="en1vXU/X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2F8EC4CEE7; Sun, 20 Jul 2025 18:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753034825; bh=KdWwGjYoJDSltOHUgbcqHnR8whKcVBigwZqCJWFeLek=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=en1vXU/X9QrzIH4vOhbEHO9n90KHrSs2XK4BHWBtw+jad9BhvdNRIipSLve5FXZQm 7TiFIS+70OA5hspZLE40rpIH2DpjsSNHOGkfQOelZVSgXX3t1vCBJLco3UDi0SFTz0 XE1kK4koUoAlVbLgmsGr539ffuJvpk8Q8+a8qSlHvYK5+MAqtNMEDp2E9JVWp45CC4 R9ANZypLxD2N0J8OpA2kNMH+lMJrYRoexUad//5KInD4GY+l65r9dfID2UOeFueqkz nNxjV2MgfgXxlw9j5HloWn4/HwRRjYGFONVKGQZiGUsePc6gXeX6qs1Gf/JK98cqeK zdCwEfUkuACLQ== Date: Sun, 20 Jul 2025 11:07:02 -0700 From: Kees Cook To: "H. Peter Anvin" CC: =?ISO-8859-1?Q?Eugenio_P=E9rez?= , =?ISO-8859-1?Q?Ilpo_J=E4rvinen?= , "Michael S. Tsirkin" , Al Viro , Alexei Starovoitov , Alexey Dobriyan , Andrew Morton , Andrii Nakryiko , Arnd Bergmann , Borislav Petkov , Dan Williams , Daniel Borkmann , Dave Hansen , David Laight , David Lechner , Dinh Nguyen , Eduard Zingerman , Gatlin Newhouse , Hao Luo , Ingo Molnar , Linus Torvalds , Jakub Sitnicki , Jan Hendrik Farr , Jason Wang , Jiri Olsa , John Fastabend , Jonathan Cameron , Josh Poimboeuf , KP Singh , Luc Van Oostenryck , Marc Herbert , Martin KaFai Lau , Mateusz Guzik , Michal Luczaj , Miguel Ojeda , Mykola Lysenko , NeilBrown , Peter Zijlstra , Przemek Kitszel , Sami Tolvanen , Shuah Khan , Song Liu , Stanislav Fomichev , Thomas Gleixner , Thorsten Blum , Uros Bizjak , Xuan Zhuo , Yafang Shao , Ye Bin , Yonghong Song , Yufeng Wang , bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-sparse@vger.kernel.org, virtualization@lists.linux.dev, x86@kernel.org Subject: Re: [PATCH v2 0/7] Replace "__auto_type" with "auto" User-Agent: K-9 Mail for Android In-Reply-To: <20250720065045.2859105-1-hpa@zytor.com> References: <20250720065045.2859105-1-hpa@zytor.com> Message-ID: Precedence: bulk X-Mailing-List: linux-sparse@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On July 19, 2025 11:50:37 PM PDT, "H=2E Peter Anvin" wro= te: >"auto" was defined as a keyword back in the K&R days, but as a storage >type specifier=2E No one ever used it, since it was and is the default >storage type for local variables=2E > >C++11 recycled the keyword to allow a type to be declared based on the >type of an initializer=2E This was finally adopted into standard C in >C23=2E > >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=2E Yeah, this is good=2E We have typeof() used extensively in macros all over= =2E I'll try this for fortify macros and see if we see any binary output ch= anges=2E=2E=2E --=20 Kees Cook