Skip to contentSkip to conversation

fscrypt: use crypto_skcipher_driver_name()

PATCH Applied Eric Biggers 1 participant 2 messages Dec 9, 2019 – Jan 3, 2020 fscrypt: file system level encryption support

lore
Share & tools
lore

Eric Biggers

author maintainer
#0 lore raw

PATCH 1/1 fscrypt: use crypto_skcipher_driver_name()

From: Eric Biggers <[email protected]>

Crypto API users shouldn't really be accessing struct skcipher_alg directly. <crypto/skcipher.h> already has a function crypto_skcipher_driver_name(), so use that instead.

No change in behavior.

---
 fs/crypto/keysetup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/crypto/keysetup.c +1 -2
index f577bb6613f93..c9f4fe955971f 100644
@@ -89,8 +89,7 @@ struct crypto_skcipher *fscrypt_allocate_skcipher(struct fscrypt_mode *mode,
 		 * first time a mode is used.
 		 */
 		pr_info("fscrypt: %s using implementation \"%s\"\n",
-			mode->friendly_name,
-			crypto_skcipher_alg(tfm)->base.cra_driver_name);
+			mode->friendly_name, crypto_skcipher_driver_name(tfm));
 	}
 	crypto_skcipher_set_flags(tfm, CRYPTO_TFM_REQ_FORBID_WEAK_KEYS);
 	err = crypto_skcipher_setkey(tfm, raw_key, mode->keysize);
Signature · 1 line
2.24.0.393.g34dc348eaf-goog
author maintainer Applied
#1 lore raw
Quoted 30 lines · Eric Biggers

From: Eric Biggers <[email protected]>

Crypto API users shouldn't really be accessing struct skcipher_alg directly. <crypto/skcipher.h> already has a function crypto_skcipher_driver_name(), so use that instead.

No change in behavior.

---
 fs/crypto/keysetup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/crypto/keysetup.c +1 -2
index f577bb6613f93..c9f4fe955971f 100644
@@ -89,8 +89,7 @@ struct crypto_skcipher *fscrypt_allocate_skcipher(struct fscrypt_mode *mode,
 		 * first time a mode is used.
 		 */
 		pr_info("fscrypt: %s using implementation \"%s\"\n",
-			mode->friendly_name,
-			crypto_skcipher_alg(tfm)->base.cra_driver_name);
+			mode->friendly_name, crypto_skcipher_driver_name(tfm));
 	}
 	crypto_skcipher_set_flags(tfm, CRYPTO_TFM_REQ_FORBID_WEAK_KEYS);
 	err = crypto_skcipher_setkey(tfm, raw_key, mode->keysize);
Signature · 1 line
2.24.0.393.g34dc348eaf-goog

Applied to fscrypt.git#master for 5.6.

- Eric