[PATCH 12/14] x86: Hacks for hacked up llvm

Peter Zijlstra posted 14 patches 2 months ago
[PATCH 12/14] x86: Hacks for hacked up llvm
Posted by Peter Zijlstra 2 months ago
XXX do this nicely once the llvm hacks are done nice

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/x86/Kconfig               |    8 ++++----
 arch/x86/include/asm/linkage.h |    2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)

--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2444,10 +2444,10 @@ config CC_HAS_ENTRY_PADDING
 
 config FUNCTION_PADDING_CFI
 	int
-	default 59 if FUNCTION_ALIGNMENT_64B
-	default 27 if FUNCTION_ALIGNMENT_32B
-	default 11 if FUNCTION_ALIGNMENT_16B
-	default  3 if FUNCTION_ALIGNMENT_8B
+	default 57 if FUNCTION_ALIGNMENT_64B
+	default 25 if FUNCTION_ALIGNMENT_32B
+	default  9 if FUNCTION_ALIGNMENT_16B
+	default  1 if FUNCTION_ALIGNMENT_8B
 	default  0
 
 # Basically: FUNCTION_ALIGNMENT - 5*CFI_CLANG
--- a/arch/x86/include/asm/linkage.h
+++ b/arch/x86/include/asm/linkage.h
@@ -102,6 +102,8 @@
 	CFI_PRE_PADDING						\
 	.byte 0xb8 ASM_NL					\
 	.long __kcfi_typeid_##name ASM_NL			\
+	.byte 0xb0 ASM_NL					\
+	.byte 0x7f ASM_NL					\
 	CFI_POST_PADDING					\
 	SYM_FUNC_END(__cfi_##name)