From patchwork Thu Jan 25 22:55:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531827 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 902C1125BC; Thu, 25 Jan 2024 22:56: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=1706223361; cv=none; b=ie3HLYEW667cxlzK7pidHEc63mYk60D+lKaRd78emZRQwEBhROLmBAcmoHJBOXJMoHTvyLVg7XugglthvVORcsi0ZGKcd+x/8ySddpm7B2/t6pELyvC698kEmPymkqoVoUlg9zlUCXejWtOtW3PcOYI99LwAHpxx9KMtQwTNnmo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223361; c=relaxed/simple; bh=OeMGm6ictAkQDCkGVdUzwK+Cgapce5TRIlo9wxuF41g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uMBF8YqYxpYMvmUjNXweR0zA3zUpZ/2CUZNcSpsMvHkxfX6NHtgJmvYXDNmvFFGr4nAx+YipsY5/EB9SXtn9su8eIG3jamUuXTSbJdFnJeM3e2FfdV/pL5X3ugwrDz9Cu1xt5GgNY47HYWTldPIt67jHeiD/97na/HdIW+H41Es= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Kpv5uh+J; 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="Kpv5uh+J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FE69C43609; Thu, 25 Jan 2024 22:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223361; bh=OeMGm6ictAkQDCkGVdUzwK+Cgapce5TRIlo9wxuF41g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Kpv5uh+JaKS3dsIYEaOmLE6zuPcoqJZCzUOR0LcqlWetBaNU4dk0oP1G5EYCvNfMu HK2fjgHkZ4kVYiWA6j9NiUoF2oAnxMn+EXjdoH4RmNAKDQDn73qGPDZUCHPjTsD8jA 9/EurJ1JaOZN9fAGqzWuKumbA8h7FDTV8alxHKC2rhbS7D935vRbLg8xWuTAfkCXFZ DtUONHR5OqMNvsMjUOxh76tPchYqbqZCX2Lv1izn28ZFU5iDySvzA2HSHfsTXkTTO6 qY945HLLauZF7ypR2unDDObkAQaR9ZurNWVNw11qhhNz4Vu779ReQ3HWKPYxr/yQRh Fb+jxDpiseoYw== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:07 -0700 Subject: [PATCH 01/11] kbuild: Raise the minimum supported version of LLVM to 13.0.1 Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-1-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=4149; i=nathan@kernel.org; h=from:subject:message-id; bh=OeMGm6ictAkQDCkGVdUzwK+Cgapce5TRIlo9wxuF41g=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv3dscousljfz6bPS2q2+dVop2NnpnFUs058dLck/ eD3dvHgjlIWBjEuBlkxRZbqx6rHDQ3nnGW8cWoSzBxWJpAhDFycAjCRV7MY/mcGZK8U13/GHde7 R8vqj1Tp8oibSm7GXCf+yN7KM/qVeJSRYb+kHnfRUh51DW2GAtGLFk2ZT35asT341MCW2np76Y9 XHAA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 When __builtin_mul_overflow() has arguments that differ in terms of signedness and width, LLVM may generate a libcall to __muloti4 because it performs the checks in terms of 65-bit multiplication. This issue becomes harder to hit (but still possible) after LLVM 12.0.0, which includes a special case for matching widths but different signs. To gain access to this special case, which the kernel can take advantage of when calls to __muloti4 appear, bump the minimum supported version of LLVM for building the kernel to 13.0.1. 13.0.1 was chosen because there is minimal impact to distribution support while allowing a few more workarounds to be dropped in the kernel source than if 12.0.0 were chosen. Looking at container images of up to date distribution versions: archlinux:latest clang version 16.0.6 debian:oldoldstable-slim clang version 7.0.1-8+deb10u2 (tags/RELEASE_701/final) debian:oldstable-slim Debian clang version 11.0.1-2 debian:stable-slim Debian clang version 14.0.6 debian:testing-slim Debian clang version 16.0.6 (19) debian:unstable-slim Debian clang version 16.0.6 (19) fedora:38 clang version 16.0.6 (Fedora 16.0.6-3.fc38) fedora:latest clang version 17.0.6 (Fedora 17.0.6-1.fc39) fedora:rawhide clang version 17.0.6 (Fedora 17.0.6-1.fc40) opensuse/leap:latest clang version 15.0.7 opensuse/tumbleweed:latest clang version 17.0.6 ubuntu:focal clang version 10.0.0-4ubuntu1 ubuntu:latest Ubuntu clang version 14.0.0-1ubuntu1.1 ubuntu:rolling Ubuntu clang version 16.0.6 (15) ubuntu:devel Ubuntu clang version 17.0.6 (3) The only distribution that gets left behind is Debian Bullseye, as the default version is 11.0.1; other distributions either have a newer version than 13.0.1 or one older than the current minimum of 11.0.0. Debian has easy access to more recent LLVM versions through apt.llvm.org, so this is not as much of a concern. There are also the kernel.org LLVM toolchains, which should work with distributions with glibc 2.28 and newer. Another benefit of slimming up the number of supported versions of LLVM for building the kernel is reducing the build capacity needed to support a matrix that builds with each supported version, which allows a matrix to reallocate the freed up build capacity towards something else, such as more configuration combinations. Closes: https://github.com/ClangBuiltLinux/linux/issues/1975 Link: https://github.com/llvm/llvm-project/issues/38013 Link: https://github.com/llvm/llvm-project/commit/3203143f1356a4e4e3ada231156fc6da6e1a9f9d Link: https://mirrors.edge.kernel.org/pub/tools/llvm/ Signed-off-by: Nathan Chancellor --- Documentation/process/changes.rst | 2 +- scripts/min-tool-version.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst index 50b3d1cb1115..d7306b8cad13 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst @@ -30,7 +30,7 @@ you probably needn't concern yourself with pcmciautils. Program Minimal version Command to check the version ====================== =============== ======================================== GNU C 5.1 gcc --version -Clang/LLVM (optional) 11.0.0 clang --version +Clang/LLVM (optional) 13.0.1 clang --version Rust (optional) 1.74.1 rustc --version bindgen (optional) 0.65.1 bindgen --version GNU make 3.82 make --version diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh index 9faa4d3d91e3..5d17022ee1f6 100755 --- a/scripts/min-tool-version.sh +++ b/scripts/min-tool-version.sh @@ -29,7 +29,7 @@ llvm) elif [ "$SRCARCH" = loongarch ]; then echo 18.0.0 else - echo 11.0.0 + echo 13.0.1 fi ;; rustc) From patchwork Thu Jan 25 22:55:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531828 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 2EBFF12B82; Thu, 25 Jan 2024 22:56: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=1706223362; cv=none; b=dmncPmx+6vzxGGsSaJEQjH81Nlp2MYTiHvSdONEWVYGwdGrYYKuu3AjUnGbCyYviDJYa8LBun9wXLZWcM6UxAMGzhu135xGv8wTQ0BMqZ2lNIXJYnyAhHxa5TS+HHTWr0azlOj2AYmvBBEH1+uOh0CVCbrx/Xahtp7sMMt9Rmt4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223362; c=relaxed/simple; bh=x+4g7ReKIyIJhKSP2GxkvPMFHG6lRsI5FMdClkdB74Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kbvrhjpQfi1yL4yUPwVwPU9I8TEqT5cOm6E56rS2i4MrEF0N6SkNAIDWCigkHCEqpnmYeaE+mYcPBaTMy8P8uluell4fz1D6ah2Uaw1ywZTqEaiNHpXrc/Y3BjOWj4i3hvbRHh7N4/d1MOf6MUDcW6OU46sgaGtRd0LEzJu9Dro= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fgU9vfu4; 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="fgU9vfu4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 432E6C433F1; Thu, 25 Jan 2024 22:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223361; bh=x+4g7ReKIyIJhKSP2GxkvPMFHG6lRsI5FMdClkdB74Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fgU9vfu4+B4cCQZXLwrhFaJz6b8A7tcRqpefZZ9ZxvBFAMI9fO5YKJzUHMYaUkMXA HwVWj2DByzwsc24TzMYueqZ9QElJH/Cg6wWWHzfAGMcZ6SwSMT6Vt4zjqfvkYM+6vg 3F8ETTbtM/+IOn/AmpjTahJYmmikwMuncnD/pWt1YOZn52e20MGkuSLJMsglw1IjMn vsLZtOcl9xgSS5kTnHMbESbzJp+NItxnyi4FbM3/9R9kQNHvoPmOWnP0KpcrsXrmC3 ck9xKFi+lorRWWZDoZoNhzBjR6etzWXRWfnBfAndh2x5bLcO4HaFH/Byl+4mhlcRpQ xFfBOtB2ukNUg== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:08 -0700 Subject: [PATCH 02/11] Makefile: Drop warn-stack-size plugin opt Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-2-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1170; i=nathan@kernel.org; h=from:subject:message-id; bh=x+4g7ReKIyIJhKSP2GxkvPMFHG6lRsI5FMdClkdB74Y=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv1Nn3/9RZHdBf2F3tzsU/YddA8PPvLFXml2Xu2Ub 7OfNoqod5SyMIhxMciKKbJUP1Y9bmg45yzjjVOTYOawMoEMYeDiFICJFO1mZPiuFPdsYf+K2Tvm JE/ftT6q4szlAo+jn+usZ75rfFpmH+PP8FeQPbb8qegslwDBE0qR4a/XLpTJXGjTf32mQF3CT+Y QRn4A 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 bumped to 13.0.1, the inner ifeq statement is always false, as the build will fail during the configuration stage for older LLVM versions. This effectively reverts commit 24845dcb170e ("Makefile: LTO: have linker check -Wframe-larger-than") and its follow up fix, commit 0236526d76b8 ("Makefile: lto: Pass -warn-stack-size only on LLD < 13.0.0"). Signed-off-by: Nathan Chancellor --- Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Makefile b/Makefile index 9869f57c3fb3..885b2940e20d 100644 --- a/Makefile +++ b/Makefile @@ -951,14 +951,6 @@ CC_FLAGS_LTO += -fvisibility=hidden # Limit inlining across translation units to reduce binary size KBUILD_LDFLAGS += -mllvm -import-instr-limit=5 - -# Check for frame size exceeding threshold during prolog/epilog insertion -# when using lld < 13.0.0. -ifneq ($(CONFIG_FRAME_WARN),0) -ifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 130000),y) -KBUILD_LDFLAGS += -plugin-opt=-warn-stack-size=$(CONFIG_FRAME_WARN) -endif -endif endif ifdef CONFIG_LTO From patchwork Thu Jan 25 22:55:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531829 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 BD24D12E7F; Thu, 25 Jan 2024 22:56:02 +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=1706223362; cv=none; b=r6g2Za/cpEJxfNWm22LlkiE/AwSBwqGMh1Q9DCKVi85uXUWi0fs2UOkCPJqoVOItRES5qPIQumsGO+F4m6mXuxMVBgy9JUcDAdcYs7wwpkcwfQWgIK5iJH0nIR5PUB75U5WW3Rk1WZx2r9rNyOPCq9lKM11rLb9VGG+DoU6RsXs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223362; c=relaxed/simple; bh=UQjLj/aCihDJEx2YNDlmzmlUNKw9S9GK1gZYop4dRp0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=crMXu4TPKL8GzJHD//uVOZ9zOf0QrmsOc6k4bSpucWhOs49a2ZgxRKcfAwy0II9jQ4D101rhro6bO8aMxQQV/E2KNkvzc2Kn3w41UWzSuTSGaSAiHirvwXVjomqfNSvKjUPG2Ia0Nh8QoVS4fNfbFl2nsvRDqubGH0UM4nA4T48= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lXyqfsfj; 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="lXyqfsfj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC1D5C43394; Thu, 25 Jan 2024 22:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223362; bh=UQjLj/aCihDJEx2YNDlmzmlUNKw9S9GK1gZYop4dRp0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lXyqfsfjNcSaV7tWoHpWrkpAj+lyy7qs3UMjvmD7T8M3WZ/QS/XpHfQtS3xe/yQUb licq/Kw4tHJxjcg8ctkJk4JXVodCg7bchvPF14v1x+piT98khjlSRi5992xzQWsPry 2+aqxtXXmgSBmWJCd6OtCaEUC09PCLZ0pG8NnSIUikfJ1CMJybn9ny0DtOSTVCWWxP 0rxhml7C+VVgARD/EUDe9+XeV6yAtaKJdG5KPEZ69OZElPke/ObSEqki4W2ANpWn9r 1TGCs0Gibjm5FkeBNGgW8P+NBoFScZB4DKaw4Io6lPuTSzz7udVatuAosVar0CMHpP rZYsOaqPI7ozQ== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:09 -0700 Subject: [PATCH 03/11] x86: Drop stack-alignment plugin opt Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-3-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1172; i=nathan@kernel.org; h=from:subject:message-id; bh=UQjLj/aCihDJEx2YNDlmzmlUNKw9S9GK1gZYop4dRp0=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv1d56N6rJ7TYcuJR4c+rwv84LdSSHjfntvyLzZJ9 3cnpW970lHKwiDGxSArpshS/Vj1uKHhnLOMN05NgpnDygQyhIGLUwAmcu8eI8P/rurvE4su7Q+Y rm5UNIFpktezR9pfj8zjyD9S9aXOebIJI8OLu5kTqt80XboatCkgTZprU438KbsF5t7r9cpnuuZ FTecEAA== 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 bumped to 13.0.1, the inner ifeq statement is always false, as the build will fail during the configuration stage for older LLVM versions. This effectively reverts part of commit b33fff07e3e3 ("x86, build: allow LTO to be selected") and its follow up fix, commit 2398ce80152a ("x86, lto: Pass -stack-alignment only on LLD < 13.0.0"). Signed-off-by: Nathan Chancellor --- Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: bp@alien8.de Cc: dave.hansen@linux.intel.com Cc: x86@kernel.org --- arch/x86/Makefile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 1a068de12a56..de30a8b35c41 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -217,12 +217,6 @@ endif KBUILD_LDFLAGS += -m elf_$(UTS_MACHINE) -ifdef CONFIG_LTO_CLANG -ifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 130000),y) -KBUILD_LDFLAGS += -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8) -endif -endif - ifdef CONFIG_X86_NEED_RELOCS LDFLAGS_vmlinux := --emit-relocs --discard-none else From patchwork Thu Jan 25 22:55:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531830 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 DCD861758B; Thu, 25 Jan 2024 22:56: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=1706223364; cv=none; b=rcbfAuvD+GU4UPbETj660X31gpWv/Ig/0/Ajfekcw8WjIBKizgYngYmCcUifiI6y+PColSinXWlihiDNh4ppB6mKoDgFjbFvWHpiInfKlkaWEHf31ZNJxe3HrhQM3r8XR45u6NyjTp2hcJmTmlpGwfkhNZAS6W3tiOysBXlevqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223364; c=relaxed/simple; bh=aDJyZ8b/ki4c/IiJRPATBv6E4x5P0FcV6nLpehyyims=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=n0dZ3QyjNFgJTHmXMGxzi/U7UnTInulxtYHMn+FyMI1f4Q5Or/77AvszaZpA+AvfRHKrNEFFQ/DHRLJkg8jvgAG1oD3kGaGeFDNOrt7EK6tjJucgbKiA+AVzmNFbuXqQIbIM680HCEoaAFKQ+P1nsgdCaD4TiX4qfKeYHrOpWIs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PXgoZJ9e; 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="PXgoZJ9e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFB36C433B1; Thu, 25 Jan 2024 22:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223363; bh=aDJyZ8b/ki4c/IiJRPATBv6E4x5P0FcV6nLpehyyims=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PXgoZJ9e4NvES+qBfNL9F7ox62KqmezHHBnrme/7JcFLXheOVLH13brLvZbguS/lF yeUK7xKNiqx/4127zDkwxteqID8cX8Ct2hdJsTOoHEMtkLBYKEHKpjqc1AZEuVlVI9 XINNnzvlJ2gotWtwI4RObmQu7CJ5uXXnb9XmWHL3aD9Bd4+SG4sy2yPHSdxkkpOxNy NH3/l3GTunTpjo4951ATyglOIASR75p4mk63x2mfeSlm/bObfaEuJC0vq7wyy/nHZZ tyFtLqAfX45lthqKXtHZ83G7hmv4z6YgtRl2gOABi42+W2E8PyZ50DzQR/jiwH5+xB ww+JbkJjfU/wg== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:10 -0700 Subject: [PATCH 04/11] ARM: Remove Thumb2 __builtin_thread_pointer workaround for Clang Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-4-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor , linux@armlinux.org.uk, ardb@kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1827; i=nathan@kernel.org; h=from:subject:message-id; bh=aDJyZ8b/ki4c/IiJRPATBv6E4x5P0FcV6nLpehyyims=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv3dYNwY1sg8t+xyNndscVrHzemLVkrkTCrIsld5O O1bwqlLHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAi0xwZGZbPWHQzzfWBs1n/ vP8/uB44Cs9cymzwmC1vnbPDRru9u2Yw/Pd9O9U66+B05efnkhkX84n/7WJQO3cxKzyU+fZmXZ7 tLQwA 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 bumped to 13.0.1, the conditional expression added to get_current() by commit c1e42efacb9b ("ARM: 9151/1: Thumb2: avoid __builtin_thread_pointer() on Clang") is always true, as the build will fail during the configuration stage for older LLVM versions. Remove it, effectively reverting the aforementioned change. Signed-off-by: Nathan Chancellor Reviewed-by: Ard Biesheuvel --- Cc: linux@armlinux.org.uk Cc: ardb@kernel.org Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/include/asm/current.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/arm/include/asm/current.h b/arch/arm/include/asm/current.h index 1e1178bf176d..5225cb1c803b 100644 --- a/arch/arm/include/asm/current.h +++ b/arch/arm/include/asm/current.h @@ -18,18 +18,12 @@ static __always_inline __attribute_const__ struct task_struct *get_current(void) { struct task_struct *cur; -#if __has_builtin(__builtin_thread_pointer) && \ - defined(CONFIG_CURRENT_POINTER_IN_TPIDRURO) && \ - !(defined(CONFIG_THUMB2_KERNEL) && \ - defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 130001) +#if __has_builtin(__builtin_thread_pointer) && defined(CONFIG_CURRENT_POINTER_IN_TPIDRURO) /* * Use the __builtin helper when available - this results in better * code, especially when using GCC in combination with the per-task * stack protector, as the compiler will recognize that it needs to * load the TLS register only once in every function. - * - * Clang < 13.0.1 gets this wrong for Thumb2 builds: - * https://github.com/ClangBuiltLinux/linux/issues/1485 */ cur = __builtin_thread_pointer(); #elif defined(CONFIG_CURRENT_POINTER_IN_TPIDRURO) || defined(CONFIG_SMP) From patchwork Thu Jan 25 22:55:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531831 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 5B4DB179AF; Thu, 25 Jan 2024 22:56:04 +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=1706223364; cv=none; b=l2udDA/FtlXUmmHP1fWGU/nAskftMecLFtp26qP4yfNxhPselTLWPa3av6Qe1Hj6BbfC5Azbnj4lA79v+tkL72/pFevJhfX7qvRrm4yngObExJ735yS6Ui58AZiiwvwiTTYJ5KpY01oxvQeboVmg6idViruAfSCK96NCzjrrGas= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223364; c=relaxed/simple; bh=uWTUiLcO9yXryUTCzpWsR5tzUSWabWfzZpa+EkOT8AQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=py+P8qWBq5Z1YTXUeY7Hmglvh4sbvEHQH/SJV53KWkzoNWVVHeiq6jbaQ36p3RPvgcOodTLMX4trA/Y46GpA7GuwgdxhlDMK0UVIKjwG/qQhrjSYEVkKxJyYXqslKIYIbBvJ1SWWbPbZgOUSa17yC488e9yOxp174tFxSiSbnV4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LtixYuPu; 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="LtixYuPu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8894BC43601; Thu, 25 Jan 2024 22:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223364; bh=uWTUiLcO9yXryUTCzpWsR5tzUSWabWfzZpa+EkOT8AQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LtixYuPua7PEB5mHUSIx/DN12t01Ocw6BaY//duPCVQ/Gfg0X2QnmYF6w2spLBIwt w60QCQIRBFuR+iZHbgAC5fCOpsRrQEXy9jgnfjPk91FeOFyMq6DWVHxPtz9QqyR33S hqQzBYIBoUjxP6PmxkFaEwyaLn4j7nWZ/82z3PRT1VIriFF2OIWp65WNoST7O8eNhh hSe+AbAPvKd3R5lAcrr8FjQIIeOWdNU+9JNAiL/4QMaD5slesW3u0hrbnKsMK2HNxE qHnG09+Jjwm8dCV/jR3Njb8+P7jeNWQxT5woCtlmj6Dh49cEeMzMkfFPCvQD+7WUMd 8Qvu1QnqWpKFg== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:11 -0700 Subject: [PATCH 05/11] arm64: Kconfig: Clean up tautological LLVM version checks Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-5-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor , catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1978; i=nathan@kernel.org; h=from:subject:message-id; bh=uWTUiLcO9yXryUTCzpWsR5tzUSWabWfzZpa+EkOT8AQ=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv0Vubzx+PoFOUq2DfqBXXdd3ZWPu1w3CBHYHqhyK zC54PahjlIWBjEuBlkxRZbqx6rHDQ3nnGW8cWoSzBxWJpAhDFycAjAR1xaG/ykfqq85Zwb+rOgw UtsyK2RK9a6ZB5YU8OUFeUWwCkau82ZkaFF8JH9b6d57D68rk7N+2jpznplxYXnay1smp17L/3j CyQ8A 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 bumped to 13.0.1, several conditions become tautologies, as they will always be true because the build will fail during the configuration stage for older LLVM versions. Drop them, as they are unnecessary. Signed-off-by: Nathan Chancellor Acked-by: Mark Rutland Acked-by: Mark Rutland --- Cc: catalin.marinas@arm.com Cc: will@kernel.org Cc: mark.rutland@arm.com Cc: linux-arm-kernel@lists.infradead.org --- arch/arm64/Kconfig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 5a8acca4dbf4..cb34e7d780c0 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -383,7 +383,7 @@ config BUILTIN_RETURN_ADDRESS_STRIPS_PAC bool # Clang's __builtin_return_adddress() strips the PAC since 12.0.0 # https://github.com/llvm/llvm-project/commit/2a96f47c5ffca84cd774ad402cacd137f4bf45e2 - default y if CC_IS_CLANG && (CLANG_VERSION >= 120000) + default y if CC_IS_CLANG # GCC's __builtin_return_address() strips the PAC since 11.1.0, # and this was backported to 10.2.0, 9.4.0, 8.5.0, but not earlier # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94891 @@ -1387,7 +1387,6 @@ choice config CPU_BIG_ENDIAN bool "Build big-endian kernel" - depends on !LD_IS_LLD || LLD_VERSION >= 130000 # https://github.com/llvm/llvm-project/commit/1379b150991f70a5782e9a143c2ba5308da1161c depends on AS_IS_GNU || AS_VERSION >= 150000 help @@ -2018,8 +2017,6 @@ config ARM64_BTI_KERNEL depends on !CC_IS_GCC || GCC_VERSION >= 100100 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106671 depends on !CC_IS_GCC - # https://github.com/llvm/llvm-project/commit/a88c722e687e6780dcd6a58718350dc76fcc4cc9 - depends on !CC_IS_CLANG || CLANG_VERSION >= 120000 depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_ARGS) help Build the kernel with Branch Target Identification annotations From patchwork Thu Jan 25 22:55:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531832 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 8C731199AA; Thu, 25 Jan 2024 22:56: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=1706223365; cv=none; b=Y15N0LQl2iVUxCclF9ytXf7+ZgHXCoV5YmTkuqZpR5m33pboQZYcu9y+ktrwzRURAa4GZwB/CQMglzAF7DfIjachc5lMzFBmM5fgw6wVAHN10iX+48hb64TdNWN6owb6tEraGLtCO3G4B4JvDI3IV8zFxwFaD/Hg7lqyJ5htpes= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223365; c=relaxed/simple; bh=6wq1GuvDlEslZKmrg6tmS3nUaar/vpxm/uhXrm7yG3M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eQnzrBxybt7CZErNlPcxREPAVOWevAdcopOCgKiWAfS+VJQGiW1RTuWPMwbhal7Hozea+ehIWfhMDARttphKb+dwtTEfzitzOfEsJlv2yyrq/3lBUp/WLdUtEFZbono/qDfN4jcQLSvyum1j+OBryHxuQl117PciaZCqWfeaFiw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eCwoJwnY; 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="eCwoJwnY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F5F3C43141; Thu, 25 Jan 2024 22:56:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223365; bh=6wq1GuvDlEslZKmrg6tmS3nUaar/vpxm/uhXrm7yG3M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=eCwoJwnYFU9XS3munio2UjVcIivKmI2PwjQ22ghkTjNo8XlOpXypa9AYIREAyQAN4 21iGjuR68kHSLLGm7wHTcZLQC0m2slQoqlH3ziAelVTKbqgGM8jEL5SW8lcfx60IRg jjAOdK58VBZkJrgq1TmcDz6sylZLkD9FTdn2cd0jvlf5NDIBAdlgI+OSoxw9biFRiV Z03FwGhsZDcxccCRZj6ORNakIPiQvwwlJEwbmjdwaCa2GmM51au7ZYjoDS7+cJt+C+ 4PEwkum142q73TJuru5DRbygyCWAMn5M3KTCjqNlZHdl/nyhyG97QiODY3zr7Bgu53 YxVobvzS2X+IQ== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:12 -0700 Subject: [PATCH 06/11] powerpc: Kconfig: Remove tautology in CONFIG_COMPAT Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-6-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor , mpe@ellerman.id.au, npiggin@gmail.com, aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com, linuxppc-dev@lists.ozlabs.org X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1039; i=nathan@kernel.org; h=from:subject:message-id; bh=6wq1GuvDlEslZKmrg6tmS3nUaar/vpxm/uhXrm7yG3M=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv1TnCfHLDdjGruCEvPaHoOZztX5V6ZdWlK4/Weru 9jnj1HVHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAiMlEM/2sfzzHaUhLHYsQk pLiXLerRRKGXamf1bTn6wt2CEmKnzWRkWBrPG3WE1XGKp9rBogOTPwUxql+sPrnK8nZlQe/fxCM qvAA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 This reverts commit 6fcb574125e6 ("powerpc: Kconfig: disable CONFIG_COMPAT for clang < 12"). Now that the minimum supported version of LLVM for building the kernel has been bumped to 13.0.1, this condition is always true, as the build will fail during the configuration stage for older LLVM versions. Remove it. Signed-off-by: Nathan Chancellor --- Cc: mpe@ellerman.id.au Cc: npiggin@gmail.com Cc: aneesh.kumar@kernel.org Cc: naveen.n.rao@linux.ibm.com Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b9fc064d38d2..86da0d01365a 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -333,7 +333,6 @@ config PANIC_TIMEOUT config COMPAT bool "Enable support for 32bit binaries" depends on PPC64 - depends on !CC_IS_CLANG || CLANG_VERSION >= 120000 default y if !CPU_LITTLE_ENDIAN select ARCH_WANT_OLD_COMPAT_IPC select COMPAT_OLD_SIGACTION From patchwork Thu Jan 25 22:55:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531833 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 3648A1AAC4; Thu, 25 Jan 2024 22:56:06 +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=1706223366; cv=none; b=MA9CdAzD8VJCXpOctuO24qT4qCf3DxxckGgrv00MKhgYV5FGMfspUWL77swsaPYeKDMhtLMuBRRjA+Q4o9GxtcU4b4y2/beC+oboxH0W9B+uD7BNUtUkzfzFHjK9S6fNzQKuikssrtVBunrvRxgTOCT08mIyjd8fYZJkSUmigSo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223366; c=relaxed/simple; bh=zFyRf340b4Mvmk4AZBMPn1ATdYHqCm1fuVo+aEb/I9Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dZcWzokF0G5H5yuwqSYdsusKPOeXZdcvfuysVQvMrfilNfVz/qm4QLjE2nfQjj6gQQPC65Rb9rrqv8vw4OoI8bLAxJctS+xkdwi77NYgiFpoJgR/hnsr1Z/FA/mJ86ugjg0VyTpp5t/5fDHeDuRXiQJCOoh+dM+wuYbMvPxVLwE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cOoyKeNg; 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="cOoyKeNg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48A71C433A6; Thu, 25 Jan 2024 22:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223366; bh=zFyRf340b4Mvmk4AZBMPn1ATdYHqCm1fuVo+aEb/I9Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cOoyKeNg3zlX8TFuDV6Cy9Rlb1Xg4NlOjPJ8PYg94zKsdTDXtoJB76fR7mlwAEUKe WJLkP7H+S2oobOO4Sbv3ereOQEzMqetJFMR1mnSfE84a1rq2COJh4R3YquIOaeH8Z6 KcA49tVCLqodjXum0zzgUDiX2DehmBWo+V/xPBTBSWJmPXcCr75TcPYyTpSJkjsJQV q9wNfi1TSzR9CHU71yb8XQGAvk2NVCF5kCrH6Jj7u6/uak2RAYxihyKmpQ8bwsGCgD Z0XFpxf5Bm/sYfr+YyF6478lHnOsiHB4E2da6Q3XYAtpHsgCtLn2UWJ4/I1ev/LTBa 1eV3yaddOUB6A== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:13 -0700 Subject: [PATCH 07/11] riscv: Remove MCOUNT_NAME workaround Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-7-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, conor@kernel.org, linux-riscv@lists.infradead.org X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=3407; i=nathan@kernel.org; h=from:subject:message-id; bh=zFyRf340b4Mvmk4AZBMPn1ATdYHqCm1fuVo+aEb/I9Y=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv3zPlsw8/ey1V+jI92ctNQZ4uvU5vzmlf4vw1+76 cqUlXeDO0pZGMS4GGTFFFmqH6seNzScc5bxxqlJMHNYmUCGMHBxCsBE3CUYGbY02hvOi1ZSXXxN SNn5yds3Dxfc0JomVNVv6u4gPPGT5SFGhmsT5mdn5rK35Cw6qJxyRaiEIXnjtFDduebCQo6/vwr MZwMA 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 bumped to 13.0.1, the condition for using _mcount as MCOUNT_NAME is always true, as the build will fail during the configuration stage for older LLVM versions. Replace MCOUNT_NAME with _mcount directly. This effectively reverts commit 7ce047715030 ("riscv: Workaround mcount name prior to clang-13"). Signed-off-by: Nathan Chancellor --- Cc: paul.walmsley@sifive.com Cc: palmer@dabbelt.com Cc: aou@eecs.berkeley.edu Cc: conor@kernel.org Cc: linux-riscv@lists.infradead.org --- arch/riscv/include/asm/ftrace.h | 14 ++------------ arch/riscv/kernel/mcount.S | 10 +++++----- scripts/recordmcount.pl | 2 +- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/arch/riscv/include/asm/ftrace.h b/arch/riscv/include/asm/ftrace.h index 06874fb1311e..cf5b63e789fa 100644 --- a/arch/riscv/include/asm/ftrace.h +++ b/arch/riscv/include/asm/ftrace.h @@ -13,19 +13,9 @@ #endif #define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR -/* - * Clang prior to 13 had "mcount" instead of "_mcount": - * https://github.com/llvm/llvm-project/commit/ef58ae86ba778ed7d01cd3f6bd6d08f943abab44 - */ -#if defined(CONFIG_CC_IS_GCC) || CONFIG_CLANG_VERSION >= 130000 -#define MCOUNT_NAME _mcount -#else -#define MCOUNT_NAME mcount -#endif - #define ARCH_SUPPORTS_FTRACE_OPS 1 #ifndef __ASSEMBLY__ -void MCOUNT_NAME(void); +void _mcount(void); static inline unsigned long ftrace_call_adjust(unsigned long addr) { return addr; @@ -75,7 +65,7 @@ struct dyn_arch_ftrace { * both auipc and jalr at the same time. */ -#define MCOUNT_ADDR ((unsigned long)MCOUNT_NAME) +#define MCOUNT_ADDR ((unsigned long)_mcount) #define JALR_SIGN_MASK (0x00000800) #define JALR_OFFSET_MASK (0x00000fff) #define AUIPC_OFFSET_MASK (0xfffff000) diff --git a/arch/riscv/kernel/mcount.S b/arch/riscv/kernel/mcount.S index d7ec69ac6910..3a42f6287909 100644 --- a/arch/riscv/kernel/mcount.S +++ b/arch/riscv/kernel/mcount.S @@ -50,8 +50,8 @@ SYM_TYPED_FUNC_START(ftrace_stub) #ifdef CONFIG_DYNAMIC_FTRACE - .global MCOUNT_NAME - .set MCOUNT_NAME, ftrace_stub + .global _mcount + .set _mcount, ftrace_stub #endif ret SYM_FUNC_END(ftrace_stub) @@ -80,7 +80,7 @@ SYM_FUNC_END(return_to_handler) #endif #ifndef CONFIG_DYNAMIC_FTRACE -SYM_FUNC_START(MCOUNT_NAME) +SYM_FUNC_START(_mcount) la t4, ftrace_stub #ifdef CONFIG_FUNCTION_GRAPH_TRACER la t0, ftrace_graph_return @@ -126,6 +126,6 @@ SYM_FUNC_START(MCOUNT_NAME) jalr t5 RESTORE_ABI_STATE ret -SYM_FUNC_END(MCOUNT_NAME) +SYM_FUNC_END(_mcount) #endif -EXPORT_SYMBOL(MCOUNT_NAME) +EXPORT_SYMBOL(_mcount) diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index f84df9e383fd..0871b2e92584 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -352,7 +352,7 @@ if ($arch eq "x86_64") { $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$"; } elsif ($arch eq "riscv") { $function_regex = "^([0-9a-fA-F]+)\\s+<([^.0-9][0-9a-zA-Z_\\.]+)>:"; - $mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL(_PLT)?\\s_?mcount\$"; + $mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL(_PLT)?\\s_mcount\$"; $type = ".quad"; $alignment = 2; } elsif ($arch eq "csky") { From patchwork Thu Jan 25 22:55:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531834 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 0C5311B5A0; Thu, 25 Jan 2024 22:56: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=1706223367; cv=none; b=bdD7qh4YqZ0rXs4rRddYswxhMEmQIZbVZHCHJmH0a6U/LC1oBcocMkMG6hki4Zus9nEaMaaHjCXRYbx5NtCY1RQneADPW78AIy0XlYnEsZm5NmBQ3Q8Sk6NjFkPsftLhA2wFTpgKm68kbSId+gJXQ3AuJtIZhIfWVdHEB1AfpUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223367; c=relaxed/simple; bh=gyCTtEy5PbjNvE5leNKdfOXPtZtPUb3cK4c+4fo9cSY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QNxLrPxouQNPfEr+8GkxJCkMEsyCC4fNUFDipmXRANR2xb1ppDmZvRdVc1iWZa2/KaWEAkNd0A4qOt879kSsIIAi6amSSR1iGxnfIt2+WR09OgtNgsTUx4bpS3RmBs7y8OderVd5HzA2UmG0VA5GKU0xNu15y8fPf7JgHJBHW6g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b+5uAyWQ; 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="b+5uAyWQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AD65C116AB; Thu, 25 Jan 2024 22:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223366; bh=gyCTtEy5PbjNvE5leNKdfOXPtZtPUb3cK4c+4fo9cSY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=b+5uAyWQjhVltyJThWXdiRTZFOBrbBcADIyK1nXaGYW6yKEUyCLs+nV1COVJqLtwH iz2glq9GdAfqgs93croz40dlgnxZu6xoBNsn34+MVamoQr+Uacvxqw1ck+Vj0XMVUC gVqeFfL1kyD9HSQHm9LcHhnzxzdR4QLWtAdN6D5XKp7zvzA5pxYKYK16kDzCc6+goq YsaKCBjU1GYrFvI6I/vDUUUvw02Dfh1OMbjFAWrvqB/eaaN0NM4PU3PFwZhhe3jWSS 4jriwKyjQiTRC369pjnW2Dit4ttKVL5kJ2pBM1+CFHWEXa1tTSvpN5MWuZxYAO2nfo CtmixarE0E8KQ== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:14 -0700 Subject: [PATCH 08/11] riscv: Kconfig: Remove version dependency from CONFIG_CLANG_SUPPORTS_DYNAMIC_FTRACE Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-8-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, conor@kernel.org, linux-riscv@lists.infradead.org X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1021; i=nathan@kernel.org; h=from:subject:message-id; bh=gyCTtEy5PbjNvE5leNKdfOXPtZtPUb3cK4c+4fo9cSY=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv071LT4ru7uzV6rVb5Z6r34Ps/2UlJJxG6j4rkfJ vb/+1Li21HKwiDGxSArpshS/Vj1uKHhnLOMN05NgpnDygQyhIGLUwAmoiHL8E/7SNnxB+EG5R7d E5heTxPWT5G4/t8kmePN+4aytLDrCasZGe7fbYuPipjZzKZlyuzUe6Lo22/h8Ls82+4WJ+xU/fO ghx0A 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 bumped to 13.0.1, this condition is always true, as the build will fail during the configuration stage for older LLVM versions. Remove it. Signed-off-by: Nathan Chancellor --- Cc: paul.walmsley@sifive.com Cc: palmer@dabbelt.com Cc: aou@eecs.berkeley.edu Cc: conor@kernel.org Cc: linux-riscv@lists.infradead.org --- arch/riscv/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 69d24f513922..00edc4ff589c 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -174,8 +174,6 @@ config RISCV config CLANG_SUPPORTS_DYNAMIC_FTRACE def_bool CC_IS_CLANG - # https://github.com/llvm/llvm-project/commit/6ab8927931851bb42b2c93a00801dc499d7d9b1e - depends on CLANG_VERSION >= 130000 # https://github.com/ClangBuiltLinux/linux/issues/1817 depends on AS_IS_GNU || (AS_IS_LLVM && (LD_IS_LLD || LD_VERSION >= 23600)) From patchwork Thu Jan 25 22:55:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531835 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 168F51B81E; Thu, 25 Jan 2024 22:56: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=1706223368; cv=none; b=skBISUudfRQXoftObNAqEfF4MQijM1APV6dykFOPU+RAoX49wlGnO7tWOTznNQY6RGMZSXxBOqs+zA21GGhYwmPWva+2DOpr9uWwgjoIHFG9Z0Al6ty+3xmN61lUZQbN3XN/zumWMuCkVu08FTSpVncuYBFhuC/IMU9fuqFAEfA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223368; c=relaxed/simple; bh=bT1Kw/x60kOitlZMWNafPmdLsoWMItemWBhie7YD9XI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VG4nyuMnox7IpZvoXmLJaGLAzrctrpDwrcDPfJ7zIn4xQEz7rRkHmMZM37xk355PhGrHsTf6d4rMPN9fW8i/7jleHIBGtUSvWiFHGvit071WEo8R02+4NRumVfU2k0kxJwDilzPXE6sfib1O7j4LsN3ixwb5Zx6/baXwPBgyk3E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Vm9XhisI; 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="Vm9XhisI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10818C43399; Thu, 25 Jan 2024 22:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223367; bh=bT1Kw/x60kOitlZMWNafPmdLsoWMItemWBhie7YD9XI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Vm9XhisI0+r01AtDM7hT6Qlf+/72BmdUJfjk7HzpkQqfo+6q6UAUrGk2wEX1mnGq+ AifZ6OrufCEJmyH1mVG6+NuPL+yN3bn3pNYRWmm8HAhlgkL+tqL4ceufEZOm0OyrY3 lnjhEEfCUYl8RoJ7UVoOpMW/JsNby6WAAkC/64kRL1Nm9m0i8OwKZZRTc2YSfuLayd /96/mE/alkmHGuux4DqHH5rS50bMzj0+9DgRxAyGRdoS2KSFIXPoG5WtIMUiZAX8oX he7GgenQWajMSh+FbcMbNwL86iz3lHCcMyusNj2PoNlqRUtNbVx0uyzr9EsrMjneUW +VPWnodIzPPoQ== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:15 -0700 Subject: [PATCH 09/11] fortify: Drop Clang version check for 12.0.1 or newer Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-9-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor , keescook@chromium.org, linux-hardening@vger.kernel.org X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=928; i=nathan@kernel.org; h=from:subject:message-id; bh=bT1Kw/x60kOitlZMWNafPmdLsoWMItemWBhie7YD9XI=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv27eWPvnV7twFfRCac5NVSbV+yKyDO4WymklMN+1 NaUwdC5o5SFQYyLQVZMkaX6sepxQ8M5ZxlvnJoEM4eVCWQIAxenAEyEayMjw9ZnpT/ionb+e3hY VUjldLWuGJNh5JL9089X7Dgxr8uJ9SYjQ9eP2Tqnnmccu3yrMU3w9v+eWaoWztvr+MJVb3woyVr xgQEA 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 bumped to 13.0.1, this condition is always true, as the build will fail during the configuration stage for older LLVM versions. Remove it. Signed-off-by: Nathan Chancellor Acked-by: Kees Cook --- Cc: keescook@chromium.org Cc: linux-hardening@vger.kernel.org --- security/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/Kconfig b/security/Kconfig index 606a87c29a01..412e76f1575d 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -142,8 +142,6 @@ config HARDENED_USERCOPY config FORTIFY_SOURCE bool "Harden common str/mem functions against buffer overflows" depends on ARCH_HAS_FORTIFY_SOURCE - # https://llvm.org/pr41459 - depends on !CC_IS_CLANG || CLANG_VERSION >= 120001 # https://github.com/llvm/llvm-project/issues/53645 depends on !CC_IS_CLANG || !X86_32 help From patchwork Thu Jan 25 22:55:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531836 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 BAF401D6A6; Thu, 25 Jan 2024 22:56:08 +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=1706223368; cv=none; b=Uf87S1kVP+41oenNa3NgdgDMHJox7k/ZIkIwBhFRY6ezX/otZZLBYUKEddltuaNjFBenKtD9xaO90RqnFBGFHYs3cP6c8i325mSUA2id6qFSvL/wXOcsW91HlzaqHiJcDbiBomdK8yb6eKTqZLDo2PRVybMNx7xugeRu/OZ05EE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223368; c=relaxed/simple; bh=qYBM2OLy1xkCHHfBZSY7751G6ZbDsz7ZqfUVr2+0/GI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SD5QF8R+k7jEz4nbDMOlt9xbo3FBSD4nTppyYKbl24t2wGLqQVYLCelWokFmOpFjLk2qxRf05HSLSVkSeiKGKa1AjWzO/BVW7UfG9lPXE6XuVtrKST+hwq/F24K48/tSJHLgL9Uw3y4oLjiYCK5Z+bn3bkSqoH60/J6Sl+aA0Zc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JbxKtekR; 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="JbxKtekR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C32B7C43390; Thu, 25 Jan 2024 22:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223368; bh=qYBM2OLy1xkCHHfBZSY7751G6ZbDsz7ZqfUVr2+0/GI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JbxKtekRjqjnn6njAqdJyNiSR2ZBSmdHB8jGlYcaXDRdTs96WIqwGOZDfoNtosHd1 0LYaRSm1Um1tQId1UxZUmRnfsw4nCcl/vymsY7+a3QKUWntDDdjudsW+d+8cgReMVq jWka0eQ3oD/F1x0M1MZi9u2Bs2x7nwtX68kKoUJ7gu02tbbpkLnXY6W1lnCK354evl +hGEu2Ht1Z0Y9W7y+4kwsPGPNGabpaU0u0RkygFwLukz9AVvtTk0J3yl44pAfZ0Aqy pJ+/TVYmIUD/jHjZcCTr77FsHFCyK/es0i0hPWLkfwhl7vnB+KvKU1kw/QB0nTmEaW mP3f4IPdD5Y1A== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:16 -0700 Subject: [PATCH 10/11] lib/Kconfig.debug: Update Clang version check in CONFIG_KCOV Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-10-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=924; i=nathan@kernel.org; h=from:subject:message-id; bh=qYBM2OLy1xkCHHfBZSY7751G6ZbDsz7ZqfUVr2+0/GI=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv3LK3/7OWJxudzWVUWi/juen7vUzXxCq9vQ2PLp+ zkPLy1Y2VHKwiDGxSArpshS/Vj1uKHhnLOMN05NgpnDygQyhIGLUwAm8iSIkeHh5MY7797sThfY r3bzmt+Rsz3xp3ymXKie4TRBWu7BRIapjAyL/sq8ObugZbnJ8r9Tz9x9KpvD/fenyrZ/1fLK7y2 7myW5AQ== 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 bumped to 13.0.1, this condition can be changed to just CONFIG_CC_IS_CLANG, as the build will fail during the configuration stage for older LLVM versions. Signed-off-by: Nathan Chancellor --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 8f502f15dc7f..1339fb893d71 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2085,7 +2085,7 @@ config KCOV depends on ARCH_HAS_KCOV depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS depends on !ARCH_WANTS_NO_INSTR || HAVE_NOINSTR_HACK || \ - GCC_VERSION >= 120000 || CLANG_VERSION >= 130000 + GCC_VERSION >= 120000 || CC_IS_CLANG select DEBUG_FS select GCC_PLUGIN_SANCOV if !CC_HAS_SANCOV_TRACE_PC select OBJTOOL if HAVE_NOINSTR_HACK From patchwork Thu Jan 25 22:55:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13531837 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 28B5717BBB; Thu, 25 Jan 2024 22:56:08 +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=1706223369; cv=none; b=ls4xXHXtEn3eKHYb6LnE7UYx6ioTOqUguhhQMDSXsbaSDS8/C3NYkWYK51MMdA9b0DK5HeWa1iZ3wAo92+mZaN5qeWsy+h5F7tTV2GKPUxcLThAMv160hmq4C6WCSbwqLi2FQhJii10/EW+S43UFZQbjE+g10ANKOQEpCq6l0O8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706223369; c=relaxed/simple; bh=UeJFFhP5K5DQQoi+dtNguzI64CEeLgb3Zsu8VdMJzbI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WK7DKcUpJF+EaRjXjxX1NyJxClRTLVzMldic+67IU6C679hE1hTq0rk/7V7Nn16yLRMRW1xvqAKd3z06r06VvPHvxNMczYQxcvz0Z3QhzL/6sMBWNb1G2p1Xa44Xn/3wTZB8tBYJfnfuQuFvAold5lz7ILj+ucXSpEHt7z4URUw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IKpJlDgk; 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="IKpJlDgk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 674C0C43399; Thu, 25 Jan 2024 22:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706223368; bh=UeJFFhP5K5DQQoi+dtNguzI64CEeLgb3Zsu8VdMJzbI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IKpJlDgkl/iKbA65PPiAZAJWgcrumBdsCpKqhd1yawQ1gNcfQoofLNdMCRkzBQ/CX 2SOE06iU/CAKpkmvpYJWss1opIxrGLaUn52/wmHPAQ9gNImZ6L21nq20EKgueS8jMW 88fV9fWPJAO94Vf256jt2TBkn3w9+vQAZ59WwGMcHQ18HccEorP8m+9KxWe8Xqx54V uJQ+fCcrdA6CeC6hBZ2hy+15ar4HFAa/yEVhpzxrqm9FkIlhkSwpL93p47wvbl93pM DN9+P7rzwQ0eMFJdLcinrXhnVQWpzerXJJh+lGB6vMlKnyNublIgHP7Oztu8TGYBXY 7eexNUfCsRmvg== From: Nathan Chancellor Date: Thu, 25 Jan 2024 15:55:17 -0700 Subject: [PATCH 11/11] compiler-clang.h: Update __diag_clang() macros for minimum version bump Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-bump-min-llvm-ver-to-13-0-1-v1-11-f5ff9bda41c5@kernel.org> References: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> In-Reply-To: <20240125-bump-min-llvm-ver-to-13-0-1-v1-0-f5ff9bda41c5@kernel.org> To: akpm@linux-foundation.org, masahiroy@kernel.org Cc: nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=918; i=nathan@kernel.org; h=from:subject:message-id; bh=UeJFFhP5K5DQQoi+dtNguzI64CEeLgb3Zsu8VdMJzbI=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmbnv274uD7sqTfcJrv1oY5EQ2Jn1iuaARsDb7702pzy AG/T3NMOkpZGMS4GGTFFFmqH6seNzScc5bxxqlJMHNYmUCGMHBxCsBEPoQy/BX/Efs1wid5zX5D iXdJwW67+OPV7t/0vxglYmRs2uB/1IeRYeeL5T8/fzUv/ztZxMmKXWiN8FPZn9tcpSZunbXC/Ld fBicA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 The minimum supported version of LLVM for building the kernel has been bumped to 13.0.1. Update the __diag_clang() macros for this bump. Signed-off-by: Nathan Chancellor --- include/linux/compiler-clang.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index f0a47afef125..49feac0162a5 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -114,11 +114,7 @@ #define __diag_str(s) __diag_str1(s) #define __diag(s) _Pragma(__diag_str(clang diagnostic s)) -#if CONFIG_CLANG_VERSION >= 110000 -#define __diag_clang_11(s) __diag(s) -#else -#define __diag_clang_11(s) -#endif +#define __diag_clang_13(s) __diag(s) #define __diag_ignore_all(option, comment) \ - __diag_clang(11, ignore, option) + __diag_clang(13, ignore, option)