From patchwork Wed Oct 25 17:21:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13436490 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 2CDBDC07545 for ; Wed, 25 Oct 2023 17:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=pg4VPuqMzu+aeDz3eIdA+YpMugmosVl0J3oESY9Pspo=; b=nnE3iWdpPki8+A ypB0VjIJZfJ19eW0n2qqQyyjQJKag+ow9P0UUwlUIiIQ+pZHh7Gtb9LMx4KNeJpDeGVqB3RbB35M4 Mom4Rt5PCQhVj6NegQ3IEGs9lxoqHP7xDG+JSyTZDDCtzc8hAfHITAGydatHMhLvdDH4Qqipl2tju KsO78KoNZ8Tv81es3h9ETwkduBcEtKZ16xMv7FID6+/gmLmkjjAPE7ViJUobwsFF5IR8jhFuGbuGc cUD6Wd0gjpk+Cyqu7OEuP31RfgrgT9u3dM5YVqC3O+Fed5LDF9s26ZM1+KovHM1QYXVTxad0YvKtj GC3u7hafjF37JbgWlCJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvhZp-00Clxf-0G; Wed, 25 Oct 2023 17:21:53 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvhZl-00ClxI-2O for linux-arm-kernel@lists.infradead.org; Wed, 25 Oct 2023 17:21:51 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id E5446B82AA5; Wed, 25 Oct 2023 17:21:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8124C433C8; Wed, 25 Oct 2023 17:21:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698254506; bh=Dc1DV8LrDzEF5Fm79ag/CEvG7l8MFk55p7SvmLsQ/8s=; h=From:Date:Subject:To:Cc:From; b=sko4Z2dKG8pIE9+uzvICRMvyUqgzAs7xkStx5qogZIfTmLA2qUHmaofiEvjUtWtIM wAhBVTaps+E5FFR3CaoIwdjiniLg73T6gUSxWnmhc1fgRWsOZJ68KCM5H8O9icwGCv Fzd/5doSGwAHEIgvaKMy5HZOXAccFoakhxRPyMSetczczumcnh7pJmckTe4/NVSRXs Q7kTx8qNqX6bT6/V3Z7If9TDfggHVsMcH1+CMGLbqwZ+Axp31B6j92PTFdr8/PHIjp krhSTPOz8ZwyywuGiUuDzxM4RWnZPgycRFUdqY8US5tmvEpEU2hbS0Oa8/VSHBAkVU ekGbpCTmV2n8Q== From: Nathan Chancellor Date: Wed, 25 Oct 2023 10:21:28 -0700 Subject: [PATCH] arm64: Restrict CPU_BIG_ENDIAN to GNU as or LLVM IAS 15.x or newer MIME-Version: 1.0 Message-Id: <20231025-disable-arm64-be-ias-b4-llvm-15-v1-1-b25263ed8b23@kernel.org> X-B4-Tracking: v=1; b=H4sIAJdOOWUC/x2NSQrDMAwAvxJ0rsD7oV8pPViNnAictFgQAiZ/j +lxGJjpoNyEFZ5Th8aHqHz3AfYxwWfN+8Io82BwxnlrXMRZNFNlzG1LAWn4rEgBaz02tBEpFW+ KLy4Qw6j8Ghc5/4fX+7pu6TPQZ3EAAAA= To: catalin.marinas@arm.com, will@kernel.org Cc: mark.rutland@arm.com, ndesaulniers@google.com, trix@redhat.com, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1315; i=nathan@kernel.org; h=from:subject:message-id; bh=Dc1DV8LrDzEF5Fm79ag/CEvG7l8MFk55p7SvmLsQ/8s=; b=owGbwMvMwCEmm602sfCA1DTG02pJDKmWfisnhkxU7fs1f4ndyVcHAgvqZF54fnXNe/KkYsWaw ++8lwcwdJSyMIhxMMiKKbJUP1Y9bmg45yzjjVOTYOawMoEMYeDiFICJLD/PyHDWMcPmg/nEyCum 0VwLWrc9f3D88Ofz+1nMbJdN3/8u53cnI8OmGWvu356xdU/t9rBg7ht7ZwhtmC1VmDM5acVdy+l LImYxAAA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_102149_951367_32C04C31 X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. 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 A recent refactoring in the arm64 tree exposed an assembler bug in LLVM with regards to the generation of NOPs for arm64 big endian, resulting in near-immediate crashes on boot in QEMU. Restrict CONFIG_CPU_BIG_ENDIAN to a known good assembler, which is either GNU as or LLVM's IAS 15.0.0 and newer, which contains the linked commit. Closes: https://github.com/ClangBuiltLinux/linux/issues/1948 Link: https://github.com/llvm/llvm-project/commit/1379b150991f70a5782e9a143c2ba5308da1161c Signed-off-by: Nathan Chancellor Acked-by: Mark Rutland Signed-off-by: Nathan Chancellor --- arch/arm64/Kconfig | 2 ++ 1 file changed, 2 insertions(+) --- base-commit: 22e877699642285c47f5d7d83b2d59815c29ebe8 change-id: 20231025-disable-arm64-be-ias-b4-llvm-15-b6f30f3f24be Best regards, diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index adf2f8a327be..92d33ece4c45 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1360,6 +1360,8 @@ 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 Say Y if you plan on running a kernel with a big-endian userspace.