mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
crypto: aes - Boost priority of encryption modes further
Fix a regression where drivers/crypto/ccp/ (priority 300) and drivers/crypto/padlock-aes.c (priority 400) started being able to override the AES-NI and/or VAES optimized code (previously priority 400-800). Link: https://patch.msgid.link/20260930170542.140403-3-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
This commit is contained in:
parent
c91dcfe66f
commit
f410daa32c
12
crypto/aes.c
12
crypto/aes.c
|
|
@ -611,7 +611,7 @@ static struct skcipher_alg skcipher_algs[] = {
|
|||
.base.cra_name = "ecb(aes)",
|
||||
.base.cra_driver_name = "ecb-aes-lib",
|
||||
.base.cra_priority = (IS_ENABLED(CONFIG_RISCV) ||
|
||||
IS_ENABLED(CONFIG_X86)) ? 300 : 110,
|
||||
IS_ENABLED(CONFIG_X86)) ? 500 : 110,
|
||||
.base.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.base.cra_ctxsize = sizeof(struct aes_key),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
|
|
@ -627,7 +627,7 @@ static struct skcipher_alg skcipher_algs[] = {
|
|||
.base.cra_name = "cbc(aes)",
|
||||
.base.cra_driver_name = "cbc-aes-lib",
|
||||
.base.cra_priority = (IS_ENABLED(CONFIG_RISCV) ||
|
||||
IS_ENABLED(CONFIG_X86)) ? 300 : 110,
|
||||
IS_ENABLED(CONFIG_X86)) ? 500 : 110,
|
||||
.base.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.base.cra_ctxsize = sizeof(struct aes_key),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
|
|
@ -655,7 +655,7 @@ static struct skcipher_alg skcipher_algs[] = {
|
|||
.base.cra_name = "cts(cbc(aes))",
|
||||
.base.cra_driver_name = "cts-cbc-aes-lib",
|
||||
.base.cra_priority = (IS_ENABLED(CONFIG_RISCV) ||
|
||||
IS_ENABLED(CONFIG_X86)) ? 300 : 110,
|
||||
IS_ENABLED(CONFIG_X86)) ? 500 : 110,
|
||||
.base.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.base.cra_ctxsize = sizeof(struct aes_key),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
|
|
@ -672,7 +672,7 @@ static struct skcipher_alg skcipher_algs[] = {
|
|||
.base.cra_name = "ctr(aes)",
|
||||
.base.cra_driver_name = "ctr-aes-lib",
|
||||
.base.cra_priority = (IS_ENABLED(CONFIG_RISCV) ||
|
||||
IS_ENABLED(CONFIG_X86)) ? 300 : 110,
|
||||
IS_ENABLED(CONFIG_X86)) ? 500 : 110,
|
||||
.base.cra_blocksize = 1,
|
||||
.base.cra_ctxsize = sizeof(struct aes_enckey),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
|
|
@ -689,7 +689,7 @@ static struct skcipher_alg skcipher_algs[] = {
|
|||
{
|
||||
.base.cra_name = "xctr(aes)",
|
||||
.base.cra_driver_name = "xctr-aes-lib",
|
||||
.base.cra_priority = IS_ENABLED(CONFIG_X86) ? 300 : 110,
|
||||
.base.cra_priority = IS_ENABLED(CONFIG_X86) ? 500 : 110,
|
||||
.base.cra_blocksize = 1,
|
||||
.base.cra_ctxsize = sizeof(struct aes_enckey),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
|
|
@ -713,7 +713,7 @@ static struct skcipher_alg skcipher_algs[] = {
|
|||
.base.cra_name = "xts(aes)",
|
||||
.base.cra_driver_name = "xts-aes-lib",
|
||||
.base.cra_priority = (IS_ENABLED(CONFIG_RISCV) ||
|
||||
IS_ENABLED(CONFIG_X86)) ? 300 : 110,
|
||||
IS_ENABLED(CONFIG_X86)) ? 500 : 110,
|
||||
.base.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.base.cra_ctxsize = sizeof(struct aes_xts_key),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user