Offering: HULK hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8K36D CVE: NA
--------------------------------
The original patch that introduces NEON implementation of CRCT10DIF algorithm reused the config CONFIG_CRYPTO_CRCT10DIF_ARM64_CE. This hides the CE implementation of the same algorithm from mainline which is not a very good pratice. This patch fixes this by introducing a new config option CONFIG_CRYPTO_CRCT10DIF_ARM64_NEON.
Signed-off-by: GUO Zihua guozihua@huawei.com --- arch/arm64/crypto/Kconfig | 10 ++++++++++ arch/arm64/crypto/Makefile | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/crypto/Kconfig b/arch/arm64/crypto/Kconfig index 6d06b448a66e..cc743c2cc7b6 100644 --- a/arch/arm64/crypto/Kconfig +++ b/arch/arm64/crypto/Kconfig @@ -323,5 +323,15 @@ config CRYPTO_CRCT10DIF_ARM64_CE Architecture: arm64 using - PMULL (Polynomial Multiply Long) instructions
+config CRYPTO_CRCT10DIF_ARM64_NEON + tristate "CRCT10DIF (NEON)" + depends on KERNEL_MODE_NEON && CRC_T10DIF + select CRYPTO_HASH + help + CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF) + + Architecture: arm64 using + - NEON instructions + endmenu
diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile index c9d88436411b..44f49f9725d2 100644 --- a/arch/arm64/crypto/Makefile +++ b/arch/arm64/crypto/Makefile @@ -45,7 +45,10 @@ obj-$(CONFIG_CRYPTO_POLYVAL_ARM64_CE) += polyval-ce.o polyval-ce-y := polyval-ce-glue.o polyval-ce-core.o
obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM64_CE) += crct10dif-ce.o -crct10dif-ce-y := crct10dif-neon-asm_64.o crct10dif-neon_glue.o +crct10dif-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o + +obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM64_NEON) += crct10dif-neon.o +crct10dif-neon-y := crct10dif-neon-asm_64.o crct10dif-neon_glue.o AFLAGS_crct10dif-neon-asm_64.o := -march=armv8-a+crypto
obj-$(CONFIG_CRYPTO_AES_ARM64_CE) += aes-ce-cipher.o