crypto: arm64/sha256 - increase cra_priority of scalar implementations
Subsystems (2)
PATCH 1/1 crypto: arm64/sha256 - increase cra_priority of scalar implementations
From: Eric Biggers <[email protected]>
Commit b73b7ac0a774 ("crypto: sha256_generic - add cra_priority") gave sha256-generic and sha224-generic a cra_priority of 100, to match the convention for generic implementations. But sha256-arm64 and sha224-arm64 also have priority 100, so their order relative to the generic implementations became ambiguous.
Therefore, increase their priority to 125 so that they have higher priority than the generic implementations but lower priority than the NEON implementations which have priority 150.
--- arch/arm64/crypto/sha256-glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/crypto/sha256-glue.c +2 -2
@@ -67,7 +67,7 @@ static struct shash_alg algs[] = { { .descsize = sizeof(struct sha256_state), .base.cra_name = "sha256", .base.cra_driver_name = "sha256-arm64", - .base.cra_priority = 100, + .base.cra_priority = 125, .base.cra_blocksize = SHA256_BLOCK_SIZE, .base.cra_module = THIS_MODULE, }, {
@@ -79,7 +79,7 @@ static struct shash_alg algs[] = { { .descsize = sizeof(struct sha256_state), .base.cra_name = "sha224", .base.cra_driver_name = "sha224-arm64", - .base.cra_priority = 100, + .base.cra_priority = 125, .base.cra_blocksize = SHA224_BLOCK_SIZE, .base.cra_module = THIS_MODULE, } };
Signature · 1 line
2.18.0.203.gfac676dfb9-goog
Herbert Xu
maintainerPATCH 1/1 crypto: arm64/sha256 - increase cra_priority of scalar implementations
Quoted 8 lines · Eric Biggers
From: Eric Biggers <[email protected]>
Commit
b73b7ac0a774("crypto:sha256_generic- addcra_priority") gave sha256-generic and sha224-generic acra_priorityof 100, to match the convention for generic implementations. But sha256-arm64 and sha224-arm64 also have priority 100, so their order relative to the generic implementations became ambiguous.
Quoted 5 lines
Therefore, increase their priority to 125 so that they have higher priority than the generic implementations but lower priority than the NEON implementations which have priority 150.
Signed-off-by Eric Biggers <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt