From nobody Sun Feb 8 22:47:29 2026 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 BAFDB2E4254; Fri, 17 Oct 2025 17:33:55 +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=1760722435; cv=none; b=aCC5q+SFVCyBt0Iq31hJTrA80TE6f3VgfZTy7evafwBjzU4OYbWNyXz5Fza3XiNaeWr8s+kfxlTaR1ouBDq+SD+6FaCSwJg6oHU7udZkqc6e4s8tPBBcpidaqoszt9VKxY3qJxqt74ez7QGtUNZpoT2JBOWsji/rNVhfiG7wEmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760722435; c=relaxed/simple; bh=ui7yVZ6WbMYNe7EHu4NqAuwm0HLMLbJ5LF66UYQlSKI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dZ6c0wOnFautgfTdDv9nWIC/CfxzbfrX7ippmvrfMfNvzVvrqCR4xaohoP4XvQTMiSA8YxLkYgY+3Pi9/HLJNSv7qUciMGsZM1Ub4vZf7a3QzZxKeBE9DJdnzJ5sr1f7AD1U/koH9St9VBbNWXa+S9WsdO6OiDkKKbK9yktNOgg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZifL+JU/; 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="ZifL+JU/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FF83C4CEFE; Fri, 17 Oct 2025 17:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760722435; bh=ui7yVZ6WbMYNe7EHu4NqAuwm0HLMLbJ5LF66UYQlSKI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZifL+JU/nD0B0akdhTsQSDotj+odlNu8tfZoMcsHRq+3Lg5qqKtx3GTxDywfj9uI8 udAvIEXCnB2mHVsL8AZ+RA8EJnMrllMV3xlG4UkMVHCR/Uv1RJSeM+LFY4yNRC9Ztr V/v7RX1imDbJfwBDuhhJ8OBgNNT0NKq/dcjUOC3Zj/L/1oEC2kfAPKOM8vQNtEc9dD Kp+ssZQ14RvTkr+aNC05x5lNe3MAUm0shX9Spy1DShLh1/StTRvQcWYNoMHk5Ex0pg SJVloWJbFK4DVE/FiDNHLnY67BrTD1Ts+zOKcETKHSkcbubukRqmoVKTX87mU0LEuw PEjo8isRh/CTQ== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 19:33:38 +0200 Subject: [PATCH 5.4.y 1/5] x86/boot: Use '-std=gnu11' to fix build with GCC 15 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251017-v5-4-gcc-15-v1-1-6d6367ee50a1@kernel.org> References: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> In-Reply-To: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin Cc: MPTCP Upstream , "Matthieu Baerts (NGI0)" , Nathan Chancellor , Kostadin Shishmanov , Jakub Jelinek , Dave Hansen , Ard Biesheuvel X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2583; i=matttbe@kernel.org; h=from:subject:message-id; bh=hoMQpSOACl+S1Hma2+NP+Coi7rrUG8ABFqi8bz4/NSw=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+1f4I2H3edJqUyTsJHrf94s7vw6PClIOfz9FP0dtZ9 XdxoOvJjlIWBjEuBlkxRRbptsj8mc+reEu8/Cxg5rAygQxh4OIUgImkTWJkmO/44l7ni30fdrad iNrRuXCDeH8qv/NdsT/v3r5wTF2fm8bIcL47u8qzrvoTT9py4bebfRe/TGDd9X9h5tsKJTnrwh1 C/AA= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Nathan Chancellor commit ee2ab467bddfb2d7f68d996dbab94d7b88f8eaf7 upstream. GCC 15 changed the default C standard version to C23, which should not have impacted the kernel because it requests the gnu11 standard via '-std=3D' in the main Makefile. However, the x86 compressed boot Makefile uses its own set of KBUILD_CFLAGS without a '-std=3D' value (i.e., using the default), resulting in errors from the kernel's definitions of bool, true, and false in stddef.h, which are reserved keywords under C23. ./include/linux/stddef.h:11:9: error: expected identifier before =E2=80= =98false=E2=80=99 11 | false =3D 0, ./include/linux/types.h:35:33: error: two or more data types in declarati= on specifiers 35 | typedef _Bool bool; Set '-std=3Dgnu11' in the x86 compressed boot Makefile to resolve the error and consistently use the same C standard version for the entire kernel. Closes: https://lore.kernel.org/4OAhbllK7x4QJGpZjkYjtBYNLd_2whHx9oFiuZcGwtV= R4hIzvduultkgfAIRZI3vQpZylu7Gl929HaYFRGeMEalWCpeMzCIIhLxxRhq4U-Y=3D@protonm= ail.com/ Closes: https://lore.kernel.org/Z4467umXR2PZ0M1H@tucnak/ Reported-by: Kostadin Shishmanov Reported-by: Jakub Jelinek Signed-off-by: Nathan Chancellor Signed-off-by: Dave Hansen Reviewed-by: Ard Biesheuvel Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20250121-x86-use-std-consistently-gcc-15-= v1-1-8ab0acf645cb%40kernel.org [ Conflict in the context, because a few commits are not in this version, e.g. commit 527afc212231 ("x86/boot: Check that there are no run-time relocations") and commit 5fe392ff9d1f ("x86/boot/compressed: Move CLANG_FLAGS to beginning of KBUILD_CFLAGS"). The same line can still be added at the same place. ] Signed-off-by: Matthieu Baerts (NGI0) --- arch/x86/boot/compressed/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/M= akefile index 62ef24bb2313..e436819859d9 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -27,6 +27,7 @@ targets :=3D vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.b= in.bz2 vmlinux.bin.lzma \ vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 =20 KBUILD_CFLAGS :=3D -m$(BITS) -O2 +KBUILD_CFLAGS +=3D -std=3Dgnu11 KBUILD_CFLAGS +=3D -fno-strict-aliasing $(call cc-option, -fPIE, -fPIC) KBUILD_CFLAGS +=3D -DDISABLE_BRANCH_PROFILING cflags-$(CONFIG_X86_32) :=3D -march=3Di386 --=20 2.51.0 From nobody Sun Feb 8 22:47:29 2026 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 AAECD1C6A3; Fri, 17 Oct 2025 17:33:57 +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=1760722437; cv=none; b=JdvASWvf6yZM6ZcAJ+UvDRSJ9YdeIbhaGpsUSorIK/1+u146UXLzqdI1sa+HhLY3WqggIiOHnn3Isi7jekXlYKRxtJZWFNmIso1lmphL1JU1wBrbmZuGy0ySVGbW7hZYZcv3Wp2NUESQuTo+m9g5LhOdUARjpld8ddasv5PsTT8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760722437; c=relaxed/simple; bh=yT/exZAwSgNTWXWPg6lAIP7rb6scxbRZ8v/wejJx7Sw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MrLSCY3myynzLZwXqMhqtKZeC8ty3yDFIcq7sJKXt9AergPsPafigu7A5wtjg5notHo5nZNRl+3GbO6lLhVz5hX+NUKKpBEGFMU/KpEsK/zB8lAjE2hY8kZhXuk+BbXR0tRGv0iPHdWGCfWSE0Aa8H0DYtbFZ9M6BPjuS8TF75Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lsq7R4KM; 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="lsq7R4KM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFB3BC113D0; Fri, 17 Oct 2025 17:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760722437; bh=yT/exZAwSgNTWXWPg6lAIP7rb6scxbRZ8v/wejJx7Sw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lsq7R4KMdh0Dqu158vl43PhsQHA6w6GvulZ2S43Nn5t9EyI8vFLL3yJ2XGHN5FyLd nfh08F3kkggjI0LGN2bcuWKAjvEOuaAHQ020Ka/9XPWcDrO+usX7qMMobvNRU6eJQr mLsqOSvFaLkOZQ01s+avGeGWou5xiJxkBxauRlFHCMvw8joVWLT3C2ci2XiL/TP9vD NUlivpPSa+L6KkAKAuRoqholIbv2I55/MYv4xailR78ag8XQkwKAqRGa76Gk9/SD/O /pTC4q5K44dFDo89wHzM3BFhN6/iEQjiq+PJ5XlWXKlVPsg7gGQLirYaTGDW4SHcQC bJAWzkUS2HQLQ== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 19:33:39 +0200 Subject: [PATCH 5.4.y 2/5] efi: libstub: Use '-std=gnu11' to fix build with GCC 15 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251017-v5-4-gcc-15-v1-2-6d6367ee50a1@kernel.org> References: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> In-Reply-To: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin Cc: MPTCP Upstream , "Matthieu Baerts (NGI0)" , Nathan Chancellor , Kostadin Shishmanov , Jakub Jelinek , Ard Biesheuvel X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2401; i=matttbe@kernel.org; h=from:subject:message-id; bh=ELW/Y8j9ZMNwC5DLPH9KGkFyK2XO4/+Obnzq5n+sFLQ=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+1f4UucbFl/RO/23wwoTiVRfzdjJXTQ4N33Dmf39lz mIvnRLRjlIWBjEuBlkxRRbptsj8mc+reEu8/Cxg5rAygQxh4OIUgIlkTmL47/csZfrsAP3Hys8m eXdr6JxcEJFyzlvAwMhP/wtbf27nFEaGtslaYg3GUYZhCYk73yxUMJymZB3Df953zinmtRFbVWZ yAwA= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Nathan Chancellor commit 8ba14d9f490aef9fd535c04e9e62e1169eb7a055 upstream. GCC 15 changed the default C standard version to C23, which should not have impacted the kernel because it requests the gnu11 standard via '-std=3D' in the main Makefile. However, the EFI libstub Makefile uses its own set of KBUILD_CFLAGS for x86 without a '-std=3D' value (i.e., using the default), resulting in errors from the kernel's definitions of bool, true, and false in stddef.h, which are reserved keywords under C23. ./include/linux/stddef.h:11:9: error: expected identifier before =E2=80= =98false=E2=80=99 11 | false =3D 0, ./include/linux/types.h:35:33: error: two or more data types in declarati= on specifiers 35 | typedef _Bool bool; Set '-std=3Dgnu11' in the x86 cflags to resolve the error and consistently use the same C standard version for the entire kernel. All other architectures reuse KBUILD_CFLAGS from the rest of the kernel, so this issue is not visible for them. Cc: stable@vger.kernel.org Reported-by: Kostadin Shishmanov Closes: https://lore.kernel.org/4OAhbllK7x4QJGpZjkYjtBYNLd_2whHx9oFiuZcGwtV= R4hIzvduultkgfAIRZI3vQpZylu7Gl929HaYFRGeMEalWCpeMzCIIhLxxRhq4U-Y=3D@protonm= ail.com/ Reported-by: Jakub Jelinek Closes: https://lore.kernel.org/Z4467umXR2PZ0M1H@tucnak/ Signed-off-by: Nathan Chancellor Signed-off-by: Ard Biesheuvel [ Conflict in the context, because commit bbf8e8b0fe04 ("efi/libstub: Optimize for size instead of speed") is not in this version. '-std=3Dgnu11' can still be added at the same place. ] Signed-off-by: Matthieu Baerts (NGI0) --- drivers/firmware/efi/libstub/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/l= ibstub/Makefile index 8c5b5529dbc0..0dc80564bbd2 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -7,7 +7,7 @@ # cflags-$(CONFIG_X86_32) :=3D -march=3Di386 cflags-$(CONFIG_X86_64) :=3D -mcmodel=3Dsmall -cflags-$(CONFIG_X86) +=3D -m$(BITS) -D__KERNEL__ -O2 \ +cflags-$(CONFIG_X86) +=3D -m$(BITS) -D__KERNEL__ -O2 -std=3Dgnu11 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -fshort-wchar \ -Wno-pointer-sign \ --=20 2.51.0 From nobody Sun Feb 8 22:47:29 2026 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 91B8A1C6A3; Fri, 17 Oct 2025 17:33:59 +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=1760722439; cv=none; b=IZaxvWXwRhn9aeRW0n263wNSOoQ2N5wqHbBw9gSBN3DxKMkBLeqm5Cg5l3IR5AlkQ09dkgVZhxDERwf2U+yad8YVxUGOD9BdqAem801VyZFQp/uxGiNpCeYdosfb2ebsVJ//FYAcY+y5Oagi7ahfY//wtozmya2JWu9OLw8AHm0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760722439; c=relaxed/simple; bh=+AtrBZZs/qIkDn+qTjTtCY5vfEV341Ish4teGAyteog=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AXIAOrjmmkGsohu3bm0808dxejB0eYxFazN5vif4Ho2h1w0KuEfy2H0B8zBDSOay7Z0UWW3kKguLQJ1cVT1l+qOE6F/7pF1b+zmd+bry/dEiuP4xOs/nyExQvjKn8nL6u9FKMQTW5reJNtpVL+4hQQUw+Xf93WR5mi+isKOKlbU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OPgP6gif; 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="OPgP6gif" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A862C116B1; Fri, 17 Oct 2025 17:33:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760722439; bh=+AtrBZZs/qIkDn+qTjTtCY5vfEV341Ish4teGAyteog=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=OPgP6gifmek7PvNRAp6QYqMZpMuvHUIcOFrLV8RQEHsjK4A20whrYv/o6pnZBlgxU I6GNRwdO4qTRXeWcOpCDII6kqrhQgvgHKaItBtU4KLao65t1KYz27nbobMfCLTHKOV dvbzHRc/k8ekapMMwEQmYQdGWIrQ0qWyINV3sRZeDa9xUnKzgJrvf8Jp/gWu1CMtwx I4EDwUHC9A+UqcX9+pF7EiOSUcasCow50eHFolYPkOFkoRMl5HxDlbCG97Ra0+CX+X SAOLnVeAJBhOmX28EaEEoCjgupuAYU8+nAg9EkEftJdkWFyXBKo5DtNaJRs3UUYqdo +pyCLiTGEPodg== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 19:33:40 +0200 Subject: [PATCH 5.4.y 3/5] x86/boot: Compile boot code with -std=gnu11 too Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251017-v5-4-gcc-15-v1-3-6d6367ee50a1@kernel.org> References: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> In-Reply-To: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin Cc: MPTCP Upstream , "Matthieu Baerts (NGI0)" , Alexey Dobriyan , Ingo Molnar , "H. Peter Anvin (Intel)" , Nathan Chancellor , Dave Hansen , Ard Biesheuvel X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3092; i=matttbe@kernel.org; h=from:subject:message-id; bh=5YeFtji4y5HM3kRjIcpX2gQzUdq9XBx5bFFcsgr3U+E=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+1f6eZLswUyGt/orm7pU111m4/gndX14+T4ErvHju+ c9VLE5GHaUsDGJcDLJiiizSbZH5M59X8ZZ4+VnAzGFlAhnCwMUpABexZmSYw7TqlfLVWcJ9alFn hW4mHpVaWzLze1JgcO0jm9e1bxObGP7nz998w3GbM8ukFdy2CqWygW8Ubu60OS+7qX75+7hrARX sAA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Alexey Dobriyan commit b3bee1e7c3f2b1b77182302c7b2131c804175870 upstream. Use -std=3Dgnu11 for consistency with main kernel code. It doesn't seem to change anything in vmlinux. Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar Acked-by: H. Peter Anvin (Intel) Link: https://lore.kernel.org/r/2058761e-12a4-4b2f-9690-3c3c1c9902a5@p183 [ This kernel version doesn't build with GCC 15: In file included from include/uapi/linux/posix_types.h:5, from include/uapi/linux/types.h:14, from include/linux/types.h:6, from arch/x86/realmode/rm/wakeup.h:11, from arch/x86/realmode/rm/wakemain.c:2: include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enume= ration constant 11 | false =3D 0, | ^~~~~ include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=3Dc2= 3' onwards include/linux/types.h:30:33: error: 'bool' cannot be defined via 'typed= ef' 30 | typedef _Bool bool; | ^~~~ include/linux/types.h:30:33: note: 'bool' is a keyword with '-std=3Dc23= ' onwards include/linux/types.h:30:1: warning: useless type name in empty declara= tion 30 | typedef _Bool bool; | ^~~~~~~ The fix is similar to commit ee2ab467bddf ("x86/boot: Use '-std=3Dgnu11' to fix build with GCC 15") which has been backported to this kernel. Note: In < 5.18 version, -std=3Dgnu89 is used instead of -std=3Dgnu11, see commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"). I suggest not to modify that in this commit here as all the other similar fixes to support GCC 15 set -std=3Dgnu11. This can be done in a dedicated commit if needed. There was a conflict, because commit 2838307b019d ("x86/build: Remove -m16 workaround for unsupported versions of GCC") and commit accb8cfd506d ("x86/realmode: build with -D__DISABLE_EXPORTS") are not in this version and change code in the context. -std=3Dgnu11 can still be added at the same place. ] Signed-off-by: Matthieu Baerts (NGI0) --- Cc: Nathan Chancellor Cc: Dave Hansen Cc: Ard Biesheuvel --- arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 69f0cb01c666..69930ed5574b 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -31,7 +31,7 @@ endif CODE16GCC_CFLAGS :=3D -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h M16_CFLAGS :=3D $(call cc-option, -m16, $(CODE16GCC_CFLAGS)) =20 -REALMODE_CFLAGS :=3D $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \ +REALMODE_CFLAGS :=3D -std=3Dgnu11 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PR= OFILING \ -Wall -Wstrict-prototypes -march=3Di386 -mregparm=3D3 \ -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ -mno-mmx -mno-sse $(call cc-option,-fcf-protection=3Dnone) --=20 2.51.0 From nobody Sun Feb 8 22:47:29 2026 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 D58F12E4254; Fri, 17 Oct 2025 17:34:01 +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=1760722441; cv=none; b=uH1FNyzt/yqlXOTB9SMsejrSucnRb6yHKXHrI+P8vV63Z8yXFVYTZVSZGRxp1znOww7s9nYaJDxDM4noPivgvCVcgfok+MtyTlbV1pD5Ea0ibdy6EcmLcn8s89M2oE3eZwOzeq2DyGwfykONBa6JJQIi4txfx/sVN7nQGUp+ViU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760722441; c=relaxed/simple; bh=Q0QoUkpt2xUYIfX09AQuImr55777CNwie12QlXnh3ak=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FyHj5bXD2EN4AlNP8Nk9LBg4BJe660H9Mt17exei24c9ghWYTYd75Z8tnbE4tojwMujwFuqA7aGMG9AFczXeHppCdK0xm2ddnXU8yYdL4rzrb2DzghYVI2yQHxQDyavYGbElu5zHjZghdPO22aaaYoelOP0kg9KeZBbtABSfyiE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZWbsHMG2; 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="ZWbsHMG2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0F7DC4CEE7; Fri, 17 Oct 2025 17:33:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760722441; bh=Q0QoUkpt2xUYIfX09AQuImr55777CNwie12QlXnh3ak=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZWbsHMG2rL7Uob9SpbYui0ijtJ9eOsLfe+z0ap6YaqT8Qm5CsaU/bebVqrpaSpXyb Yc42GV4zFwYzJuF5EAJN8x7CkiymcUzNi0zqrdZqNy8zdZBtlr6qY7/s0r0OTMFP/g RclpvQiXIyRxzrTfa/NWMgxbBRgwqfx2bQuWr0tXX4YGzpcWTqG4G9OfLD0dCc/CE2 zIYa8ImRPm4zcPRXDzLLQfxebl+7Ey8FqXXvshks7stpvtS6uX2KPYTsIGpHj2TWkU rq7fYebhk2os8g118aX2jtFlhkpnb/JczTJFT9Gtru7MWC0GA45XdDHv5lA1UtP9d1 wBjB4edMq5ZwA== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 19:33:41 +0200 Subject: [PATCH 5.4.y 4/5] arch: back to -std=gnu89 in < v5.18 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251017-v5-4-gcc-15-v1-4-6d6367ee50a1@kernel.org> References: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> In-Reply-To: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin Cc: MPTCP Upstream , "Matthieu Baerts (NGI0)" , Nathan Chancellor , Ard Biesheuvel , Alexey Dobriyan , Arnd Bergmann X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=5445; i=matttbe@kernel.org; h=from:subject:message-id; bh=Q0QoUkpt2xUYIfX09AQuImr55777CNwie12QlXnh3ak=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+1f55rxp/vDRgTX+B45Kp/3497Dzuybv8zyX7A96Mt d2F3/XjOkpZGMS4GGTFFFmk2yLzZz6v4i3x8rOAmcPKBDKEgYtTACbC2c/IsFj/MEvWbY+0mcc0 LAxv6k2ep7XEKrt3QngPn16T3S4DLkaG1/EWog2XmJRXnpN9VikmtSlkWsPmWt+iR6ILtvnyLjn EAgA= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Recent fixes have been backported to < v5.18 to fix build issues with GCC 5.15. They all force -std=3Dgnu11 in the CFLAGS, "because [the kernel] requests the gnu11 standard via '-std=3D' in the main Makefile". This is true for >=3D 5.18 versions, but not before. This switch to -std=3Dgnu11 has been done in commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"). For a question of uniformity, force -std=3Dgnu89, similar to what is done in the main Makefile. Note: the fixes tags below refers to upstream commits, but this fix is only for kernels not having commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"). Fixes: 7cbb015e2d3d ("parisc: fix building with gcc-15") Fixes: 3b8b80e99376 ("s390: Add '-std=3Dgnu11' to decompressor and purgator= y CFLAGS") Fixes: b3bee1e7c3f2 ("x86/boot: Compile boot code with -std=3Dgnu11 too") Fixes: ee2ab467bddf ("x86/boot: Use '-std=3Dgnu11' to fix build with GCC 15= ") Fixes: 8ba14d9f490a ("efi: libstub: Use '-std=3Dgnu11' to fix build with GC= C 15") Signed-off-by: Matthieu Baerts (NGI0) --- Note: An alternative is to backport commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"), but I guess we might not want to do that for stable, as it might introduce new warnings. Cc: Nathan Chancellor Cc: Ard Biesheuvel Cc: Alexey Dobriyan Cc: Arnd Bergmann --- arch/parisc/boot/compressed/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/s390/purgatory/Makefile | 2 +- arch/x86/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- drivers/firmware/efi/libstub/Makefile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compre= ssed/Makefile index 98d69488e5c2..92cab904f1ba 100644 --- a/arch/parisc/boot/compressed/Makefile +++ b/arch/parisc/boot/compressed/Makefile @@ -21,7 +21,7 @@ KBUILD_CFLAGS +=3D -fno-PIE -mno-space-regs -mdisable-fpr= egs -Os ifndef CONFIG_64BIT KBUILD_CFLAGS +=3D -mfast-indirect-calls endif -KBUILD_CFLAGS +=3D -std=3Dgnu11 +KBUILD_CFLAGS +=3D -std=3Dgnu89 =20 OBJECTS +=3D $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o = $(obj)/piggy.o =20 diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 22dc393b5a83..287b853a7f09 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -23,7 +23,7 @@ endif aflags_dwarf :=3D -Wa,-gdwarf-2 KBUILD_AFLAGS_DECOMPRESSOR :=3D $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ KBUILD_AFLAGS_DECOMPRESSOR +=3D $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) -KBUILD_CFLAGS_DECOMPRESSOR :=3D $(CLANG_FLAGS) -m64 -O2 -std=3Dgnu11 +KBUILD_CFLAGS_DECOMPRESSOR :=3D $(CLANG_FLAGS) -m64 -O2 -std=3Dgnu89 KBUILD_CFLAGS_DECOMPRESSOR +=3D -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR +=3D -fno-delete-null-pointer-checks -msoft-flo= at KBUILD_CFLAGS_DECOMPRESSOR +=3D -fno-asynchronous-unwind-tables diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile index 2f4d8422bdfb..facd0b3db637 100644 --- a/arch/s390/purgatory/Makefile +++ b/arch/s390/purgatory/Makefile @@ -20,7 +20,7 @@ GCOV_PROFILE :=3D n UBSAN_SANITIZE :=3D n KASAN_SANITIZE :=3D n =20 -KBUILD_CFLAGS :=3D -std=3Dgnu11 -fno-strict-aliasing -Wall -Wstrict-protot= ypes +KBUILD_CFLAGS :=3D -std=3Dgnu89 -fno-strict-aliasing -Wall -Wstrict-protot= ypes KBUILD_CFLAGS +=3D -Wno-pointer-sign -Wno-sign-compare KBUILD_CFLAGS +=3D -fno-zero-initialized-in-bss -fno-builtin -ffreestanding KBUILD_CFLAGS +=3D -c -MD -Os -m64 -msoft-float -fno-common diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 69930ed5574b..424ee0e1f23d 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -31,7 +31,7 @@ endif CODE16GCC_CFLAGS :=3D -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h M16_CFLAGS :=3D $(call cc-option, -m16, $(CODE16GCC_CFLAGS)) =20 -REALMODE_CFLAGS :=3D -std=3Dgnu11 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PR= OFILING \ +REALMODE_CFLAGS :=3D -std=3Dgnu89 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PR= OFILING \ -Wall -Wstrict-prototypes -march=3Di386 -mregparm=3D3 \ -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ -mno-mmx -mno-sse $(call cc-option,-fcf-protection=3Dnone) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/M= akefile index e436819859d9..5771d5b43bb8 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -27,7 +27,7 @@ targets :=3D vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.b= in.bz2 vmlinux.bin.lzma \ vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 =20 KBUILD_CFLAGS :=3D -m$(BITS) -O2 -KBUILD_CFLAGS +=3D -std=3Dgnu11 +KBUILD_CFLAGS +=3D -std=3Dgnu89 KBUILD_CFLAGS +=3D -fno-strict-aliasing $(call cc-option, -fPIE, -fPIC) KBUILD_CFLAGS +=3D -DDISABLE_BRANCH_PROFILING cflags-$(CONFIG_X86_32) :=3D -march=3Di386 diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/l= ibstub/Makefile index 0dc80564bbd2..00622027a49f 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -7,7 +7,7 @@ # cflags-$(CONFIG_X86_32) :=3D -march=3Di386 cflags-$(CONFIG_X86_64) :=3D -mcmodel=3Dsmall -cflags-$(CONFIG_X86) +=3D -m$(BITS) -D__KERNEL__ -O2 -std=3Dgnu11 \ +cflags-$(CONFIG_X86) +=3D -m$(BITS) -D__KERNEL__ -O2 -std=3Dgnu89 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -fshort-wchar \ -Wno-pointer-sign \ --=20 2.51.0 From nobody Sun Feb 8 22:47:29 2026 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 67CA230748A; Fri, 17 Oct 2025 17:34:03 +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=1760722443; cv=none; b=LGytwC9uoMb+z90vX+P+50xOp3jTMuuLvxRXxlxeNFdhRvNEcNEcs6lAHLBL2phXCDPD28h0x+tYwr5emY5agsqphsy24YtOnwAmHPRqC8lhQvqmXy2goD2iTjErgnZDpvzi/vrNikvCaxip43ZUHxBmVISu4Q1kOGQUI375goc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760722443; c=relaxed/simple; bh=WhWp+CUHcgUnStNBnvrT1zJCZqYFLjpY5pSs8TsRqU8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aqSFImC4rfv68jS7sFN4L5bIBk7lD1rzGQJVACUtkrubTvJCOBmtqZ8OmhP7YMZXxcjtdVgPa9CbkaYW9HJprs+n4KU8w8nbGOwoJLw4H/55GmJnWaoCRAUhPEf05hKWdF6KxyfGjhyX8YwcwwUUM9SR7GOlyfiNAfHvokABpR4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fNkpGXd7; 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="fNkpGXd7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C095EC116D0; Fri, 17 Oct 2025 17:34:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760722443; bh=WhWp+CUHcgUnStNBnvrT1zJCZqYFLjpY5pSs8TsRqU8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fNkpGXd7LzPNn6YWgCub9r6mc4mUmj6n3AZPP/CIwx0TBBrwCoxHxfJQub1Gn/0gT d0KeJnmbmuO2CDR9Gw2T2rpONISns1CVmhikhXAc0NIxvkeHDnTMTyila511lY9sqJ ZOpDG15vcPbTQbyE/Tfs7Q+DoBPclF5he371riQFoflgeZC0ODDV66GipoDI4YmAV6 GqzPh723kx1lq/3Zvw3BKD6qevEE6Vo/UxtOcTcj2L3r/B7AykWrEF/9zCJUZNg+O+ vG1NylZiLXtisg5NferMQYdeva33YDr1ErsBZh4QB2S9qC4v/2Yh+4fwcqHgtHzUEA HU0270s2NAMBQ== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 19:33:42 +0200 Subject: [PATCH 5.4.y 5/5] kernel/profile.c: use cpumask_available to check for NULL cpumask Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251017-v5-4-gcc-15-v1-5-6d6367ee50a1@kernel.org> References: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> In-Reply-To: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin Cc: MPTCP Upstream , "Matthieu Baerts (NGI0)" , Nathan Chancellor , Andrew Morton , Thomas Gleixner , Linus Torvalds X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2695; i=matttbe@kernel.org; h=from:subject:message-id; bh=Nv28f9jDG/WKsxu892MmMF8tyULuMgUkd2J73jIspzI=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+1f5VkUj3/HvgWKDOtQPvu2bxH7nyu6NvY2fbsbZjh b8mVs3L6ShlYRDjYpAVU2SRbovMn/m8irfEy88CZg4rE8gQBi5OAZiIrA3D/+q/K212CJ3ftjvU 51dM+2bH/4vUwmr4EzLtWo3j4yUK4xgZ+hfkm8rZ+G/Vf3uNs+ajqp1FY6ye8nn+3Z4K4tHXBZ4 yAQA= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Nathan Chancellor commit ef70eff9dea66f38f8c2c2dcc7fe4b7a2bbb4921 upstream. When building with clang + -Wtautological-pointer-compare, these instances pop up: kernel/profile.c:339:6: warning: comparison of array 'prof_cpu_mask' not = equal to a null pointer is always true [-Wtautological-pointer-compare] if (prof_cpu_mask !=3D NULL) ^~~~~~~~~~~~~ ~~~~ kernel/profile.c:376:6: warning: comparison of array 'prof_cpu_mask' not = equal to a null pointer is always true [-Wtautological-pointer-compare] if (prof_cpu_mask !=3D NULL) ^~~~~~~~~~~~~ ~~~~ kernel/profile.c:406:26: warning: comparison of array 'prof_cpu_mask' not= equal to a null pointer is always true [-Wtautological-pointer-compare] if (!user_mode(regs) && prof_cpu_mask !=3D NULL && ^~~~~~~~~~~~~ ~~~~ 3 warnings generated. This can be addressed with the cpumask_available helper, introduced in commit f7e30f01a9e2 ("cpumask: Add helper cpumask_available()") to fix warnings like this while keeping the code the same. Link: https://github.com/ClangBuiltLinux/linux/issues/747 Link: http://lkml.kernel.org/r/20191022191957.9554-1-natechancellor@gmail.c= om Signed-off-by: Nathan Chancellor Reviewed-by: Andrew Morton Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [ These warnings are also visible with recent GCC versions. ] Signed-off-by: Matthieu Baerts (NGI0) --- kernel/profile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/profile.c b/kernel/profile.c index b5ce18b6f1b9..af3d5c34d051 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -344,7 +344,7 @@ static int profile_dead_cpu(unsigned int cpu) struct page *page; int i; =20 - if (prof_cpu_mask !=3D NULL) + if (cpumask_available(prof_cpu_mask)) cpumask_clear_cpu(cpu, prof_cpu_mask); =20 for (i =3D 0; i < 2; i++) { @@ -381,7 +381,7 @@ static int profile_prepare_cpu(unsigned int cpu) =20 static int profile_online_cpu(unsigned int cpu) { - if (prof_cpu_mask !=3D NULL) + if (cpumask_available(prof_cpu_mask)) cpumask_set_cpu(cpu, prof_cpu_mask); =20 return 0; @@ -411,7 +411,7 @@ void profile_tick(int type) { struct pt_regs *regs =3D get_irq_regs(); =20 - if (!user_mode(regs) && prof_cpu_mask !=3D NULL && + if (!user_mode(regs) && cpumask_available(prof_cpu_mask) && cpumask_test_cpu(smp_processor_id(), prof_cpu_mask)) profile_hit(type, (void *)profile_pc(regs)); } --=20 2.51.0