From: Jan Glauber <jan.glauber@de.ibm.com>
To: Sebastian Siewior <sebastian@breakpoint.cc>
Cc: Herbert Xu <herbert@gondor.apana.org.au>, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] [crypto] load the SHA1[1|256] module by an alias
Date: Mon, 08 Oct 2007 13:25:23 +0200 [thread overview]
Message-ID: <1191842723.7760.3.camel@localhost.localdomain> (raw)
In-Reply-To: <E1IdMSX-0004KV-LS@Chamillionaire.breakpoint.cc>
Hi Sebastian,
what about SHA-512? Should that not also be renamed to sha512_generic.c ?
--Jan
On Thu, 2007-10-04 at 09:37 +0200, Sebastian Siewior wrote:
> Loading the crypto algorithm by the alias instead of by module directly
> has the advantage that all possible implementations of this algorithm
> are loaded automatically and the crypto API can choose the best one
> depending on its priority.
> Additionally it ensures that the generic implementation as well as the
> HW driver (if available) is loaded in case the HW driver needs the
> generic version as fallback in corner cases.
>
> Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
> ---
> arch/s390/crypto/sha1_s390.c | 2 +-
> arch/s390/crypto/sha256_s390.c | 2 +-
> crypto/Makefile | 4 ++--
> crypto/{sha1.c => sha1_generic.c} | 2 +-
> crypto/{sha256.c => sha256_generic.c} | 2 +-
> drivers/crypto/padlock-sha.c | 4 ++--
> 6 files changed, 8 insertions(+), 8 deletions(-)
> rename crypto/{sha1.c => sha1_generic.c} (99%)
> rename crypto/{sha256.c => sha256_generic.c} (99%)
>
> diff --git a/arch/s390/crypto/sha1_s390.c b/arch/s390/crypto/sha1_s390.c
> index af4460e..8ebd3cd 100644
> --- a/arch/s390/crypto/sha1_s390.c
> +++ b/arch/s390/crypto/sha1_s390.c
> @@ -12,7 +12,7 @@
> * Author(s): Thomas Spatzier
> * Jan Glauber (jan.glauber@de.ibm.com)
> *
> - * Derived from "crypto/sha1.c"
> + * Derived from "crypto/sha1_generic.c"
> * Copyright (c) Alan Smithee.
> * Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk>
> * Copyright (c) Jean-Francois Dive <jef@linuxbe.org>
> diff --git a/arch/s390/crypto/sha256_s390.c b/arch/s390/crypto/sha256_s390.c
> index 2ced333..c728bd0 100644
> --- a/arch/s390/crypto/sha256_s390.c
> +++ b/arch/s390/crypto/sha256_s390.c
> @@ -7,7 +7,7 @@
> * Copyright IBM Corp. 2005,2007
> * Author(s): Jan Glauber (jang@de.ibm.com)
> *
> - * Derived from "crypto/sha256.c"
> + * Derived from "crypto/sha256_generic.c"
> * and "arch/s390/crypto/sha1_s390.c"
> *
> * This program is free software; you can redistribute it and/or modify it
> diff --git a/crypto/Makefile b/crypto/Makefile
> index b6ef5e4..43c2a0d 100644
> --- a/crypto/Makefile
> +++ b/crypto/Makefile
> @@ -21,8 +21,8 @@ obj-$(CONFIG_CRYPTO_XCBC) += xcbc.o
> obj-$(CONFIG_CRYPTO_NULL) += crypto_null.o
> obj-$(CONFIG_CRYPTO_MD4) += md4.o
> obj-$(CONFIG_CRYPTO_MD5) += md5.o
> -obj-$(CONFIG_CRYPTO_SHA1) += sha1.o
> -obj-$(CONFIG_CRYPTO_SHA256) += sha256.o
> +obj-$(CONFIG_CRYPTO_SHA1) += sha1_generic.o
> +obj-$(CONFIG_CRYPTO_SHA256) += sha256_generic.o
> obj-$(CONFIG_CRYPTO_SHA512) += sha512.o
> obj-$(CONFIG_CRYPTO_WP512) += wp512.o
> obj-$(CONFIG_CRYPTO_TGR192) += tgr192.o
> diff --git a/crypto/sha1.c b/crypto/sha1_generic.c
> similarity index 99%
> rename from crypto/sha1.c
> rename to crypto/sha1_generic.c
> index 1bba551..70364dd 100644
> --- a/crypto/sha1.c
> +++ b/crypto/sha1_generic.c
> @@ -139,4 +139,4 @@ module_exit(fini);
> MODULE_LICENSE("GPL");
> MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm");
>
> -MODULE_ALIAS("sha1-generic");
> +MODULE_ALIAS("sha1");
> diff --git a/crypto/sha256.c b/crypto/sha256_generic.c
> similarity index 99%
> rename from crypto/sha256.c
> rename to crypto/sha256_generic.c
> index 716195b..74bf2f9 100644
> --- a/crypto/sha256.c
> +++ b/crypto/sha256_generic.c
> @@ -339,4 +339,4 @@ module_exit(fini);
> MODULE_LICENSE("GPL");
> MODULE_DESCRIPTION("SHA256 Secure Hash Algorithm");
>
> -MODULE_ALIAS("sha256-generic");
> +MODULE_ALIAS("sha256");
> diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
> index a781fd2..b8ee645 100644
> --- a/drivers/crypto/padlock-sha.c
> +++ b/drivers/crypto/padlock-sha.c
> @@ -314,5 +314,5 @@ MODULE_DESCRIPTION("VIA PadLock SHA1/SHA256 algorithms support.");
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Michal Ludvig");
>
> -MODULE_ALIAS("sha1-padlock");
> -MODULE_ALIAS("sha256-padlock");
> +MODULE_ALIAS("sha1");
> +MODULE_ALIAS("sha256");
--
++49 7031 161911
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter Geschäftsführung: Herbert
Kircher, Sitz der Gesellschaft: Böblingen, Registergericht Amtsgericht
Stuttgart, HRB 243294
next prev parent reply other threads:[~2007-10-08 11:23 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-20 0:34 {twofish,aes}-{x86_64,i586} versus C implementations Andi Kleen
2007-08-20 1:01 ` Herbert Xu
2007-08-20 10:16 ` Andi Kleen
2007-08-20 9:45 ` Sebastian Siewior
2007-08-20 10:47 ` Andi Kleen
2007-08-20 10:08 ` Sebastian Siewior
2007-08-20 11:12 ` Andi Kleen
2007-08-20 11:27 ` Sebastian Siewior
2007-08-20 12:06 ` Herbert Xu
2007-08-20 13:06 ` Andi Kleen
2007-08-20 13:07 ` Herbert Xu
2007-09-02 22:42 ` Sebastian Siewior
2007-09-04 13:58 ` Andi Kleen
2007-09-19 12:29 ` Herbert Xu
2007-09-19 21:46 ` Sebastian Siewior
2007-09-20 0:20 ` Herbert Xu
2007-09-20 21:09 ` Sebastian Siewior
2007-09-30 12:23 ` Sebastian Siewior
2007-09-30 12:42 ` Sebastian Siewior
2007-10-03 7:35 ` Herbert Xu
2007-10-04 8:35 ` Sebastian Siewior
2007-10-03 19:23 ` [PATCH] [crypto] load the DES module by an alias Sebastian Siewior
2007-10-05 8:48 ` Herbert Xu
2007-10-04 7:37 ` [PATCH] [crypto] load the AES " Sebastian Siewior
2007-10-05 8:52 ` Herbert Xu
2007-10-04 7:37 ` [PATCH] [crypto] load the SHA1[1|256] " Sebastian Siewior
2007-10-05 8:57 ` Herbert Xu
2007-10-05 13:50 ` Sebastian Siewior
2007-10-05 13:12 ` [PATCH] [crypto] load the SHA1[1|256] module by an alias (v2) Sebastian Siewior
2007-10-05 15:10 ` Herbert Xu
2007-10-06 22:02 ` Sebastian Siewior
2007-10-08 3:21 ` Herbert Xu
2007-10-07 21:42 ` Sebastian Siewior
2007-10-08 3:20 ` Herbert Xu
2007-10-08 12:35 ` Sebastian Siewior
2007-10-08 4:12 ` Herbert Xu
2007-10-05 14:20 ` [PATCH] [crypto] load the SHA1[1|256] module by an alias Herbert Xu
2007-10-06 21:54 ` Sebastian Siewior
2007-10-08 11:25 ` Jan Glauber [this message]
2007-10-08 11:30 ` Sebastian Siewior
2007-10-04 8:48 ` {twofish,aes}-{x86_64,i586} versus C implementations Herbert Xu
2007-10-04 9:31 ` Andi Kleen
2007-10-04 10:00 ` Sebastian Siewior
2007-10-04 10:00 ` Herbert Xu
2007-10-04 9:39 ` Sebastian Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1191842723.7760.3.camel@localhost.localdomain \
--to=jan.glauber@de.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=sebastian@breakpoint.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.