diff options
author | Eric Biggers <ebiggers@google.com> | 2018-06-29 17:01:42 -0700 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-07-09 00:30:20 +0800 |
commit | b73b7ac0a77492b1bd671a72787931847b330c03 (patch) | |
tree | 6819d5c0f0416fc03a93784d905cbdb5e06478ae /crypto | |
parent | 90ef3e4835c33541f2eca0b4276fbc1dd83832d8 (diff) |
crypto: sha256_generic - add cra_priority
sha256-generic and sha224-generic had a cra_priority of 0, so it wasn't
possible to have a lower priority SHA-256 or SHA-224 implementation, as
is desired for sha256_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/sha256_generic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/sha256_generic.c b/crypto/sha256_generic.c index 8f9c47e1a96e..dfcb7beb73a7 100644 --- a/crypto/sha256_generic.c +++ b/crypto/sha256_generic.c @@ -271,6 +271,7 @@ static struct shash_alg sha256_algs[2] = { { .base = { .cra_name = "sha256", .cra_driver_name= "sha256-generic", + .cra_priority = 100, .cra_flags = CRYPTO_ALG_TYPE_SHASH, .cra_blocksize = SHA256_BLOCK_SIZE, .cra_module = THIS_MODULE, @@ -285,6 +286,7 @@ static struct shash_alg sha256_algs[2] = { { .base = { .cra_name = "sha224", .cra_driver_name= "sha224-generic", + .cra_priority = 100, .cra_flags = CRYPTO_ALG_TYPE_SHASH, .cra_blocksize = SHA224_BLOCK_SIZE, .cra_module = THIS_MODULE, |