Skip to content

Commit e2172cc

Browse files
committed
Linux kernel: disable SHANI-512 asm code
Signed-off-by: Stephan Mueller <smueller@chronox.de>
1 parent 9cb89b0 commit e2172cc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

hash/src/asm/AVX2/sha2-512-AVX2.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,7 @@ SYM_FUNC_END(sha512_block_data_order)
17641764

17651765
#endif
17661766

1767+
#ifndef CONFIG_LEANCRYPTO_SHA2_512_DISABLE_SHANI
17671768
SYM_FUNC_START(sha512_block_data_order_shaext)
17681769
SYM_FUNC_ENTER(sha512_block_data_order_shaext)
17691770
.align 64
@@ -1993,6 +1994,7 @@ SYM_FUNC_ENTER(sha512_block_data_order_shaext)
19931994
RET
19941995
.cfi_endproc
19951996
SYM_FUNC_END(sha512_block_data_order_shaext)
1997+
#endif
19961998

19971999
#if 0
19982000
SYM_FUNC_START(sha512_block_data_order_xop)

linux_kernel/Kbuild.sha2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ leancrypto-$(CONFIG_LEANCRYPTO_SHA2_512) \
7878

7979
# Disable this support, because objtool cannot handle SHANI-512 instructions
8080
# in kernels < 6.10. If you have a newer kernel, you can enable it without
81-
# an issue. To reenable it, turn shani_null into shani below.
81+
# an issue. To reenable it, turn shani_null into shani below and remove the
82+
# define.
8283
ifdef CONFIG_X86_64
84+
ccflags-y += -DCONFIG_LEANCRYPTO_SHA2_512_DISABLE_SHANI
8385
leancrypto-$(CONFIG_LEANCRYPTO_SHA2_512) \
8486
+= ../hash/src/sha512_avx2.o \
8587
../hash/src/sha512_shani_null.o \

0 commit comments

Comments
 (0)