summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-06-29 17:01:43 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2018-07-09 00:30:21 +0800
commite47890163a3c2a6ec5a18322d283046d1bdec5e6 (patch)
tree2e31caec320a25c201994198d4af4f420fc95f22 /crypto
parentb73b7ac0a77492b1bd671a72787931847b330c03 (diff)
crypto: sha512_generic - add cra_priority
sha512-generic and sha384-generic had a cra_priority of 0, so it wasn't possible to have a lower priority SHA-512 or SHA-384 implementation, as is desired for sha512_mb which is only useful under certain workloads and is otherwise extremely slow. Change them to priority 100, which is the priority used for many of the other generic algorithms. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/sha512_generic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
index 0b805d03b5e5..55377b1cba6b 100644
--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -193,6 +193,7 @@ static struct shash_alg sha512_algs[2] = { {
.base = {
.cra_name = "sha512",
.cra_driver_name = "sha512-generic",
+ .cra_priority = 100,
.cra_flags = CRYPTO_ALG_TYPE_SHASH,
.cra_blocksize = SHA512_BLOCK_SIZE,
.cra_module = THIS_MODULE,
@@ -207,6 +208,7 @@ static struct shash_alg sha512_algs[2] = { {
.base = {
.cra_name = "sha384",
.cra_driver_name = "sha384-generic",
+ .cra_priority = 100,
.cra_flags = CRYPTO_ALG_TYPE_SHASH,
.cra_blocksize = SHA384_BLOCK_SIZE,
.cra_module = THIS_MODULE,