Skip to contentSkip to conversation

crypto: Fix aesni algorithm implementation without test

PATCH In review Youquan,Song 2 participants 2 messages Nov 25, 2009 – Nov 26, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: Fix aesni algorithm implementation without test

when load aesni-intel driver,kernel will report no test for some algorithm with AES-NI. The strange information as following:

alg: No test for __aes-aesni (__driver-aes-aesni)
alg: No test for __ecb-aes-aesni (__driver-ecb-aes-aesni)
alg: No test for __cbc-aes-aesni (__driver-cbc-aes-aesni)
alg: No test for __ecb-aes-aesni (cryptd(__driver-ecb-aes-aesni)

crypto_alg's cra_name is use to descript algorithm itself, do not care the concrete implement. So this patch unify them and also can fix the algorithm implementation without test.

---

arch/x86/crypto/aesni-intel_glue.c +3 -3
index 585edeb..455bbf3 100644
@@ -161,7 +161,7 @@ static void __aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
 }
 
 static struct crypto_alg __aesni_alg = {
-	.cra_name		= "__aes-aesni",
+	.cra_name		= "aes",
 	.cra_driver_name	= "__driver-aes-aesni",
 	.cra_priority		= 0,
 	.cra_flags		= CRYPTO_ALG_TYPE_CIPHER,
@@ -230,7 +230,7 @@ static int ecb_decrypt(struct blkcipher_desc *desc,
 }
 
 static struct crypto_alg blk_ecb_alg = {
-	.cra_name		= "__ecb-aes-aesni",
+	.cra_name		= "ecb(aes)",
 	.cra_driver_name	= "__driver-ecb-aes-aesni",
 	.cra_priority		= 0,
 	.cra_flags		= CRYPTO_ALG_TYPE_BLKCIPHER,
@@ -300,7 +300,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc,
 }
 
 static struct crypto_alg blk_cbc_alg = {
-	.cra_name		= "__cbc-aes-aesni",
+	.cra_name		= "cbc(aes)",
 	.cra_driver_name	= "__driver-cbc-aes-aesni",
 	.cra_priority		= 0,
 	.cra_flags		= CRYPTO_ALG_TYPE_BLKCIPHER,
maintainer
#1 lore raw
Quoted 8 lines · Youquan,Song

when load aesni-intel driver,kernel will report no test for some algorithm with AES-NI. The strange information as following:

alg: No test for __aes-aesni (__driver-aes-aesni)
alg: No test for __ecb-aes-aesni (__driver-ecb-aes-aesni)
alg: No test for __cbc-aes-aesni (__driver-cbc-aes-aesni)
alg: No test for __ecb-aes-aesni (cryptd(__driver-ecb-aes-aesni)

Quoted 5 lines

crypto_alg's cra_name is use to descript algorithm itself, do not care the concrete implement. So this patch unify them and also can fix the algorithm implementation without test.

No this is bogus. The algorithm name is specifically set to these values because they're not meant to be used directly by anyone other than aesni.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt