crypto: caam - silence .setkey in case of bad key length
In case of bad key length, driver emits "key size mismatch" messages, but only for xts(aes) algorithms. Reduce verbosity by making them visible only when debugging. This way crypto fuzz testing log cleans up a bit. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Родитель
b7ec41da3b
Коммит
da6a66853a
|
@ -832,7 +832,7 @@ static int xts_skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key,
|
|||
u32 *desc;
|
||||
|
||||
if (keylen != 2 * AES_MIN_KEY_SIZE && keylen != 2 * AES_MAX_KEY_SIZE) {
|
||||
dev_err(jrdev, "key size mismatch\n");
|
||||
dev_dbg(jrdev, "key size mismatch\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -728,7 +728,7 @@ static int xts_skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key,
|
|||
int ret = 0;
|
||||
|
||||
if (keylen != 2 * AES_MIN_KEY_SIZE && keylen != 2 * AES_MAX_KEY_SIZE) {
|
||||
dev_err(jrdev, "key size mismatch\n");
|
||||
dev_dbg(jrdev, "key size mismatch\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1058,7 +1058,7 @@ static int xts_skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key,
|
|||
u32 *desc;
|
||||
|
||||
if (keylen != 2 * AES_MIN_KEY_SIZE && keylen != 2 * AES_MAX_KEY_SIZE) {
|
||||
dev_err(dev, "key size mismatch\n");
|
||||
dev_dbg(dev, "key size mismatch\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче