All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND][PATCH] crypto: twofish: Rename twofish to twofish_generic and add an alias
@ 2010-05-26 20:41 Joachim Fritschi
  2010-06-03 11:03 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Joachim Fritschi @ 2010-05-26 20:41 UTC (permalink / raw)
  To: herbert; +Cc: David S. Miller, linux-crypto

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
---
  crypto/Makefile                         |    2 +-
  crypto/{twofish.c => twofish_generic.c} |    1 +
  2 files changed, 2 insertions(+), 1 deletions(-)
  rename crypto/{twofish.c => twofish_generic.c} (99%)

diff --git a/crypto/Makefile b/crypto/Makefile
index d7e6441..d719716 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -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
diff --git a/crypto/twofish.c b/crypto/twofish_generic.c
similarity index 99%
rename from crypto/twofish.c
rename to crypto/twofish_generic.c
index dfcda23..1f07b84 100644
--- a/crypto/twofish.c
+++ b/crypto/twofish_generic.c
@@ -212,3 +212,4 @@ module_exit(twofish_mod_fini);
   MODULE_LICENSE("GPL");
  MODULE_DESCRIPTION ("Twofish Cipher Algorithm");
+MODULE_ALIAS("twofish");
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RESEND][PATCH] crypto: twofish: Rename twofish to twofish_generic and add an alias
  2010-05-26 20:41 [RESEND][PATCH] crypto: twofish: Rename twofish to twofish_generic and add an alias Joachim Fritschi
@ 2010-06-03 11:03 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2010-06-03 11:03 UTC (permalink / raw)
  To: Joachim Fritschi; +Cc: David S. Miller, linux-crypto

On Wed, May 26, 2010 at 10:41:01PM +0200, Joachim Fritschi wrote:
> 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

I had to fix up your patch by hand becaus it was white space
damaged.  Also you should put angle brackets around your email
address on the sign-off line.

Anyway I've applied your patch.  Thanks.
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-03 11:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-26 20:41 [RESEND][PATCH] crypto: twofish: Rename twofish to twofish_generic and add an alias Joachim Fritschi
2010-06-03 11:03 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.