keyrings.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] encrypted-keys: Print more useful debug info if encryption algo is not available
@ 2020-10-05 22:52 Anatol Pomozov
  2020-10-06 15:56 ` Jarkko Sakkinen
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Anatol Pomozov @ 2020-10-05 22:52 UTC (permalink / raw)
  To: keyrings; +Cc: zohar, Anatol Pomozov

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.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
---
 security/keys/encrypted-keys/encrypted.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/encrypted.c
index 192e531c146f..c09d48f53682 100644
--- a/security/keys/encrypted-keys/encrypted.c
+++ b/security/keys/encrypted-keys/encrypted.c
@@ -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);
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-12 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 22:52 [PATCH v2] encrypted-keys: Print more useful debug info if encryption algo is not available Anatol Pomozov
2020-10-06 15:56 ` Jarkko Sakkinen
2020-10-06 15:56 ` Jarkko Sakkinen
2020-10-06 17:18 ` Anatol Pomozov
2020-10-06 23:39 ` Jarkko Sakkinen
2020-10-07  0:33 ` Mimi Zohar
2020-10-07  3:15 ` Jarkko Sakkinen
2020-10-12 20:18 ` Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).