encrypted-keys: Print more useful debug info if encryption algo is not available
Subsystems (3)
PATCH v2 1/1 encrypted-keys: Print more useful debug info if encryption algo is not available
It helps to improve a cryptic message "encrypted_key failed to alloc_cipher (-2)". Adding algo name makes it easier to understand what cipher has failed.
--- security/keys/encrypted-keys/encrypted.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
security/keys/encrypted-keys/encrypted.c +2 -2
@@ -84,8 +84,8 @@ static int aes_get_sizes(void) tfm =crypto_alloc_skcipher (blkcipher_alg,0 ,CRYPTO_ALG_ASYNC );if (IS_ERR (tfm)) { -pr_err ("encrypted_key: failed to alloc_cipher (%ld)\n" , -PTR_ERR (tfm)); +pr_err ("encrypted_key: failed to alloc_cipher for %s (%ld)\n" , + blkcipher_alg,PTR_ERR (tfm));return PTR_ERR (tfm); } ivsize =crypto_skcipher_ivsize (tfm);
Signature · 1 line
2.28.0
Jarkko Sakkinen
NAKQuoted 4 lines · Anatol Pomozov
It helps to improve a cryptic message "
encrypted_keyfailed toalloc_cipher(-2)". Adding algo name makes it easier to understand what cipher has failed.Signed-off-by Anatol Pomozov <[email protected]>
NAK, because you are missing David Howells from the CC list.
/Jarkko
Quoted 7 lines · Jarkko Sakkinen
Quoted 4 lines · Anatol Pomozov
It helps to improve a cryptic message "
encrypted_keyfailed toalloc_cipher(-2)". Adding algo name makes it easier to understand what cipher has failed.Signed-off-by Anatol Pomozov <[email protected]>NAK, because you are missing David Howells from the CC list.
Oh and also me. You are essentially missing all the keyring maintainers.
/Jarkko
Hi
Quoted 11 lines · Jarkko Sakkinen
Quoted 7 lines · Jarkko Sakkinen
Quoted 4 lines · Anatol Pomozov
It helps to improve a cryptic message "
encrypted_keyfailed toalloc_cipher(-2)". Adding algo name makes it easier to understand what cipher has failed.Signed-off-by Anatol Pomozov <[email protected]>NAK, because you are missing David Howells from the CC list.
Oh and also me. You are essentially missing all the keyring maintainers.
The MAINTAINERS file states following:
KEYS-ENCRYPTED
M: Mimi Zohar <[email protected]> L: [email protected] L: [email protected] S: Supported F: Documentation/security/keys/trusted-encrypted.rst F: include/keys/encrypted-type.h F: security/keys/encrypted-keys/
Everything seems fine as I included the official maintainer and the project maillist.
If David is not subscribed to the project maillist I'll be glad to CC him as well.
Quoted 27 lines · Anatol Pomozov
Hi
Quoted 11 lines · Jarkko Sakkinen
Quoted 7 lines · Jarkko Sakkinen
Quoted 4 lines · Anatol Pomozov
It helps to improve a cryptic message "
encrypted_keyfailed toalloc_cipher(-2)". Adding algo name makes it easier to understand what cipher has failed.Signed-off-by Anatol Pomozov <[email protected]>NAK, because you are missing David Howells from the CC list.
Oh and also me. You are essentially missing all the keyring maintainers.
The
MAINTAINERSfile states following:KEYS-ENCRYPTED
M: Mimi Zohar <[email protected]> L: [email protected] L: [email protected] S: Supported F: Documentation/security/keys/trusted-encrypted.rst F: include/keys/encrypted-type.h F: security/keys/encrypted-keys/
Quoted 5 lines
Everything seems fine as I included the official maintainer and the project maillist.
If David is not subscribed to the project maillist I'll be glad to CC him as well.
Ugh, you are right then. Those two lists still confuse me thought but that is not your fault.
Based on that I can give my ack because the change looks right still.
Thanks for explaining the situation.
/Jarkko
Mimi Zohar
maintainerQuoted 28 lines · Jarkko Sakkinen
Quoted 27 lines · Anatol Pomozov
Hi
Quoted 11 lines · Jarkko Sakkinen
Quoted 7 lines · Jarkko Sakkinen
Quoted 4 lines · Anatol Pomozov
It helps to improve a cryptic message "
encrypted_keyfailed toalloc_cipher(-2)". Adding algo name makes it easier to understand what cipher has failed.Signed-off-by Anatol Pomozov <[email protected]>NAK, because you are missing David Howells from the CC list.
Oh and also me. You are essentially missing all the keyring maintainers.
The
MAINTAINERSfile states following:KEYS-ENCRYPTED
M: Mimi Zohar <[email protected]> L: [email protected] L: [email protected] S: Supported F: Documentation/security/keys/trusted-encrypted.rst F: include/keys/encrypted-type.h F: security/keys/encrypted-keys/
Quoted 8 lines
Quoted 5 lines
Everything seems fine as I included the official maintainer and the project maillist.
If David is not subscribed to the project maillist I'll be glad to CC him as well.
Ugh, you are right then. Those two lists still confuse me thought but that is not your fault.
Please refer to Documentation/security/keys/trusted-encrypted.rst for an explanation.
Quoted 7 lines
Based on that I can give my ack because the change looks right still.
Acked-by Jarkko Sakkinen <[email protected]>Thanks for explaining the situation.
Thanks, Jarrko. I'm on vacation, returning next week.
Mimi
Quoted 32 lines · Mimi Zohar
Quoted 31 lines · Jarkko Sakkinen
Quoted 30 lines · Anatol Pomozov
Hi
Quoted 11 lines · Jarkko Sakkinen
Quoted 7 lines · Jarkko Sakkinen
Quoted 4 lines · Anatol Pomozov
It helps to improve a cryptic message "
encrypted_keyfailed toalloc_cipher(-2)". Adding algo name makes it easier to understand what cipher has failed.Signed-off-by Anatol Pomozov <[email protected]>NAK, because you are missing David Howells from the CC list.
Oh and also me. You are essentially missing all the keyring maintainers.
The
MAINTAINERSfile states following:KEYS-ENCRYPTED
M: Mimi Zohar <[email protected]> L: [email protected] L: [email protected] S: Supported F: Documentation/security/keys/trusted-encrypted.rst F: include/keys/encrypted-type.h F: security/keys/encrypted-keys/Everything seems fine as I included the official maintainer and the project maillist.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
If David is not subscribed to the project maillist I'll be glad to CC him as well.
Ugh, you are right then. Those two lists still confuse me thought but that is not your fault.
Please refer to
Documentation/security/keys/trusted-encrypted.rstfor an explanation.
Yeah, I was not sure about the organization and just spotted keyrings in the CC list :-)
Quoted 10 lines
Quoted 8 lines
Based on that I can give my ack because the change looks right still.
Acked-by Jarkko Sakkinen <[email protected]>Thanks for explaining the situation.
Thanks, Jarrko. I'm on vacation, returning next week.
Have a good one!
Quoted 1 line
Mimi
/Jarkko
Mimi Zohar
maintainerHi Anatol,
Quoted 4 lines · Anatol Pomozov
It helps to improve a cryptic message "
encrypted_keyfailed toalloc_cipher(-2)". Adding algo name makes it easier to understand what cipher has failed.Signed-off-by Anatol Pomozov <[email protected]>
The "if" clause in the Subject line doesn't belong there, but in the patch description. I would start the patch description with "Improve the cryptic message ... by adding ..."
Quoted 9 lines
--- security/keys/encrypted-keys/encrypted.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)security/keys/encrypted-keys/encrypted.c +0
-0
security/keys/encrypted-keys/encrypted.c static int aes_get_sizes(void) · line 88
Quoted 7 lines
security/keys/encrypted-keys/encrypted.c +2
-2@@ -84,8 +84,8 @@ static int aes_get_sizes(void) tfm =crypto_alloc_skcipher (blkcipher_alg,0 ,CRYPTO_ALG_ASYNC );if (IS_ERR (tfm)) { -pr_err ("encrypted_key: failed to alloc_cipher (%ld)\n" , -PTR_ERR (tfm)); +pr_err ("encrypted_key: failed to alloc_cipher for %s (%ld)\n" , + blkcipher_alg,PTR_ERR (tfm));
I don't have a problem with including the blkcipher_alg in the error
message. It is currently defined as "cbc(aes)". Is it ever anything
else?
thanks,
Mimi
Quoted 3 lines
security/keys/encrypted-keys/encrypted.c +0
-0return PTR_ERR (tfm); } ivsize =crypto_skcipher_ivsize (tfm);