diff options
author | Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> | 2018-01-21 13:00:12 -0800 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-12-18 10:27:36 +0100 |
commit | 38d4ba4e191738965f133cb6faa423f189ed1b13 (patch) | |
tree | 6a50c0753429cbcf6ffc44556b1fc34ec49788d0 | |
parent | 63a87b4c7a537afdc0c8c3507e29f5bf79b0bfd8 (diff) | |
download | upstream-38d4ba4e191738965f133cb6faa423f189ed1b13.tar.gz upstream-38d4ba4e191738965f133cb6faa423f189ed1b13.tar.bz2 upstream-38d4ba4e191738965f133cb6faa423f189ed1b13.zip |
kernel: package x86-optimized crypto-misc modules
Some of the modules in the crypto-misc package have alternate
implementations optimized for different x86 instruction set extensions,
but only one of these was built for this package until now: twofish-i586.ko
Tested with insmod, on both x86 and x86_64. The modules now have an
autoload, which they previous didn't, loading the dependencies in the
correct order.
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
(backported from c762817c9211f439c5da6ea30b6ed828c9861c4f)
-rw-r--r-- | package/kernel/linux/modules/crypto.mk | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 2ea2d2c0e7..235e6dadac 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -441,8 +441,21 @@ $(eval $(call KernelPackage,crypto-michael-mic)) define KernelPackage/crypto-misc TITLE:=Other CryptoAPI modules - DEPENDS:=+kmod-crypto-manager + DEPENDS:=+kmod-crypto-xts KCONFIG:= \ + CONFIG_CRYPTO_CAMELLIA_X86_64 \ + CONFIG_CRYPTO_BLOWFISH_X86_64 \ + CONFIG_CRYPTO_TWOFISH_X86_64 \ + CONFIG_CRYPTO_TWOFISH_X86_64_3WAY \ + CONFIG_CRYPTO_SERPENT_SSE2_X86_64 \ + CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 \ + CONFIG_CRYPTO_CAST5_AVX_X86_64 \ + CONFIG_CRYPTO_CAST6_AVX_X86_64 \ + CONFIG_CRYPTO_TWOFISH_AVX_X86_64 \ + CONFIG_CRYPTO_SERPENT_AVX_X86_64 \ + CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 \ + CONFIG_CRYPTO_SERPENT_AVX2_X86_64 \ + CONFIG_CRYPTO_SERPENT_SSE2_586 \ CONFIG_CRYPTO_ANUBIS \ CONFIG_CRYPTO_BLOWFISH \ CONFIG_CRYPTO_CAMELLIA \ @@ -472,15 +485,50 @@ define KernelPackage/crypto-misc $(LINUX_DIR)/crypto/blowfish_common.ko \ $(LINUX_DIR)/crypto/blowfish_generic.ko \ $(LINUX_DIR)/crypto/serpent_generic.ko + AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \ + cast5_generic cast6_generic khazad tea tgr192 twofish_common \ + wp512 blowfish_common serpent_generic) + ifndef CONFIG_TARGET_x86 + AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic) + endif $(call AddDepends/crypto) endef ifndef CONFIG_TARGET_x86_64 define KernelPackage/crypto-misc/x86 - FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko + FILES+= \ + $(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \ + $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \ + $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \ + $(LINUX_DIR)/crypto/ablk_helper.ko \ + $(LINUX_DIR)/crypto/cryptd.ko \ + $(LINUX_DIR)/crypto/lrw.ko + AUTOLOAD+= $(call AutoLoad,10,lrw cryptd ablk_helper glue_helper \ + serpent-sse2-i586 twofish-i586 blowfish_generic) endef endif +define KernelPackage/crypto-misc/x86/64 + FILES+= \ + $(LINUX_DIR)/arch/x86/crypto/camellia-x86_64.ko \ + $(LINUX_DIR)/arch/x86/crypto/blowfish-x86_64.ko \ + $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64.ko \ + $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64-3way.ko \ + $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-x86_64.ko \ + $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx-x86_64.ko \ + $(LINUX_DIR)/arch/x86/crypto/cast5-avx-x86_64.ko \ + $(LINUX_DIR)/arch/x86/crypto/cast6-avx-x86_64.ko \ + $(LINUX_DIR)/arch/x86/crypto/twofish-avx-x86_64.ko \ + $(LINUX_DIR)/arch/x86/crypto/serpent-avx-x86_64.ko \ + $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx2.ko \ + $(LINUX_DIR)/arch/x86/crypto/serpent-avx2.ko \ + $(LINUX_DIR)/crypto/ablk_helper.ko + AUTOLOAD+= $(call AutoLoad,10,ablk_helper camellia-x86_64 \ + camellia-aesni-avx-x86_64 camellia-aesni-avx2 cast5-avx-x86_64 \ + cast6-avx-x86_64 twofish-x86_64 twofish-x86_64-3way \ + twofish-avx-x86_64 blowfish-x86_64 serpent-avx-x86_64 serpent-avx2) +endef + $(eval $(call KernelPackage,crypto-misc)) |