Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 175a1da8 authored by Eric Biggers's avatar Eric Biggers
Browse files

ANDROID: arm: crypto: reduce priority of bit-sliced AES cipher



All the aes-bs (bit-sliced) and aes-ce (cryptographic extensions)
algorithms had a priority of 300.  This is undesirable because it means
an aes-bs algorithm may be used when an aes-ce algorithm is available.
The aes-ce algorithms have much better performance.

Fix it by decreasing the priority of the aes-bs algorithms to 250.

This was fixed upstream by commit cc477bf64573 ("crypto: arm/aes -
replace bit-sliced OpenSSL NEON code"), but it was just a small part of
a complete rewrite.  This patch just fixes the priority bug.

Change-Id: I478d67bfd77cb3807853b00976aae8496bb7f5ae
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
parent 00969754
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -354,7 +354,7 @@ static struct crypto_alg aesbs_algs[] = { {
}, {
	.cra_name		= "cbc(aes)",
	.cra_driver_name	= "cbc-aes-neonbs",
	.cra_priority		= 300,
	.cra_priority		= 250,
	.cra_flags		= CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
	.cra_blocksize		= AES_BLOCK_SIZE,
	.cra_ctxsize		= sizeof(struct async_helper_ctx),
@@ -374,7 +374,7 @@ static struct crypto_alg aesbs_algs[] = { {
}, {
	.cra_name		= "ctr(aes)",
	.cra_driver_name	= "ctr-aes-neonbs",
	.cra_priority		= 300,
	.cra_priority		= 250,
	.cra_flags		= CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
	.cra_blocksize		= 1,
	.cra_ctxsize		= sizeof(struct async_helper_ctx),
@@ -394,7 +394,7 @@ static struct crypto_alg aesbs_algs[] = { {
}, {
	.cra_name		= "xts(aes)",
	.cra_driver_name	= "xts-aes-neonbs",
	.cra_priority		= 300,
	.cra_priority		= 250,
	.cra_flags		= CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
	.cra_blocksize		= AES_BLOCK_SIZE,
	.cra_ctxsize		= sizeof(struct async_helper_ctx),