From nobody Mon May 25 09:57:32 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 C080C3D5656; Sun, 17 May 2026 23:05:32 +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=1779059132; cv=none; b=CTEzP7XeVH9CogVi9zphm62GCcX1GoO6A74RZvnHxQ8WgVzuEdEXGMPX41Iemj5suALeXFHoc3aOHufSeUVP+8mbNv4ZH2sf6kQq/ds5qDuM0oAETX0Lddsm5tgn1OVdiotZBySjglASUuGZFs3//x49Uu+YIJnox7LxOQeYdVc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059132; c=relaxed/simple; bh=rOmTabndOoOX7AmULUZroOZTY/ZAC4Q9umxkdxMQeds=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ly0CNGtPdRK6YoklrujDLgY1TmT34nYqu2D0OnmQz9/X9InJSYYVK2tM4Mc2oCyvve7Z41ZMYANI5LY73opwLKYxbvxSAYhsQGOxUSz75BejB6OJNASecvSa1aHjSl0jekatafJeIBvcPOlh5FRnwBfDXA93tz6RYbR5vM1iDBM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=om0tmjJt; 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="om0tmjJt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4335FC2BCB3; Sun, 17 May 2026 23:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059132; bh=rOmTabndOoOX7AmULUZroOZTY/ZAC4Q9umxkdxMQeds=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=om0tmjJtiEXsd7zEymiSPQRCBV+VoM9SSR/41DFzBGphNGT2qBxd9dj5MhCQLNQaI Df4aE0euUAlLQ4l4sZ4qztJpxQVeBdsYPXb1wnPW5EzngIT2pocIGrjckkuj+2hLpU kg2bg5xApZdLeV7JWnvOnGnb/klp61O4cxeq4B2ESA0uBCo4AnRzHkU0/sli+xrJMJ PaVYgpoA5NubciPbwYcREgkKh+pCsx6D4sjbv+D2vZW5A77OgBWoY1LWlj/2DZIEiZ rcfXNIiIp0r+0FNcAVd1lmsfA2TpImCSZmE5AXzMzTHf1Da0+8yYGoGVw4YH0U/Thi qeKF6NpVGqNsA== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:04 -1000 Subject: [PATCH v2 01/16] kbuild: Bump minimum version of LLVM for building the kernel to 17.0.1 Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-1-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Jonathan Corbet , Shuah Khan , linux-doc@vger.kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=7199; i=nathan@kernel.org; h=from:subject:message-id; bh=rOmTabndOoOX7AmULUZroOZTY/ZAC4Q9umxkdxMQeds=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnhsYTwYbsN8U8Pc086itCH4n8VviqZXqr2QtzaWXx V+2LU7vKGVhEONikBVTZKl+rHrc0HDOWcYbpybBzGFlAhnCwMUpABNxlWb4H+rhMKdL56DtESXd XlsJJgGPqg35mu82m9tcCbirprLoAsNv1tcFr6VvtNZfPFmmV7x08sWtWT8X2pWcae11D7qx71o HMwA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 The current minimum version of LLVM for building the kernel is 15.0.0. However, there are two deficiencies compared to GCC that were fixed in LLVM 17 that are starting to become more noticeable. The first was a bug in LLVM's scope checker [1], where all labels in a function were validated as potential targets of an asm goto statement, even if they were not listed in the asm goto statement as targets. This becomes particularly problematic when the cleanup attribute is used, as asm goto(... : label_a); ... label_a: ... int var __free(foo); asm goto(... : label_b); ... label_b: ... will trigger an error since the scope checker will complain that the cleanup variable would be skipped when jumping from the first asm goto to label_b (which obviously cannot happen). This issue was the catalyst for commit e2ffa15b9baa ("kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on clang < 17"). Unfortunately, this issue is reproducible with regular asm goto in addition to asm goto with outputs, so that change was not entirely sufficient to avoid the issue altogether. As asm goto has effectively been required since commit a0a12c3ed057 ("asm goto: eradicate CC_HAS_ASM_GOTO") and the usage of the cleanup attribute continues to grow across the tree, raising the minimum to a version that avoids this issue altogether is a better long term solution than attempting to workaround it at every spot where it happens. The second issue is an incompatibility with GCC 8.1+ around variables marked with const being valid constant expressions for _Static_assert and other macros [2]. With GCC 8.1 being the minimum supported version since commit 118c40b7b503 ("kbuild: require gcc-8 and binutils-2.30"), this incompatibility becomes more of a maintenance burden since only clang-15 and clang-16 are affected by it. Looking at the clang version of various major distributions through Docker images, no one should be left behind as a result of this bump, as the old ones cannot clear the current minimum of 15.0.0. archlinux:latest clang version 22.1.3 debian:oldoldstable-slim Debian clang version 11.0.1-2 debian:oldstable-slim Debian clang version 14.0.6 debian:stable-slim Debian clang version 19.1.7 (3+b1) debian:testing-slim Debian clang version 21.1.8 (3+b1) debian:unstable-slim Debian clang version 21.1.8 (7+b1) fedora:42 clang version 20.1.8 (Fedora 20.1.8-4.fc42) fedora:latest clang version 21.1.8 (Fedora 21.1.8-4.fc43) fedora:44 clang version 22.1.1 (Fedora 22.1.1-2.fc44) fedora:rawhide clang version 22.1.3 (Fedora 22.1.3-1.fc45) opensuse/leap:latest clang version 17.0.6 opensuse/tumbleweed:latest clang version 21.1.8 ubuntu:jammy Ubuntu clang version 14.0.0-1ubuntu1.1 ubuntu:noble Ubuntu clang version 18.1.3 (1ubuntu1) ubuntu:questing Ubuntu clang version 20.1.8 (0ubuntu4) ubuntu:resolute Ubuntu clang version 21.1.8 (6ubuntu1) 17.0.1 is chosen as the minimum instead of 17.0.0 to ensure that the particular version of LLVM 17 has the two aforementioned bugs fixed, as the second was fixed during the 17.0.0 release candidate phase and it was not until LLVM 18 that LLVM adopted the scheme of x.0.0 being a prerelease version and x.1.0 is a release version [3] to help with scenarios such as this. Link: https://github.com/llvm/llvm-project/commit/f023f5cdb2e6c19026f04a15b= 5a935c041835d14 [1] Link: https://github.com/llvm/llvm-project/commit/0b2d5b967d98375793897295d= 651f58f6fbd3034 [2] Link: https://github.com/llvm/llvm-project/commit/4532617ae420056bf32f6403d= de07fb99d276a49 [3] Acked-by: Nicolas Schier Signed-off-by: Nathan Chancellor --- Cc: Jonathan Corbet Cc: Shuah Khan Cc: linux-doc@vger.kernel.org --- Documentation/process/changes.rst | 2 +- Documentation/translations/it_IT/process/changes.rst | 2 +- Documentation/translations/pt_BR/process/changes.rst | 2 +- scripts/min-tool-version.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/process/changes.rst b/Documentation/process/chan= ges.rst index 9a99037270ff..b9afce768446 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst @@ -36,7 +36,7 @@ bindgen (optional) 0.71.1 bindgen --version binutils 2.30 ld -v bison 2.0 bison --version btrfs-progs 0.18 btrfs --version -Clang/LLVM (optional) 15.0.0 clang --version +Clang/LLVM (optional) 17.0.1 clang --version e2fsprogs 1.41.4 e2fsck -V flex 2.5.35 flex --version gdb 7.2 gdb --version diff --git a/Documentation/translations/it_IT/process/changes.rst b/Documen= tation/translations/it_IT/process/changes.rst index 7e93833b4511..7ee54c972418 100644 --- a/Documentation/translations/it_IT/process/changes.rst +++ b/Documentation/translations/it_IT/process/changes.rst @@ -33,7 +33,7 @@ PC Card, per esempio, probabilmente non dovreste preoccup= arvi di pcmciautils. Programma Versione minima Comando per verificare la ve= rsione =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D GNU C 8.1 gcc --version -Clang/LLVM (optional) 13.0.0 clang --version +Clang/LLVM (optional) 17.0.1 clang --version Rust (opzionale) 1.78.0 rustc --version bindgen (opzionale) 0.65.1 bindgen --version GNU make 4.0 make --version diff --git a/Documentation/translations/pt_BR/process/changes.rst b/Documen= tation/translations/pt_BR/process/changes.rst index 1964c1c93b34..6bbfe60fd973 100644 --- a/Documentation/translations/pt_BR/process/changes.rst +++ b/Documentation/translations/pt_BR/process/changes.rst @@ -31,7 +31,7 @@ PC Card por exemplo, provavelmente n=C3=A3o precisar=C3= =A1 se preocupar com o pcmciautil Programa Vers=C3=A3o m=C3=ADnima Comando para verific= ar a vers=C3=A3o =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D GNU C 8.1 gcc --version -Clang/LLVM (optional) 15.0.0 clang --version +Clang/LLVM (optional) 17.0.1 clang --version Rust (optional) 1.78.0 rustc --version bindgen (optional) 0.65.1 bindgen --version GNU make 4.0 make --version diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh index b96ec2d379b6..ea2689bc9641 100755 --- a/scripts/min-tool-version.sh +++ b/scripts/min-tool-version.sh @@ -27,7 +27,7 @@ llvm) if [ "$SRCARCH" =3D loongarch ]; then echo 18.0.0 else - echo 15.0.0 + echo 17.0.1 fi ;; rustc) --=20 2.54.0 From nobody Mon May 25 09:57:32 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 274C13D47B8; Sun, 17 May 2026 23:05:35 +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=1779059135; cv=none; b=VnltOIaiJeqz1+Sxtl2GsexEIAxY3Oq/ur9Sb7qgjcrqVF5WjBVwbML0FvWYHgLboUl0FeRsB7rvRlotymyDPPmeprjHvwdg5TAII07+3w9BvTdlMKn6pmGSfPUdtyqx9Kgxno4JBqSWUCCiBmZnayBx60f80iPIsQRPGFhvI5U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059135; c=relaxed/simple; bh=n5geXy75GzY0xfbQhH8lMaqrPIVTmkeJYtStfi4s3lA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=udvq5QUhWQSsiorKtVMdowAo2i3hTFYcRdVy3C9TjwHZHtIdsqgKGW5tBWghduSuRrWff4uZk682aOSoaqFijz57EaKAi6bShbH5BMW+hh6Ty1YYTvX4bs1UvrIDQaJVOAu9XLhl3bbfegVY2h4LPyhYD7JBygIhccTopPJU+Kw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iyMEzv5J; 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="iyMEzv5J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEEBBC2BCF6; Sun, 17 May 2026 23:05:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059135; bh=n5geXy75GzY0xfbQhH8lMaqrPIVTmkeJYtStfi4s3lA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=iyMEzv5JqHqllptCTqlK5+1NofSNS5FJtXJS2xprYPqZIXooVWvYLFU2nuJevIkmy q/4sagjdZnPlz2AuLLu84/CyOoKRxO+F8tAC+9Olt5TWY8P8cAow74CeN1KowbRUi/ RefJes3nTa4J4/LZFT7r/0Qy01Ro99jME15VQr2qONJKSfCdQCqfrV/HhCapnWd1sd dmmPcIPrMbkaV+6tqfUITtoS1MQ7WppbB3KT4DsCOEL2YPu/YVO7gYCt/PAEqVNAkY DRxIp7o6C5uW9pOu+faCjMCdi8mhinvuTp1Jn0Rxii1cyD6lnYcBmlOBf7BRZbj03T 9FR9FUxgnSnSg== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:05 -1000 Subject: [PATCH v2 02/16] security/Kconfig.hardening: Remove tautological condition from CC_HAS_ZERO_CALL_USED_REGS Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-2-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Kees Cook , "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org, linux-security-module@vger.kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1155; i=nathan@kernel.org; h=from:subject:message-id; bh=n5geXy75GzY0xfbQhH8lMaqrPIVTmkeJYtStfi4s3lA=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnhvWfvSY8G3N6wAvX4tbs7YLBTUfXnBgNRfXuoNXl r4NeJmV1VHKwiDGxSArpshS/Vj1uKHhnLOMN05NgpnDygQyhIGLUwAmoiHB8E9rYl8wxya1bOvV +48ft1wfcL6J59XL+NQvX+8z7a2UFepkZDgVNtOto65q00mH1mz3guOGu1SOT7rPd/hZ2VWdlsM GS5kA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the '!Clang || Clang > 15.0.6' dependency for CONFIG_CC_HAS_ZERO_CALL_USED_REGS is always true, so it can be removed. Reviewed-by: Nicolas Schier Signed-off-by: Nathan Chancellor --- Cc: Kees Cook Cc: Gustavo A. R. Silva Cc: linux-hardening@vger.kernel.org Cc: linux-security-module@vger.kernel.org --- security/Kconfig.hardening | 3 --- 1 file changed, 3 deletions(-) diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening index 86f8768c63d4..a0461d648396 100644 --- a/security/Kconfig.hardening +++ b/security/Kconfig.hardening @@ -189,9 +189,6 @@ config INIT_ON_FREE_DEFAULT_ON =20 config CC_HAS_ZERO_CALL_USED_REGS def_bool $(cc-option,-fzero-call-used-regs=3Dused-gpr) - # https://github.com/ClangBuiltLinux/linux/issues/1766 - # https://github.com/llvm/llvm-project/issues/59242 - depends on !CC_IS_CLANG || CLANG_VERSION > 150006 =20 config ZERO_CALL_USED_REGS bool "Enable register zeroing on function exit" --=20 2.54.0 From nobody Mon May 25 09:57:32 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 15EA233859C; Sun, 17 May 2026 23:05:37 +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=1779059140; cv=none; b=C7Bd0Dl5uzWg79+GXfsAwaxL5DnZDaD4fTAIeiNLNfdVDubEdsobUSbgz/qaVJgJG1b2RLAEAJtOkzv4dAOtsAoQa8UF3QcZP4ghWjZBc4dDJ+b+CHOL838PIzjgXuxGaVgcMqTHW4KdbQd0XpiuCzeR3UwkcMVl+qgj0T8mSgA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059140; c=relaxed/simple; bh=YfEm8FBArmiuV/irEQDmk4NgtmRFGY6kjLc0CatzI6E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IXTiPql51ikryFvltINf79IWhbSMBdBmhV4QX/+iTHgBpr9zZOcLDVAl+7913250Dgj3c4w861LCJ6uq0YWOwfJsk5Qv6tPBhKaN5L3eC7NlbqVI7AAILgoYP3rG1mOAh0nGUw4N+DIz8iSiqcp7J2MU7kLPJf2P+G5UWOU5SMQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IJvFpmiy; 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="IJvFpmiy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71715C2BCB0; Sun, 17 May 2026 23:05:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059137; bh=YfEm8FBArmiuV/irEQDmk4NgtmRFGY6kjLc0CatzI6E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IJvFpmiy2y9ngZf9eKR1lU4yqGsDYSObWzgSsw1aPIVM9zc5gxx3pebbioe0VPVKQ Jb3FHTMCRxWFXNuxZizuh0V3yiR/BS21/QvEl/FAuMVh/EpbKJskqlDj+80kKSCYQH ucGs2q6pvPzqLXg0Tqn4CT30pylN80fPyK3DtwnwU3HdI9bNIyVVZHpQLIrjMtKNVM xJSon8cRMVCAwEzeTxNnaus0Vtc1UWkPOq65pUtRmjFy3VTXHgTBelMBXVe1vn8k51 D3ZR4x27x+F4crMnWE2TNZaAZgIwVD5/C5n/9KCf6oH57zOuc8jgataJwbJJCJWYef 7szCmpv3V/Olg== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:06 -1000 Subject: [PATCH v2 03/16] security/Kconfig.hardening: Remove tautological condition from FORTIFY_SOURCE Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-3-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Kees Cook , "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org, linux-security-module@vger.kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1194; i=nathan@kernel.org; h=from:subject:message-id; bh=YfEm8FBArmiuV/irEQDmk4NgtmRFGY6kjLc0CatzI6E=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnhts/At/WnR93v/7QPL0r7MeX0t/nVN+zZX17azP1 YdnsK/U6ShlYRDjYpAVU2Spfqx63NBwzlnGG6cmwcxhZQIZwsDFKQAT4ZzByLBcX/dGibU801Yx cQ0BPa4lO5qNA55OZWd+bfmraqv/RHNGhmch5xn55fj+N89aona2sq9vN/+iRZ9zD9TtOvpF54/ DVA4A X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the '!X86_32 || !Clang || Clang > 16' dependency of CONFIG_FORTIFY_SOURCE is always true, so it can be removed. Reviewed-by: Nicolas Schier Signed-off-by: Nathan Chancellor --- Cc: Kees Cook Cc: Gustavo A. R. Silva Cc: linux-hardening@vger.kernel.org Cc: linux-security-module@vger.kernel.org --- security/Kconfig.hardening | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening index a0461d648396..e4f23c08a17a 100644 --- a/security/Kconfig.hardening +++ b/security/Kconfig.hardening @@ -213,8 +213,6 @@ menu "Bounds checking" config FORTIFY_SOURCE bool "Harden common str/mem functions against buffer overflows" depends on ARCH_HAS_FORTIFY_SOURCE - # https://github.com/llvm/llvm-project/issues/53645 - depends on !X86_32 || !CC_IS_CLANG || CLANG_VERSION >=3D 160000 help Detect overflows of buffers in common string and memory functions where the compiler can determine and validate the buffer sizes. --=20 2.54.0 From nobody Mon May 25 09:57:32 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 A01D43D6690; Sun, 17 May 2026 23:05:40 +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=1779059140; cv=none; b=sChUBbJBCJTNUK9cC4hKD2SY8vdJdhOQGfGdWsoJ5qboMxsimgKD5qDVYHJEvC7LczJnyb3hVe4QZchKo/nJD1J2wKro7PA3Mzsp8OfZTNsQp2nqjGmW4cljiuxnW1rZTEUhDCOwtbMHDEqROiuod06qPt0jcQC0ZOuk5HQRVHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059140; c=relaxed/simple; bh=NbvxRGPRdLLz8f2twSL8Hl1CgnbTDAstxmL+2JiqVFo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Bsp0/1VvN9l+ZdT6LTVKK5zDEW3B2yux8m6obZZL+y3dB6tI1mhmZVT4Y741BwdbZn8XTGe7tcgE45/DiNNtt7Zo0/hZmyzVuJ/5jcDmo9N0IrL+CiZcQn1ZSN8Z1jD8L9OE/2M0kdJ9r7HmqMMCT4hzXuBwRZyjCxYrnbv0HVA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SxGVTqjm; 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="SxGVTqjm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24478C2BCB3; Sun, 17 May 2026 23:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059140; bh=NbvxRGPRdLLz8f2twSL8Hl1CgnbTDAstxmL+2JiqVFo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=SxGVTqjmGmnWiqvVoHbzvMCiPiCyQgw1hGCCGdfa334N7vMyDs2D5rDFDmnPShK30 algF43L8K5cjLnMxYWHTTvKW0V8kE/FNJWp2nd+txYgVdTfEbN5HXSInyhM4TnJ3+D PJPIya2qxy9JOMZNWlC/EH6DFjaPgF41/CP03nIdIF2jMvBjCCZejWV27+LbvIDVg5 s1k5FhGPUm7dz9n1vE4xZGk5Od3SHUp6OrpH04bd3S4bbP7TcN42cMD7lI3vWbSo4G offzH2OZfzUlBO7+slze3/b6sp5RMPnKYTYDVwIjeiZhSeJhT+MpcpPg17Z2JHkeo8 P5R/8b/Hb4HGw== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:07 -1000 Subject: [PATCH v2 04/16] security/Kconfig.hardening: Remove tautological condition from CC_HAS_RANDSTRUCT Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-4-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Kees Cook , "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org, linux-security-module@vger.kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1143; i=nathan@kernel.org; h=from:subject:message-id; bh=NbvxRGPRdLLz8f2twSL8Hl1CgnbTDAstxmL+2JiqVFo=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnht/fvxz5c686YpbZpdZfvi/+PfFpLaougsrePMcH EIy3WXYO0pZGMS4GGTFFFmqH6seNzScc5bxxqlJMHNYmUCGMHBxCsBNFmRkmPlbJc8n5bf/kkON mrYrjfa++Pbw2MxpSlcEbOwzHGJ3HWX4Z3lslYLpmYlHJokkbpsv8DJsldz5KVvDAlq7N22ZsvF 9HCMA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the '!Clang || Clang >=3D 16' dependency for CONFIG_CC_HAS_RANDSTRUCT is always true, so it can be removed. Reviewed-by: Nicolas Schier Signed-off-by: Nathan Chancellor --- Cc: Kees Cook Cc: Gustavo A. R. Silva Cc: linux-hardening@vger.kernel.org Cc: linux-security-module@vger.kernel.org --- security/Kconfig.hardening | 3 --- 1 file changed, 3 deletions(-) diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening index e4f23c08a17a..b90cf9ed4642 100644 --- a/security/Kconfig.hardening +++ b/security/Kconfig.hardening @@ -274,9 +274,6 @@ endmenu =20 config CC_HAS_RANDSTRUCT def_bool $(cc-option,-frandomize-layout-seed-file=3D/dev/null) - # Randstruct was first added in Clang 15, but it isn't safe to use until - # Clang 16 due to https://github.com/llvm/llvm-project/issues/60349 - depends on !CC_IS_CLANG || CLANG_VERSION >=3D 160000 =20 choice prompt "Randomize layout of sensitive kernel structures" --=20 2.54.0 From nobody Mon May 25 09:57:32 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 CA5CF221540; Sun, 17 May 2026 23:05:42 +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=1779059144; cv=none; b=kA2a0J5c4NdlwF3AkxaZUqvJv8erQSWz9679fkkO+JLdr8bUqxZk5knSvVh0wz2XezRjIDcDr3a6hwyc3J321jmVPutPxlLPqK96tKROL4fFTE3Xm+V+H1zkk+XVwXqrceyfR5W+mNLM1LajWYEnWN0N9t3KH4u/mZkbzgihoTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059144; c=relaxed/simple; bh=8gUcJ6jc14raMb2k8QcHLAcHl1/4TrTWMAhTkoid1Lo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=a5vtlFt84QZGOdp5wzRWzVHiX6hISUP6IsKu2ufXhABRR3BJUaPgWqRlKsXcD14kngYeDN0OYAflqaogBPm7Ruty+AZ5Wd5l2biXT6anP9RoqGFJ1nc4BUjoxXc74XTMPshvPb1mtrrRF14+fP3ywRVlNil/HdodEdMiYcAONgQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Xcuwhxy8; 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="Xcuwhxy8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB08DC2BCF5; Sun, 17 May 2026 23:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059142; bh=8gUcJ6jc14raMb2k8QcHLAcHl1/4TrTWMAhTkoid1Lo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Xcuwhxy8XSWyGm7/cs0UUm5fhRXoxz8D4H4zZe47NyvQu/d92ebQoJWX65dzpedYQ 74P6HMGek5lhNbznj5t5J7KEoDDGTKdHO7GpZO3hs5TzJ7T1nKrlQrrIvkeKvSgdZV 4PjWvVQywUJvNqrtrpE+dVFTZBZc8kqnwtz518MyKnecgdPuCwjm881vXljhIdD3gq I1uJR7JUjfKR07xWL3ZYGYp2v6diuiBm9PCIAy9vBMGJ0WdrRzAIVRCQvKHMaIA7gg urvdwgDTEI0YDBFJgOeWyKCihTU6FyKekxDJA9pvfnADnSd0dbVR9aRd4Wd4/YjQ1G ybtsfGbCtsAKw== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:08 -1000 Subject: [PATCH v2 05/16] arch/Kconfig: Remove tautological conditions from HAS_LTO_CLANG Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-5-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1037; i=nathan@kernel.org; h=from:subject:message-id; bh=8gUcJ6jc14raMb2k8QcHLAcHl1/4TrTWMAhTkoid1Lo=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnhuXfq2e4a08wabkbdGKNqPfJ0Rb687e9vvwIaVZg 1WgqYKzo5SFQYyLQVZMkaX6sepxQ8M5ZxlvnJoEM4eVCWQIAxenAExkVxIjw8n+wzEPrThcgzc5 HeSd9u5mrOKqdfdeHNQ+8SMqO+TpRlZGhj13nxzw5Pr/+Fh28inPaeGr65es37czjv2wUPxDBua tNXwA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, two dependency lines in CONFIG_HAS_LTO_CLANG are always true because Clang will always be newer than 17.0.0, so they can be removed. Reviewed-by: Nicolas Schier Signed-off-by: Nathan Chancellor --- arch/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index e86880045158..0d34bcafecaa 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -806,9 +806,6 @@ config HAS_LTO_CLANG depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) depends on ARCH_SUPPORTS_LTO_CLANG depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT - # https://github.com/ClangBuiltLinux/linux/issues/1721 - depends on (!KASAN || KASAN_HW_TAGS || CLANG_VERSION >=3D 170000) || !DEB= UG_INFO - depends on (!KCOV || CLANG_VERSION >=3D 170000) || !DEBUG_INFO depends on !GCOV_KERNEL help The compiler and Kconfig options support building with Clang's --=20 2.54.0 From nobody Mon May 25 09:57:32 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 CA5621F3B85; Sun, 17 May 2026 23:05:44 +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=1779059144; cv=none; b=C1Cf+m0+hoOX20lGFKMaIvQjzZxK9E00eiSK4c6lep3dL1L6mWueUn3ahks5AW52qxtNhVej1selj/QAQhkBkY7cZGLbLq5+97ycansp2VBDuCGnA0A2yOk3DnaCAKj4FAqHwuXP77YPwTRHOIrUa26JJZW4UbOO8dAx+i2RBHc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059144; c=relaxed/simple; bh=19Rw+tS9ftgXCdxPfdLASsRDUPpfJwnFAJuXr7byz6k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uV5kP9mO/9kRZsA9+pDaRHNEQP34t0vBZ5XyFF3hfchC6r/Zw+eUE3x2N1fjJBG6zi5tukoVa4/XcaHbfaigswsy3SeRoGewlwaJnqKakge2R8/10Aijb/RzCS+5i7G6YUS5GY1xomt0sWj9HvaWu+oaFYREHgqRChTp+/LjyCM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pP37i3DD; 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="pP37i3DD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5AECC2BCFB; Sun, 17 May 2026 23:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059144; bh=19Rw+tS9ftgXCdxPfdLASsRDUPpfJwnFAJuXr7byz6k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pP37i3DDmF7qc9mFcOIwFNOsiDCnodEmIk1daOpzc+Qv6Lar+fbCeIJcUsO6VEZKY FKyzNRLM888mvHC6heQJceBz6CfwwAi//YgxrQ831GxUUE8KGi4J0zCU2axVgm8rS3 8BVRyVgQk5YqnXYWNXIbWCc5Q7NwQio9e6RQutm79QpBykqpKU1nafauDh/pzF2JoL Dy/VgnsHWRlg5XPEVLlH0aXbaACNuHLFo6GmGdLqLYQo9mr0lHEpEbJjvz2ML1Hz9w you/fgql8QVEZphDEl3wec2vTfEhhA5SxcA22YEz9IahAD7GM/MOEWB/p/l2mim3zd VXiTIaXuf5L4A== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:09 -1000 Subject: [PATCH v2 06/16] arch/Kconfig: Remove tautological condition from AUTOFDO_CLANG Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-6-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Rong Xu , Han Shen X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=907; i=nathan@kernel.org; h=from:subject:message-id; bh=19Rw+tS9ftgXCdxPfdLASsRDUPpfJwnFAJuXr7byz6k=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnhsfHxR049dVYVTz39jx/evOzDUrVdwuKb38O9fTk WfrHZbOjlIWBjEuBlkxRZbqx6rHDQ3nnGW8cWoSzBxWJpAhDFycAjCRvGuMDL8ljNI9lPTP7GFc piPGuNbMraqpagFH0kpTZQlB+3sfdzL8M/Wztjms8lp6Y2y4TvDpTSnX9i5Id3i5ZdoLXq/adyc 5uQA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the clang version check in CONFIG_AUTOFDO_CLANG can be removed because it is always true. Reviewed-by: Rong Xu Signed-off-by: Nathan Chancellor --- Cc: Han Shen --- arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 0d34bcafecaa..5d6e9f56210b 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -866,7 +866,7 @@ config ARCH_SUPPORTS_AUTOFDO_CLANG config AUTOFDO_CLANG bool "Enable Clang's AutoFDO build (EXPERIMENTAL)" depends on ARCH_SUPPORTS_AUTOFDO_CLANG - depends on CC_IS_CLANG && CLANG_VERSION >=3D 170000 + depends on CC_IS_CLANG help This option enables Clang=E2=80=99s AutoFDO build. When an AutoFDO profile is specified in variable --=20 2.54.0 From nobody Mon May 25 09:57:32 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 7FC963161A1; Sun, 17 May 2026 23:05:47 +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=1779059147; cv=none; b=GaW/jTr3G97wzX6borVlR0Y+FpcD+1LuWc+bbrsGUUQGp+s7zFSsPlnRmrpRUfbv/XrzD84mTx+H2jqLH+mDllXA4qqkpe58Pnghq9Bjb6+17yDFpH2mgQQMfF5kBw4kDRsQx57Kkrh9v1Z6woCrAMPTJjn6+T/U4sCkV49Zs8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059147; c=relaxed/simple; bh=1JdIJ9vb9jL455rjHOOqE3nIS6G4mkOnP3omecCdeRw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=G1XrbhVWXkHl3SkOf3WRF92wHn2XLlZ4KKCYHy3kJyQH9dsFHXG82GvtYhYN3kSKdx5lqxjxF7I1lXU819Sts8oNnnJMFnn6z57SDxoErPw96luoLOrCKVFHkGj2OhRpxaOfXeCtiN/akT6nWYHJhK/gPZARjoOvstmcevpPkC4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=II85SHSV; 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="II85SHSV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22416C2BCB3; Sun, 17 May 2026 23:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059147; bh=1JdIJ9vb9jL455rjHOOqE3nIS6G4mkOnP3omecCdeRw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=II85SHSVBGKfnV5vgFXTbKf9rEgp1YYAyEOs6BtGoj5be2aR6tvWwOd1Pumz4smzu vm8Si0vaTQJF50m+fJcJx/93YPZyfFzKs52iRisLrIQ799oQ2SEv0Tgy30U8QfPWt5 +R6xbnPeajgcsHy811hZPd4erJu617fF/IpdqKOl0Qxr2o4qIJSHCXeTz8BjMW1Ff8 Vy6+5iAHanyi3H2e5ubFZ9OpOXXSrZDk8XDZyhNg3aFxMFFrGO7pCKTtch+mFrbxMQ 1mBIoJmZQ4mn22kPILRhxae5GJXhsbN5atq7zK/mYvW7leYFfN51KkKMJsUp5Hpycl Z22ksK5WMxEFQ== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:10 -1000 Subject: [PATCH v2 07/16] ARM: Drop tautological ld.lld conditions from ARCH_MULTI_V4{,T} Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-7-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1383; i=nathan@kernel.org; h=from:subject:message-id; bh=1JdIJ9vb9jL455rjHOOqE3nIS6G4mkOnP3omecCdeRw=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnhs/L49o7y4JNXJJv+iu5Lrqz3orziqeE1/m+s003 Zt41zmjo5SFQYyLQVZMkaX6sepxQ8M5ZxlvnJoEM4eVCWQIAxenAEykfibDbxaj5IMfN5QeN9ZJ OFoWzvEotrShQEDsw/fJ3Pv/y7hKSzIyfEpZkj6n3ipjmnLGSXHnSMWKS8v23VH0Ewu/Yb5T6sd cXgA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the '!ld.lld || ld.lld >=3D 16' dependency of CONFIG_ARCH_MULTI_V4{,T} is always true, so tit can be removed from both symbols. Signed-off-by: Nathan Chancellor --- Cc: Russell King Cc: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/Kconfig.platforms | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/Kconfig.platforms b/arch/arm/Kconfig.platforms index 5c19c1f2cff6..386eccc81868 100644 --- a/arch/arm/Kconfig.platforms +++ b/arch/arm/Kconfig.platforms @@ -8,16 +8,12 @@ comment "CPU Core family selection" config ARCH_MULTI_V4 bool "ARMv4 based platforms (FA526, StrongARM)" depends on !ARCH_MULTI_V6_V7 - # https://github.com/llvm/llvm-project/issues/50764 - depends on !LD_IS_LLD || LLD_VERSION >=3D 160000 select ARCH_MULTI_V4_V5 select CPU_FA526 if !(CPU_SA110 || CPU_SA1100) =20 config ARCH_MULTI_V4T bool "ARMv4T based platforms (ARM720T, ARM920T, ...)" depends on !ARCH_MULTI_V6_V7 - # https://github.com/llvm/llvm-project/issues/50764 - depends on !LD_IS_LLD || LLD_VERSION >=3D 160000 select ARCH_MULTI_V4_V5 select CPU_ARM920T if !(CPU_ARM7TDMI || CPU_ARM720T || \ CPU_ARM740T || CPU_ARM9TDMI || CPU_ARM922T || \ --=20 2.54.0 From nobody Mon May 25 09:57:32 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 817EC1E511; Sun, 17 May 2026 23:05:50 +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=1779059150; cv=none; b=q9hWuzEJl8uB6H4GYq3RAq0RUx5fhjQ78EcPosUiLM37gjo1V87CRHf0UbASQz1CcN/ZjUurr1LLi3JzEcU4mRK+kCh7xvNavYc3P/eTci9mc9KRsodH3rzJNISEeVlKeoHz6cgDycSBG4xDow4ct7WcgeoYgE/nUXz7BuIrYeI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059150; c=relaxed/simple; bh=xt/hUeyba8w0CmJ8CXSb6hKOQbJSb9j0i1jLwFA91wA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JDUM+O8qziu8XUrixfna0drInSzrGaL3z679Y/whLfAzLE4vKuKqllMbsDQP1/aD6XwFwEdYbdXO/XIXrZMVlfRiae2GvoXG9wvk9Usvqg2M0HYQEHKHyhQran29CXZHrWSVgOTWcm7IwKsE3eUOQBls4PSGgWu9THX7eoh+lNw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Vclbl3IT; 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="Vclbl3IT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DFE0C4AF0C; Sun, 17 May 2026 23:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059150; bh=xt/hUeyba8w0CmJ8CXSb6hKOQbJSb9j0i1jLwFA91wA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Vclbl3IT3wOblDXpomJab09F4LGnGTE3N74msN0m5v9afiVupdkx4tqBQ+aiGAjIv 8hxa/Jkchw+b0Te4x2YL1UsgEL8AyPw95deGcTryQWgICAt8KkNJmMT1UNbBKI7hSt 6/4CFyBT6tEFx6XMMawyQ0KYhBDwDSWmNgsC7//MFLMS376T6Y4/a2CKYjDqkVf9RX 0kPH8aR1jpItqqdH1vuPcVpr5swJ4GLs76BOqABYr/DFVRU9wA+rQW7ctJ6r54Fxzn 3Vm7+HD8/XdRdTMQj+dMR+jxcrTjfVlKw/BXASFKtCZhKCOFyaJR4BqaBe/WRCgE5z /G0Nn4zKnvXyA== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:11 -1000 Subject: [PATCH v2 08/16] riscv: Remove tautological condition from selection of ARCH_SUPPORTS_CFI Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-8-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Kees Cook , linux-riscv@lists.infradead.org, linux-hardening@vger.kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1272; i=nathan@kernel.org; h=from:subject:message-id; bh=xt/hUeyba8w0CmJ8CXSb6hKOQbJSb9j0i1jLwFA91wA=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnhvVNZVOtHdfSCnRfhXW+EfikE6T7KH03J7cfrlnh VPKJLM6SlkYxLgYZMUUWaofqx43NJxzlvHGqUkwc1iZQIYwcHEKwET2qjIydLmylcT56KWrH82X zt31nZ358DXzJsfWrl3HFsgX/GJWYPhf1ueTY8JgeXmr3kSmuhbeF/NXKkzZJb3b000hWcZ67R4 +AA== X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the condition of the selection of CONFIG_ARCH_SUPPORTS_CFI is always true, so it can be removed. Acked-by: Paul Walmsley # arch/riscv Signed-off-by: Nathan Chancellor --- Cc: Palmer Dabbelt Cc: Albert Ou Cc: Alexandre Ghiti Cc: Kees Cook Cc: linux-riscv@lists.infradead.org Cc: linux-hardening@vger.kernel.org --- arch/riscv/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index d235396c4514..7ffbf6032b61 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -61,8 +61,7 @@ config RISCV select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT select ARCH_STACKWALK select ARCH_SUPPORTS_ATOMIC_RMW - # clang >=3D 17: https://github.com/llvm/llvm-project/commit/62fa708ceb02= 7713b386c7e0efda994f8bdc27e2 - select ARCH_SUPPORTS_CFI if (!CC_IS_CLANG || CLANG_VERSION >=3D 170000) + select ARCH_SUPPORTS_CFI select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE select ARCH_SUPPORTS_HUGETLBFS if MMU --=20 2.54.0 From nobody Mon May 25 09:57:32 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 A45103D4116; Sun, 17 May 2026 23:05:53 +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=1779059153; cv=none; b=osXgBxZxVebLs70r2RHLr2IUzg/9FeNxtru2YiDBZhOnKbjVivw9HgL9+t9RE5rElAN1OUw0BqRi43GkdIerO3AiC3rkvNcwKqa3mU9qrys7iuibeYHxeOqpvah7e7Rgl1rltkYZfysGJWOikDjk6IxC0zOWqkYQqtLv9Wz+dVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059153; c=relaxed/simple; bh=GyD4YMZK6iTmrrn0wIfJEk2rAg5lFRlkKYqjrNci574=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h20DsyIExEoPDYT82ywOhVFong2Iwy8fi2/lmz+0hfp7/JcLMvj2HZhMqWP+oAqRmPBJ+pIE6leHqWZtgsAU0doQVDWeSxqWS2V/giDV4keaak06SCJRYNT7etxM4HgARPunaYEHPN0xF9QmRkbNmqQ5CwL50IvCZAmtkZyWYBo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VY9rQByG; 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="VY9rQByG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1873C2BCB0; Sun, 17 May 2026 23:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059153; bh=GyD4YMZK6iTmrrn0wIfJEk2rAg5lFRlkKYqjrNci574=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VY9rQByGfVV6L5TlUYA1iU5QY4+/BVcBz4dJI/HUsdFzgbBP8uu67By+mBz6wwT4j bdbMkAr997DMCcBguFjWaK49BOnxJ7CDog1BwLIXk2ydYPL4xkjQjKeaXgXL9qx847 KKERQCTlx7AQt+leIUiQKZsAX4IgVuqMHrkz3nNqd2V/0+KPkGlfN5YPkhbzjiftQj h3uq2RfqzoaBm/d/iB28SE/JVb0kfgKamEp8GHsm+2YOZZdQNGaVoUvupAK1PHsYjz eZ/fkhx+7lT2pPP7O3vZbPHjF5aSTBX+VQsBNKaFsRGJ4hgQ3xXurcr4numuwFArsN +QuC8/lxZHwlg== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:12 -1000 Subject: [PATCH v2 09/16] riscv: Drop tautological condition from TOOLCHAIN_NEEDS_OLD_ISA_SPEC Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-9-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2385; i=nathan@kernel.org; h=from:subject:message-id; bh=GyD4YMZK6iTmrrn0wIfJEk2rAg5lFRlkKYqjrNci574=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnpviOQ6piJWJG/gVr/RhmsKhdVHvi5xJe4xmgCGD6 HPJ720dpSwMYlwMsmKKLNWPVY8bGs45y3jj1CSYOaxMIEMYuDgFYCIL2BgZ9kVwT/vheaBqY9M6 Mbm+tzI762wPT5omVb7Q/PaD1bUcRxkZ5uoITxf+x5V08M73Q1V6eV8tbh1/+E9NUt9yd/XDwwc nsAIA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the Clang dependency part of CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC is always false, so it can be removed. Adjust the help text to remove mention of Clang < 17, as it is irrelevant for the kernel after the minimum supported bump. Acked-by: Paul Walmsley # arch/riscv Signed-off-by: Nathan Chancellor --- Cc: Palmer Dabbelt Cc: Albert Ou Cc: Alexandre Ghiti Cc: linux-riscv@lists.infradead.org --- arch/riscv/Kconfig | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 7ffbf6032b61..c742c42fd39b 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -873,19 +873,18 @@ config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI and Zifencei are supported in binutils from version 2.36 onwards. To make life easier, and avoid forcing toolchains that default to a newer ISA spec to version 2.2, relax the check to binutils >=3D 2.36. - For clang < 17 or GCC < 11.3.0, for which this is not possible or need - special treatment, this is dealt with in TOOLCHAIN_NEEDS_OLD_ISA_SPEC. + For GCC < 11.3.0, for which this is not possible or need special + treatment, this is dealt with in TOOLCHAIN_NEEDS_OLD_ISA_SPEC. =20 config TOOLCHAIN_NEEDS_OLD_ISA_SPEC def_bool y depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI - # https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d449= 8694e15bf8a16 # https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommit;h=3Dd29f5d6ab513c52fd87= 2f532c492e35ae9fd6671 - depends on (CC_IS_CLANG && CLANG_VERSION < 170000) || (CC_IS_GCC && GCC_V= ERSION < 110300) + depends on CC_IS_GCC && GCC_VERSION < 110300 help - Certain versions of clang and GCC do not support zicsr and zifencei via - -march. This option causes an older ISA spec compatible with these older - versions of clang and GCC to be passed to GAS, which has the same result + Certain versions of GCC do not support zicsr and zifencei via -march. + This option causes an older ISA spec compatible with these older + versions of GCC to be passed to GAS, which has the same result as passing zicsr and zifencei to -march. =20 config FPU --=20 2.54.0 From nobody Mon May 25 09:57:32 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 5A7821E511; Sun, 17 May 2026 23:05: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=1779059155; cv=none; b=HSJkkW0wM0t/Bup6WLHVBtfTwka2xE/znWnzwS0HDFBbI3mqnomarGyHCLTf7X6dvL/rNP3EuXVir6utZbR/d3O/sqhTsU4UNlwKV6PwWs0zNtvAX3i8AI8U+WjpVJRQoZaIZQLDHBohzyUPQUnnky2u+oVwZ4BpGg+TPqf/p9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059155; c=relaxed/simple; bh=lcWqe5FPRSMTs4llVEK0KjaOnNDgj9f9MUj5+Q6kb9w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kFvQZOF1SGzEovXYP8J0a8Z1II9iasIjB4HosA8vjwWdzweW88iieiuaBkxMURRehvtlnsJ73qCQ9DeO5keJVusHU/Kh075RrBG6yaQlYP20hMGUQxwm3qP44VEib+lQ4tJbupWiUjM6fR2Je4w90foF571nsZGhBRqyDFtICPo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GKRYxwAn; 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="GKRYxwAn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF590C2BCB3; Sun, 17 May 2026 23:05:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059155; bh=lcWqe5FPRSMTs4llVEK0KjaOnNDgj9f9MUj5+Q6kb9w=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GKRYxwAn9QlblyLBfjYxDhd53Tokp9JqWTyFOOcENtKokxb2KdbO7yGODMiLB6Vv+ JBr5TcZ9znXsNwy67iuuwYg9SBEzwDe9imK3CHenZ7Eh1a+3FjZnYE7Rd9+w75sc+N hbXVmmVyMKIyFywTDKS5Jb/nDNdDCS35OWWCOWt9IoqigQHDS5YXN5qiAOTaZTE3zE sKQ/X+iDR4u5WGLUunsfi3VO0+Rc4aNd5UKtbUkq7BaGpRPKVVu07XFEgjwCUwO80e JnVpfYjLIlAd5QnQcj96LICqTGU/3BFT92pXKGmc1FBKqe/TILjoK7qC/MkIoEc5jd deFH0nwxy9yaQ== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:13 -1000 Subject: [PATCH v2 10/16] scripts/Makefile.warn: Drop -Wformat handling for clang < 16 Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-10-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1364; i=nathan@kernel.org; h=from:subject:message-id; bh=lcWqe5FPRSMTs4llVEK0KjaOnNDgj9f9MUj5+Q6kb9w=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnpvKZrQJ7mF/vftwEO+RhO0vT5Wv/GngFfzj4sr6G /KCi/jWdJSyMIhxMciKKbJUP1Y9bmg45yzjjVOTYOawMoEMYeDiFICJrFzL8M+YR2oek9sc764P Ox7+kzM6zLmD55x6aoT+nnlrPBeY7itm+B+SzrRQfUJacfimL56ObhVSiy0evWM2O/XeNX3/ROu 5O9kB X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the block dealing with -Wformat with clang prior to 16 can be removed since the condition for its inclusion is always false. Reviewed-by: Nicolas Schier Signed-off-by: Nathan Chancellor --- scripts/Makefile.warn | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/scripts/Makefile.warn b/scripts/Makefile.warn index e77ca875aea4..35af7d6c6d18 100644 --- a/scripts/Makefile.warn +++ b/scripts/Makefile.warn @@ -135,16 +135,6 @@ KBUILD_CFLAGS +=3D $(call cc-option, -Wno-stringop-tru= ncation) KBUILD_CFLAGS +=3D -Wno-override-init # alias for -Wno-initializer-overrid= es in clang =20 ifdef CONFIG_CC_IS_CLANG -# Clang before clang-16 would warn on default argument promotions. -ifneq ($(call clang-min-version, 160000),y) -# Disable -Wformat -KBUILD_CFLAGS +=3D -Wno-format -# Then re-enable flags that were part of the -Wformat group that aren't -# problematic. -KBUILD_CFLAGS +=3D -Wformat-extra-args -Wformat-invalid-specifier -KBUILD_CFLAGS +=3D -Wformat-zero-length -Wnonnull -KBUILD_CFLAGS +=3D -Wformat-insufficient-args -endif KBUILD_CFLAGS +=3D -Wno-pointer-to-enum-cast KBUILD_CFLAGS +=3D -Wno-tautological-constant-out-of-range-compare KBUILD_CFLAGS +=3D -Wno-unaligned-access --=20 2.54.0 From nobody Mon May 25 09:57:32 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 8FA913D565D; Sun, 17 May 2026 23:05:58 +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=1779059158; cv=none; b=YRdgh6Wl6NWOnywbRN7/4lgNMF8xNIzYOju2Tc56JUIr4rhOrMW+jgsKruIxgr9jP3AGWTEalKIi5DvXaiRoNf7XISuO0BuEYmTp3N68yTdheG1LP5M7NjqU5NwiAnwvK3NEQb4PyAYhyAivviFupfxarOMZqNH0ayHJFXVZUeg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059158; c=relaxed/simple; bh=hvjZPNT+5a0UKRa8dDdsLzMe5ziU1OJl2oO7umb3pLk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t3fcbh5h5ObveEqhSuWiSJZsVEevObGA5/1wUevgEzNWxpdYsvw7UZt/Hx/dX5tn81PUk4qC/v4rnBeH1BvvMRzWE02MYBxJ5rjS/+2Gb9eqLxed/BFq5cgWtxn72tZCZpIPpFJa5hgCDAp5DFRYJSf+9cHbsCChN1rfCCCu1vY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZIGD+qcQ; 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="ZIGD+qcQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAE6DC2BCF6; Sun, 17 May 2026 23:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059158; bh=hvjZPNT+5a0UKRa8dDdsLzMe5ziU1OJl2oO7umb3pLk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZIGD+qcQxnI+azTs8uss7xym6pDF3JfNhkygt2RmLnscUEkZEA9Q145aa3Ajoc8If bxztGJ1oIsJ/q8OFccp7mJ9kSegW5vnIbe2kn+FN2Zt86IlIxJyevpWV6IJkQ54hUn VtHjKuAOL03jCV8KQeLjAro+n7X2a6fz8N2UDxa55O/8BRSAXyVYUPs6yIMOu5zR0a 8O+3CaaakhnVTCh2PqMGKEJVrvaPFc6UtjOPSQM0zslP/B0Qp9+ZgAjMdFQmz72Pas DTBINrdw506HSq0aubCnVIkBm3YdhPtkLrakGeGybRXH1xixjYY523tBEHiLvXDUIP 5Jm0xr3HI/p/A== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:14 -1000 Subject: [PATCH v2 11/16] x86/build: Drop unnecessary '-ffreestanding' addition to KBUILD_CFLAGS Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-11-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Kees Cook X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1604; i=nathan@kernel.org; h=from:subject:message-id; bh=hvjZPNT+5a0UKRa8dDdsLzMe5ziU1OJl2oO7umb3pLk=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnpumzIgwZI+I3VS1S+p/2XcuC9OZP/u39s+PCUs9y hMpnva9o5SFQYyLQVZMkaX6sepxQ8M5ZxlvnJoEM4eVCWQIAxenAEwki5Hhr2ilZOcjzncLy6cL /f6tY6z7bJuH8BXh+1dWP73mnCP2rpXhn3LXvaL1V1cLfWVTNuZ0/+ehIfnic6RPT3lsrcdSQz5 vXgA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the addition of '-ffreestanding' to KBUILD_CFLAGS for 32-bit x86 is unnecessary, as the linked LLVM bug is resolved in all supported LLVM versions. 16cb16e0d285 ("x86/build: Remove -ffreestanding on i386 with GCC") intended to make the addition of '-ffreestanding' clang only but due to a bug in the adjusted check from d70da12453ac ("hardening: Enable i386 FORTIFY_SOURCE on Clang 16+") it has been applied for all versions of GCC and clang < 16.0.0. There are no known problems with removing this for GCC but if one surfaces, it can be restored under a CONFIG_CC_IS_GCC block. Signed-off-by: Nathan Chancellor --- Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: H. Peter Anvin Cc: Kees Cook --- arch/x86/Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 46fec0b08487..5720f2470cfc 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -124,11 +124,6 @@ ifeq ($(CONFIG_X86_32),y) include $(srctree)/arch/x86/Makefile_32.cpu KBUILD_CFLAGS +=3D $(cflags-y) =20 - ifneq ($(call clang-min-version, 160000),y) - # https://github.com/llvm/llvm-project/issues/53645 - KBUILD_CFLAGS +=3D -ffreestanding - endif - percpu_seg :=3D fs else BITS :=3D 64 --=20 2.54.0 From nobody Mon May 25 09:57:32 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 EE6AF1F3B85; Sun, 17 May 2026 23:06: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=1779059162; cv=none; b=TvVknwMfFUknSiPvICn2s6QLwV5jXmTSQY0QEmxlRdQFqc9NU6mqgRaXvEPIg7FzcMMfpE15oHGuvAjMbKke4aWPjsiRJkUtC6uvoPWGQPQWD50XVcwpPmn20PjjV3+NKzkaqIKSgCWUpuLQZzpjRiRo0n2FyKGsb5HNzqitcy8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059162; c=relaxed/simple; bh=qaPe+n1570ptkZy6Z7TErnkN2YpYM3CP2ZLschhWI9E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OeurFUjQQoDTehsbZanad+04fUGwOhIQK+MB2xafafKFj5M09mSv8liaMg+bZrTPTgArdaE3hH6GOLItnMRnGDGyzI6cnGEIxvbn1RKyJxF+QNLMEXnb0B5DCZFq+PDdJPAUuH71tHokZhNXVrHz74inYWtHSOaA+qjCiUDqED4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YF2HwLEZ; 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="YF2HwLEZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DED65C2BCF6; Sun, 17 May 2026 23:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059161; bh=qaPe+n1570ptkZy6Z7TErnkN2YpYM3CP2ZLschhWI9E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YF2HwLEZTfGphgqokCSzNJr5NsdnnWCOG2hfd0VMJt+//JSwHCg8DLLPhDTgpVTsl VCC41ISJhPBTy/9Ma0nxDjul9ui5n+CTWxn1zLpmrHXN2qjRNE6mn8eU8z+7RB1bFE WG8xArTamV1m80wLvMaWFHJ9y3m89p3RNStKwxWomQxmgFKHU5qsKxjTTeMeO9vPc6 nufzWhY+s89eTxVFBgkReq+76AOhEu4LXXOusGlYF7f8mkvJ1cRbujBXRBuw32MEXH e5oj/1CTw+eH6Y+DUMKjUrQFYGWrYRpTMVmq4vXQY9w4puU26RZXZLXun7VpIlHqvT LgvopnJECJFAA== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:15 -1000 Subject: [PATCH v2 12/16] x86/module: Revert "Deal with GOT based stack cookie load on Clang < 17" Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-12-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Ard Biesheuvel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Peter Zijlstra , x86@kernel.org, "H. Peter Anvin" X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2697; i=nathan@kernel.org; h=from:subject:message-id; bh=qaPe+n1570ptkZy6Z7TErnkN2YpYM3CP2ZLschhWI9E=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnptKbXfNas6/3aU77Wjlr2vpATfydxSr1L/X2vj1w oT+6QvKO0pZGMS4GGTFFFmqH6seNzScc5bxxqlJMHNYmUCGMHBxCsBEfgUyMhy8WpuZUMB8127G SoNNqS2lmgll264eMV77MlSWpfTx/IsM/11Xz48MmdDvK3O1L9jTqNql3Pmf4cTWJX6/siWcb/Y 2sAMA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the workaround added by 78c4374ef8b8 ("x86/module: Deal with GOT based stack cookie load on Clang= < 17") will never be included, as the final clause in the preprocessor conditional is always false. Revert the change to clean up the dead code. Acked-by: Ard Biesheuvel Signed-off-by: Nathan Chancellor --- Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: Peter Zijlstra Cc: x86@kernel.org Cc: H. Peter Anvin --- arch/x86/include/asm/elf.h | 5 ++--- arch/x86/kernel/module.c | 15 --------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index c7f98977663c..0de9df759c99 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h @@ -54,9 +54,8 @@ typedef struct user_i387_struct elf_fpregset_t; #define R_X86_64_GLOB_DAT 6 /* Create GOT entry */ #define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */ #define R_X86_64_RELATIVE 8 /* Adjust by program base */ -#define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative offset to GOT */ -#define R_X86_64_GOTPCRELX 41 -#define R_X86_64_REX_GOTPCRELX 42 +#define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative + offset to GOT */ #define R_X86_64_32 10 /* Direct 32 bit zero extended */ #define R_X86_64_32S 11 /* Direct 32 bit sign extended */ #define R_X86_64_16 12 /* Direct 16 bit zero extended */ diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index 11c45ce42694..b5b4de4f08e6 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c @@ -19,7 +19,6 @@ #include #include #include -#include =20 #include #include @@ -132,20 +131,6 @@ static int __write_relocate_add(Elf64_Shdr *sechdrs, goto overflow; size =3D 4; break; -#if defined(CONFIG_STACKPROTECTOR) && \ - defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 170000 - case R_X86_64_REX_GOTPCRELX: { - static unsigned long __percpu *const addr =3D &__stack_chk_guard; - - if (sym->st_value !=3D (u64)addr) { - pr_err("%s: Unsupported GOTPCREL relocation\n", me->name); - return -ENOEXEC; - } - - val =3D (u64)&addr + rel[i].r_addend; - fallthrough; - } -#endif case R_X86_64_PC32: case R_X86_64_PLT32: val -=3D (u64)loc; --=20 2.54.0 From nobody Mon May 25 09:57:32 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 856123D6CD4; Sun, 17 May 2026 23:06: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=1779059165; cv=none; b=n8+342lkMJEp/DZkbndLRXAwWjCEEdMip0QaW4CtTv7Wyoa0Mbd6d4O5y8S3Ik4S3PWxRFJVram8QaTMohfvf3u0ZwY7VZRZb1C94hhnMncSogi38RnW2skfLHn8uR73CYsFvJjxmCHsn/a0zo9R1Ot35gqXaxnMPtO32y/jpXY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059165; c=relaxed/simple; bh=fETClpKIq4SLaWWppFV0wCLK1a8ciNPumQoKZtCRRBU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B7/1j/nMJT8p/qJX3K8hGg3VeJ8lKwXuWJVqvkm37PkI5F79H5j4Abmq0Qy5T/0PqBgaJHqQGvhaNDdCZ36Qda4CXCob3Njxsz3K2+jT4AhHy5vorSmEHQlFYP9pEFD5i/yJKS8N9l5TKoYfihN6fLz2A2pH7fiIqU09QzGzkr4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d2W8e7N2; 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="d2W8e7N2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A1EEC2BCF5; Sun, 17 May 2026 23:06:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059165; bh=fETClpKIq4SLaWWppFV0wCLK1a8ciNPumQoKZtCRRBU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=d2W8e7N2kQwFVekEwC4naW8eT6yNhNg5JmaS5xbmZbeIJM2GEtojUHit0qepfTIIA KKnS3wDhu5bGnUtzXQL1RnSsvfXqIG/ex0SupGqLSsHxXsaA33WNbTvpC6mYU8aGZR 8asVRlu/skBvI82f7VP1d1SR3y7IzZ60DrxQqLfa+3U459ZcObkKAknupwZkWcJB8e 7rajyFZDpyrxglSAiM/6XIIcLzDqL8r2Sm4RzLQL2N9r3I1AuxNeC7wqzNupwNAuz3 VYyWuJl+72fQi9byF1JAwlKIF6Wt8bfcqHEGHap61GQibrJtdKlVc0Hzp3yIe/3FlQ DuQ9XdTd0jUpA== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:16 -1000 Subject: [PATCH v2 13/16] x86/entry/vdso32: Remove conditional omission of '.cfi_offset eflags' Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-13-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, "H. Peter Anvin (Intel)" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Peter Zijlstra , x86@kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1527; i=nathan@kernel.org; h=from:subject:message-id; bh=fETClpKIq4SLaWWppFV0wCLK1a8ciNPumQoKZtCRRBU=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnpsMIhxrXRYENnA/8mCVd7x0dN6l0ynlFdoNW958+ /xc2se9o5SFQYyLQVZMkaX6sepxQ8M5ZxlvnJoEM4eVCWQIAxenAExkkz4jw6pQ9gsz/Z+Everk MOWQDt1XluTbfELDsW0J98xtkafOqDD891gZf33H19N+32Jb9JK+3bjplbLM9WztgivrzVWj29d P4AQA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the inclusion condition added by 3e30278e0c71 ("x86/entry/vdso32: Omit '.cfi_offset eflags' for LLVM < 16") will always be true. Revert the change to clean up the source code. Acked-by: H. Peter Anvin (Intel) Signed-off-by: Nathan Chancellor --- Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: Peter Zijlstra Cc: x86@kernel.org --- arch/x86/entry/vdso/vdso32/sigreturn.S | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arch/x86/entry/vdso/vdso32/sigreturn.S b/arch/x86/entry/vdso/v= dso32/sigreturn.S index b33fcc501ba3..328bd3a4ef51 100644 --- a/arch/x86/entry/vdso/vdso32/sigreturn.S +++ b/arch/x86/entry/vdso/vdso32/sigreturn.S @@ -22,17 +22,7 @@ CFI_OFFSET cs, IA32_SIGCONTEXT_cs CFI_OFFSET ss, IA32_SIGCONTEXT_ss CFI_OFFSET ds, IA32_SIGCONTEXT_ds -/* - * .cfi_offset eflags requires LLVM 16 or newer: - * - * https://github.com/llvm/llvm-project/commit/67bd3c58c0c7389e39c5a2f4d= 3b1a30459ccf5b7 - * - * Check for 16.0.1 to ensure the support is present, as 16.0.0 may be a - * prerelease version. - */ -#if defined(CONFIG_AS_IS_GNU) || (defined(CONFIG_AS_IS_LLVM) && CONFIG_AS_= VERSION >=3D 160001) CFI_OFFSET eflags, IA32_SIGCONTEXT_flags -#endif .endm =20 /* --=20 2.54.0 From nobody Mon May 25 09:57:32 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 9EC763D75CE; Sun, 17 May 2026 23:06:07 +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=1779059167; cv=none; b=Zk2oaA+EFAWhb8xoHm9zMYMOzFRoi3odBlmTGjx/FKi2avgHw4mDJfhUPoCXAK/qKmo/a7ATyyxM3nxNS38+/4G2PJ4Z1u3c7ATfwwoqBA/QKtY3tJJ+okLNgkKHdfuiCTyk956RsnRk6vixynL0dpb1Sl15mkxzQ5/GCVExVVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059167; c=relaxed/simple; bh=tEPEsU1+X7p+io0HSiFQT1P4YOo34mXIWX4b6NPdcCs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hoxwnHNnJ7Anzy0hbPksHBYuLXT9CAu0puEugNKsYHLTazs9V2kooYmfNd6oG4tuSH8sUFsoLvNGnbIz8BNjix9rIEbq2H+o4hWSlRhcUFAiSk90QYTGGiIQU7MfjardTWkzOxvobaPR1W13CpzNtlC+GZ9L9gugliIMqMjlSPY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QPzQ2ik3; 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="QPzQ2ik3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C885C2BCF6; Sun, 17 May 2026 23:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059167; bh=tEPEsU1+X7p+io0HSiFQT1P4YOo34mXIWX4b6NPdcCs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=QPzQ2ik3EMRlvQUzGwoujEPSyJbuFVf8oZv0mZKJnvrFbaXT02Ibnb32y4Vu+Tp6N rk1Qb4CKCki6M5j67JDkkG22lnm9/zrhDtQXs8au4C/0zr5+RwypreKFa+yC9fd0/Y 4ltTIpvzq2wb1HWHc1pN0ApDht80VfAggYIAbKOV+f4lCOw1y0MurCxTE9+1hFFh47 Rf2tx6bt0MD82xvBooxnsBtLiwhz1TrJ2Rhmf1SdQflEwToc7UJDy/qNR2B0KH9zAS IT0oCpCuFzhkRMPuHapNYUQ4y6MPJTa9wxwH1hxtbHF+lj9JZQwFeR7wmtu1mDJiT+ AEZNhd1iOxb4w== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:17 -1000 Subject: [PATCH v2 14/16] kbuild: Remove check for broken scoping with clang < 17 in CC_HAS_ASM_GOTO_OUTPUT Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-14-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Thomas Gleixner , Peter Zijlstra X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1341; i=nathan@kernel.org; h=from:subject:message-id; bh=tEPEsU1+X7p+io0HSiFQT1P4YOo34mXIWX4b6NPdcCs=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnpujkpweWu8TMSr+/aLPvHaFjP6Lxz3/NY5Yxn3S+ jz96NVjHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAihx4xMnRMSu7fKSMrJzDl za1H7ZZLzvBI7qw6wyvdViLG+m3NBGZGhp1qh6dqFDjd4GGujY5xWv7gdZXF97P/ttQdviI55+I UH2YA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the check added to CC_HAS_ASM_GOTO_OUTPUT by commit e2ffa15b9baa ("kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on clang < 17") can be removed, as the issue it detects is guaranteed to be fixed. Acked-by: Nicolas Schier Signed-off-by: Nathan Chancellor --- Cc: Thomas Gleixner Cc: Peter Zijlstra --- init/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index 2937c4d308ae..6da6cf019d1a 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -118,10 +118,7 @@ config GCC_ASM_GOTO_OUTPUT_BROKEN config CC_HAS_ASM_GOTO_OUTPUT def_bool y depends on !GCC_ASM_GOTO_OUTPUT_BROKEN - # Detect basic support depends on $(success,echo 'int foo(int x) { asm goto ("": "=3Dr"(x) ::: b= ar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null) - # Detect clang (< v17) scoped label issues - depends on $(success,echo 'void b(void **);void* c(void);int f(void){{asm= goto(""::::l0);return 0;l0:return 1;}void *x __attribute__((cleanup(b)))= =3Dc();{asm goto(""::::l1);return 2;l1:return 3;}}' | $(CC) -x c - -c -o /d= ev/null) =20 config CC_HAS_ASM_GOTO_TIED_OUTPUT depends on CC_HAS_ASM_GOTO_OUTPUT --=20 2.54.0 From nobody Mon May 25 09:57:32 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 0CB823D7D8E; Sun, 17 May 2026 23:06:09 +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=1779059170; cv=none; b=Fc5wu6Id/+F1fCE6onkGnBoHSm+SN7XJE+WsAnCXXBPQrCS3E3Fcsv6PagIIJCcEHNJ2Wcm7/e09YD7H+sk1OMBxBozK6herjNqTM2rSgABhFwIR+MQ7FilG7lwJlLkLCtkZcy0S6F+Q6MtMG7gz5vSM1UbmJ11GgPk/yc1BgrI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059170; c=relaxed/simple; bh=8m6x5wnunBWxbVlZbtA148oYqLF0VsukfvcyqBz4UQ0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nGoOrQQmzkntfXMx2fyVsk3qNlno9UMaZrvBqCd0rv+ioD4S9KSacmHbQvWupxtgcLZU025Z/mcFw3D+wZDFT0wEiOw/zHehUOlagvJZdNYZLOen1xXgGpGYAnNNjdYBB70VwV4MIsd06y/kxE0qkbFIeJ30WzShSxE9PQea3zg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lNFbevge; 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="lNFbevge" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDB37C2BCFC; Sun, 17 May 2026 23:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059169; bh=8m6x5wnunBWxbVlZbtA148oYqLF0VsukfvcyqBz4UQ0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lNFbevgeVS1mW11lkW8TQe6kAAZqBINxcExooUXnfLSiajvg082pC9pca/6Hyzqlq Wdl1sQ5HzLOYIur/cPldfilrZIDRCSBBQQbjY3gE/b3e/B+6RnVs2HAU4k4O/UdSCE 7iMuN9KhreIXJQ6SxTKLFuvBZv+zmIBXxkdFTRoY3fnQr3jI8qH5H4Byssay1fVMSU dx24SpIWUOm4RWDv7282aWDlsQN+etCwDQ2YgbfN8YU0nhE7wDPXJ2/Cn8EY/CD9o+ +VqzY2gKW9RzYtx8Yaz/qc8Myyo5/Wn3cCJAGHrYaBeTiQEIVvhgjzZrp4qTGuqCbR naTRGrd7kiT8A== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:18 -1000 Subject: [PATCH v2 15/16] compiler-clang.h: Remove __cleanup -Wunused-variable workaround Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-15-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, Peter Zijlstra X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1219; i=nathan@kernel.org; h=from:subject:message-id; bh=8m6x5wnunBWxbVlZbtA148oYqLF0VsukfvcyqBz4UQ0=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnptXfohLOaw83zhtjZHdDU7Zlzt+aD3zfs6+2Kktr mvqf5nnHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAiimsZGVZmV6c3Nx6w+CDo 0bXq/bfp5woyY490/l7bOnHr67S4eUWMDDefvnkQvaz8dlCzl+Lub9Hunfv56g7+/2C67J+6W/l FHnYA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the redefinition of __cleanup with __maybe_unused added to it is unnecessary because the referenced LLVM change is present in all supported LLVM versions. Drop it. Signed-off-by: Nathan Chancellor --- Cc: Peter Zijlstra --- include/linux/compiler-clang.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index e1123dd28486..eadf48b7b5b1 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -5,15 +5,6 @@ =20 /* Compiler specific definitions for Clang compiler */ =20 -/* - * Clang prior to 17 is being silly and considers many __cleanup() variabl= es - * as unused (because they are, their sole purpose is to go out of scope). - * - * https://github.com/llvm/llvm-project/commit/877210faa447f4cc7db87812f8e= d80e398fedd61 - */ -#undef __cleanup -#define __cleanup(func) __maybe_unused __attribute__((__cleanup__(func))) - /* all clang versions usable with the kernel support KASAN ABI version 5 */ #define KASAN_ABI_VERSION 5 =20 --=20 2.54.0 From nobody Mon May 25 09:57:32 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 C167A3D6CC1; Sun, 17 May 2026 23:06:11 +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=1779059171; cv=none; b=fYui30KDsUFx/HHfuZyn1ULnlhLfRQnuSAqyLkjDtXyzKKC/AvDGa+5zk+6fHqrIcrS7+iPTjKkRMY4p+zCUibxOBBpCZyr77lGfnCW7tspv7ZJWtcIz5G7A6Lp8Hf9XpKKlTRiNCoP9VfKgEGt2aoXF8kdsAdTZucmRmkIN5Dg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779059171; c=relaxed/simple; bh=8TLf3OqmauIWGgySari6qXrOUY+wLBpwaDDWcC12HMQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HXLwoPL6yZXTJdWMsa11D55mPsnhvFTP1FWX+0GkyHabopvkzPNfvv+prbhAkGfwaB2KCO5V6TuaDr/2VsaAPWFsqKRKByPkU9kV4HO1i6K+4fZ0Zex4uBEyLfmr56Vg1OA8by1q+r4r8t/BZzoyqn+trdPDiuLMq8URgP29poU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V7oPw7yy; 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="V7oPw7yy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F36CC2BCB3; Sun, 17 May 2026 23:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779059171; bh=8TLf3OqmauIWGgySari6qXrOUY+wLBpwaDDWcC12HMQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=V7oPw7yyz0m6Kv8y+l2sIB/KWkWzddf1MgF0ail340pj+SDMge4IcS+n5DIT9hC4p 29gwIT8KsrqOnAP/7pSir+neXjmscPyUc2m0xjm4eCr47+mXcLLg+800b4bORE2nU1 gD0KD8X+Qi3YVU7hRYOmvr9/abKbXAXyZH7OazU/78oViGE5ae3t+SLw1slaf0/hX+ tf1AKutvMgh/maDkXoO5NgVg7XUC0Wonue+7qISLoQNoDjSvawiQxk5QMAV1rQDlsX WjOpcXspvdJWVz5qvTyEkFOi76Hv+ySVkvhNGk4bJBLjy0CEJCEi5qKIFvhmyie2H7 YFEO8tDvBoQpw== From: Nathan Chancellor Date: Sun, 17 May 2026 13:05:19 -1000 Subject: [PATCH v2 16/16] compiler-clang.h: Drop explicit version number from "all" diagnostic macro Precedence: bulk X-Mailing-List: linux-kernel@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 Message-Id: <20260517-bump-minimum-supported-llvm-version-to-17-v2-16-b3b8cda46bdd@kernel.org> References: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> In-Reply-To: <20260517-bump-minimum-supported-llvm-version-to-17-v2-0-b3b8cda46bdd@kernel.org> To: Nathan Chancellor , Nicolas Schier , Bill Wendling , Justin Stitt , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=886; i=nathan@kernel.org; h=from:subject:message-id; bh=8TLf3OqmauIWGgySari6qXrOUY+wLBpwaDDWcC12HMQ=; b=owGbwMvMwCUmm602sfCA1DTG02pJDFlcnpuPLd16e/szqfvPPQUaQkrzH1QECV6dsaHji86bc w2cFeXMHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAi8u6MDOdOf6/UCi/6v/a5 odbj4Jf/Vy6468eou8rI7ImOTK+mXAojw7XPv6QVd5f8bZFs0TNbIuxdfEWsnYdPzM543sGqB0x i3AA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 This is more consistent with what commit 7efa84b5cdd6 ("compiler-gcc.h: Introduce __diag_GCC_all") did for GCC. Signed-off-by: Nathan Chancellor --- include/linux/compiler-clang.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index eadf48b7b5b1..a105e2e8016c 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -122,10 +122,10 @@ #define __diag_str(s) __diag_str1(s) #define __diag(s) _Pragma(__diag_str(clang diagnostic s)) =20 -#define __diag_clang_13(s) __diag(s) +#define __diag_clang_all(s) __diag(s) =20 #define __diag_ignore_all(option, comment) \ - __diag_clang(13, ignore, option) + __diag_clang(all, ignore, option) =20 /* * clang has horrible behavior with "g" or "rm" constraints for asm --=20 2.54.0