linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: disable patchable function entry on big-endian clang builds
@ 2020-05-05 14:12 Arnd Bergmann
  2020-05-05 14:25 ` Mark Rutland
  0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2020-05-05 14:12 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Torsten Duwe, Mark Rutland,
	Ard Biesheuvel, Amit Daniel Kachhap
  Cc: Arnd Bergmann, Torsten Duwe, Ard Biesheuvel, AKASHI Takahiro,
	Josh Poimboeuf, Julien Thierry, Andrew Morton, Marc Zyngier,
	Kees Cook, Alexandre Ghiti, Kristina Martsenko, Ionela Voinescu,
	Steve Capper, linux-arm-kernel, linux-kernel, clang-built-linux

Clang only supports the patchable_function_entry attribute on
little-endian arm64 builds, but not on big-endian:

include/linux/kasan-checks.h:16:8: error: unknown attribute 'patchable_function_entry' ignored [-Werror,-Wunknown-attributes]

Disable that configuration with another dependency. Unfortunately
the existing check is not enough, as $(cc-option) at this point does
not pass the -mbig-endian flag.

Fixes: 3b23e4991fb6 ("arm64: implement ftrace with regs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 4b256fa6db7a..a33d6402b934 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -151,7 +151,7 @@ config ARM64
 	select HAVE_DMA_CONTIGUOUS
 	select HAVE_DYNAMIC_FTRACE
 	select HAVE_DYNAMIC_FTRACE_WITH_REGS \
-		if $(cc-option,-fpatchable-function-entry=2)
+		if $(cc-option,-fpatchable-function-entry=2) && !(CC_IS_CLANG && CPU_BIG_ENDIAN)
 	select HAVE_EFFICIENT_UNALIGNED_ACCESS
 	select HAVE_FAST_GUP
 	select HAVE_FTRACE_MCOUNT_RECORD
-- 
2.26.0


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

end of thread, other threads:[~2020-05-06 17:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 14:12 [PATCH] arm64: disable patchable function entry on big-endian clang builds Arnd Bergmann
2020-05-05 14:25 ` Mark Rutland
2020-05-05 17:42   ` Torsten Duwe
2020-05-06  3:45     ` Nathan Chancellor
2020-05-06 10:22       ` Arnd Bergmann
2020-05-06 15:31         ` Nathan Chancellor
2020-05-06 15:45           ` Fangrui Song
2020-05-06 16:30             ` Nick Desaulniers
2020-05-06 17:34               ` Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).