public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] arm64: Restrict CPU_BIG_ENDIAN to GNU as or LLVM IAS 15.x or newer
@ 2023-10-25 17:21 Nathan Chancellor
  2023-10-25 18:01 ` Mark Rutland
  2023-10-26 16:36 ` Catalin Marinas
  0 siblings, 2 replies; 7+ messages in thread
From: Nathan Chancellor @ 2023-10-25 17:21 UTC (permalink / raw)
  To: catalin.marinas, will
  Cc: mark.rutland, ndesaulniers, trix, linux-arm-kernel, llvm, patches,
	Nathan Chancellor

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 <nathan@kernel.org>
---
 arch/arm64/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

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.
 

---
base-commit: 22e877699642285c47f5d7d83b2d59815c29ebe8
change-id: 20231025-disable-arm64-be-ias-b4-llvm-15-b6f30f3f24be

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-26 16:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-25 17:21 [PATCH] arm64: Restrict CPU_BIG_ENDIAN to GNU as or LLVM IAS 15.x or newer Nathan Chancellor
2023-10-25 18:01 ` Mark Rutland
2023-10-25 18:31   ` Nathan Chancellor
2023-10-26 15:28     ` Catalin Marinas
2023-10-26 15:31       ` Mark Rutland
2023-10-26 15:33         ` Catalin Marinas
2023-10-26 16:36 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox