From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B175D35177 for ; Wed, 1 Apr 2026 11:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Hwco8P8PAG3MAADo2ltX10PuJl9uc/57LCX1/bJL/8M=; b=mHaUF5katrWVYPyHjmUoojuYPP ovBgBs5lXRgODDBVMa15sw1Rne9ozfRwy1Gf/UTxewousKVw9AGWGSeQmq2TdtNzV9vbDsMu9fDYb JySWJfEmMCRiKOppdt+kUodJBRz6iRHa2/G/yL6mtHfaJSXJZWp6AFsBr8SH1I5WHYD6jsphmeHKT XBAF1RH65tcC6lk+HoNWO/+nmZb5fv994cHRkgKyZPchquxTVF3GvgUpNvGn7cuTQq26Yj06OyE85 dqxyXBBh8HZKteJnHvSFqCsnuLgb96tFcRJf3e56X2O3hi8//+ZN8OKEuIM30x+FZX1rYKicOKbJh Kkf2tGQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w7u1y-0000000Eg2L-2lUW; Wed, 01 Apr 2026 11:46:42 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w7u1v-0000000Eg0x-2nTk; Wed, 01 Apr 2026 11:46:42 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 3A2904091B; Wed, 1 Apr 2026 11:46:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA9D4C116C6; Wed, 1 Apr 2026 11:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775043999; bh=mx6ZzwYZD/l+CT6smdZwRkePe/ogwpikx6oQbCZtXnE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IC7ucAQnVkndR7ChPPc0lrrY93rjZt8+FXlKYow5FhPAUcgRIJ6vkDf1B97slIFSF rjhuIH7tqMm7bMjMtan4SHkTNIYJO4WYYQsOdwTJQaA2JEj8puX36B/Jv6MvnDT+Jj FyETPXeepd1WLVhdSUOO/mLj/ukokooeVmCujRO5BPBFgA6K3rftlGfEbR+ZOgh8iX diigcnBbQUlQcWklv2ABotZPDZct8rOw9kSKePGAwqiC89bbfWfMFV3jp29aCp47R0 sWWBc17mT0LMstHWxRcNniaUHF/vI1dTtIZL59bASZjnri6+Om3XyWc14QOHjUyxZQ o2GgSZLrfRn/A== From: Miguel Ojeda To: Miguel Ojeda , Nathan Chancellor , Nicolas Schier , Danilo Krummrich , Andreas Hindborg , Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Courbot , David Airlie , Simona Vetter , Brendan Higgins , David Gow , Greg Kroah-Hartman , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Todd Kjos , Christian Brauner , Carlos Llamas , Alice Ryhl , Jonathan Corbet Cc: Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Trevor Gross , rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, Lorenzo Stoakes , Vlastimil Babka , "Liam R . Howlett" , Uladzislau Rezki , linux-block@vger.kernel.org, linux-arm-kernel@lists.infradead.org (moderated for non-subscribers), Alexandre Ghiti , linux-riscv@lists.infradead.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Rae Moar , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Shuah Khan , linux-doc@vger.kernel.org Subject: [PATCH 03/33] rust: simplify `RUSTC_VERSION` Kconfig conditions Date: Wed, 1 Apr 2026 13:45:10 +0200 Message-ID: <20260401114540.30108-4-ojeda@kernel.org> In-Reply-To: <20260401114540.30108-1-ojeda@kernel.org> References: <20260401114540.30108-1-ojeda@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260401_044640_581581_88A683F5 X-CRM114-Status: GOOD ( 12.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org With the Rust version bump in place, several Kconfig conditions based on `RUSTC_VERSION` are always true. Thus simplify them. The minimum supported major LLVM version by our new Rust minimum version is now LLVM 18, instead of LLVM 16. However, there are no possible cleanups for `RUSTC_LLVM_VERSION`. Signed-off-by: Miguel Ojeda --- arch/Kconfig | 3 +-- arch/arm64/Kconfig | 8 -------- arch/riscv/Kconfig | 3 --- init/Kconfig | 2 -- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 102ddbd4298e..84089e80584b 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -968,10 +968,9 @@ config HAVE_CFI_ICALL_NORMALIZE_INTEGERS config HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC def_bool y depends on HAVE_CFI_ICALL_NORMALIZE_INTEGERS - depends on RUSTC_VERSION >= 107900 depends on ARM64 || X86_64 # With GCOV/KASAN we need this fix: https://github.com/rust-lang/rust/pull/129373 - depends on (RUSTC_LLVM_VERSION >= 190103 && RUSTC_VERSION >= 108200) || \ + depends on RUSTC_LLVM_VERSION >= 190103 || \ (!GCOV_KERNEL && !KASAN_GENERIC && !KASAN_SW_TAGS) config CFI_PERMISSIVE diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 38dba5f7e4d2..c91130c7fba1 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -291,14 +291,6 @@ config ARM64 config RUSTC_SUPPORTS_ARM64 def_bool y depends on CPU_LITTLE_ENDIAN - # Shadow call stack is only supported on certain rustc versions. - # - # When using the UNWIND_PATCH_PAC_INTO_SCS option, rustc version 1.80+ is - # required due to use of the -Zfixed-x18 flag. - # - # Otherwise, rustc version 1.82+ is required due to use of the - # -Zsanitizer=shadow-call-stack flag. - depends on !SHADOW_CALL_STACK || RUSTC_VERSION >= 108200 || RUSTC_VERSION >= 108000 && UNWIND_PATCH_PAC_INTO_SCS config CLANG_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS def_bool CC_IS_CLANG diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 90c531e6abf5..ddc534402400 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -232,9 +232,6 @@ config RISCV config RUSTC_SUPPORTS_RISCV def_bool y depends on 64BIT - # Shadow call stack requires rustc version 1.82+ due to use of the - # -Zsanitizer=shadow-call-stack flag. - depends on !SHADOW_CALL_STACK || RUSTC_VERSION >= 108200 config CLANG_SUPPORTS_DYNAMIC_FTRACE def_bool CC_IS_CLANG diff --git a/init/Kconfig b/init/Kconfig index 36d32ea44594..b8a1ab0d49d4 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -2193,9 +2193,7 @@ config RUST depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO) depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC select CFI_ICALL_NORMALIZE_INTEGERS if CFI - depends on !CALL_PADDING || RUSTC_VERSION >= 108100 depends on !KASAN_SW_TAGS - depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300 help Enables Rust support in the kernel. -- 2.53.0