]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
crypto: twofish: Rename twofish to twofish_generic and add an alias
authorJoachim Fritschi <jfritschi@freenet.de>
Thu, 3 Jun 2010 11:02:51 +0000 (21:02 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 3 Jun 2010 11:02:51 +0000 (21:02 +1000)
This fixes the broken autoloading of the corresponding twofish assembler
ciphers on x86 and x86_64 if they are available. The module name of the
generic implementation was in conflict with the alias in the assembler
modules. The generic twofish c implementation is renamed to
twofish_generic according to the other algorithms with assembler
implementations and an module alias is added for 'twofish'. You can now
load 'twofish' giving you the best implementation by priority,
'twofish-generic' to get the c implementation or 'twofish-asm' to get
the assembler version of cipher.

Signed-off-by: Joachim Fritschi <jfritschi@freenet.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/Makefile
crypto/twofish_generic.c [moved from crypto/twofish.c with 99% similarity]

index d1cfa051afe4753c20382e62776d905bb97871f8..423b7de61f93e3049d7abc2afe6945ce58b45ef9 100644 (file)
@@ -61,7 +61,7 @@ obj-$(CONFIG_CRYPTO_CRYPTD) += cryptd.o
 obj-$(CONFIG_CRYPTO_DES) += des_generic.o
 obj-$(CONFIG_CRYPTO_FCRYPT) += fcrypt.o
 obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o
-obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o
+obj-$(CONFIG_CRYPTO_TWOFISH) += twofish_generic.o
 obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o
 obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
 obj-$(CONFIG_CRYPTO_AES) += aes_generic.o
similarity index 99%
rename from crypto/twofish.c
rename to crypto/twofish_generic.c
index dfcda231f87ad321f185dbb505f745d990d3e498..1f07b843e07cd3a00a8c02844a1f60c1941fdcd9 100644 (file)
@@ -212,3 +212,4 @@ module_exit(twofish_mod_fini);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION ("Twofish Cipher Algorithm");
+MODULE_ALIAS("twofish");