Skip to content

Commit c3ca9a7

Browse files
committed
Linux kernel: disable SHANI-512 as objtool cannot handle it
Signed-off-by: Stephan Mueller <smueller@chronox.de>
1 parent 9a20a81 commit c3ca9a7

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

linux_kernel/Kbuild.sha2

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,19 @@ leancrypto-$(CONFIG_LEANCRYPTO_SHA2_512) \
7676
../hash/src/sha512_selector.o \
7777
leancrypto_kernel_sha512.o
7878

79-
ifdef CONFIG_X86_64
80-
leancrypto-$(CONFIG_LEANCRYPTO_SHA2_512) \
81-
+= ../hash/src/sha512_avx2.o \
82-
../hash/src/sha512_shani.o \
83-
../hash/src/asm/AVX2/sha2-512-AVX2.o
84-
else
79+
# Disable this support, because objtool cannot handle SHANI-512 instructions
80+
# in kernels < 6.10. If you have a newer kernel, you can enable it without
81+
# an issue.
82+
#ifdef CONFIG_X86_64
83+
#leancrypto-$(CONFIG_LEANCRYPTO_SHA2_512) \
84+
# += ../hash/src/sha512_avx2.o \
85+
# ../hash/src/sha512_shani.o \
86+
# ../hash/src/asm/AVX2/sha2-512-AVX2.o
87+
#else
8588
leancrypto-$(CONFIG_LEANCRYPTO_SHA2_512) \
8689
+= ../hash/src/sha512_avx2_null.o \
8790
../hash/src/sha512_shani_null.o
88-
endif
91+
#endif
8992

9093
# ARM Neon and CE support
9194
ifdef CONFIG_ARM64

0 commit comments

Comments
 (0)