crypto: vmx - Remove overly verbose printk from AES init routines
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 May 2018 12:29:29 +0000 (22:29 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Jun 2018 07:52:35 +0000 (09:52 +0200)
commit 1411b5218adbcf1d45ddb260db5553c52e8d917c upstream.

In the vmx AES init routines we do a printk(KERN_INFO ...) to report
the fallback implementation we're using.

However with a slow console this can significantly affect the speed of
crypto operations. Using 'cryptsetup benchmark' the removal of the
printk() leads to a ~5x speedup for aes-cbc decryption.

So remove them.

Fixes: 8676590a1593 ("crypto: vmx - Adding AES routines for VMX module")
Fixes: 8c755ace357c ("crypto: vmx - Adding CBC routines for VMX module")
Fixes: 4f7f60d312b3 ("crypto: vmx - Adding CTR routines for VMX module")
Fixes: cc333cd68dfa ("crypto: vmx - Adding GHASH routines for VMX module")
Cc: stable@vger.kernel.org # v4.1+
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/vmx/aes.c
drivers/crypto/vmx/aes_cbc.c
drivers/crypto/vmx/aes_ctr.c
drivers/crypto/vmx/ghash.c

index 022c7ab7351a08c4f6afdff324e0b51eb1214bb1..b0cd5aff3822f56bad6a623a55e408fd402a03bd 100644 (file)
@@ -53,8 +53,6 @@ static int p8_aes_init(struct crypto_tfm *tfm)
                       alg, PTR_ERR(fallback));
                return PTR_ERR(fallback);
        }
-       printk(KERN_INFO "Using '%s' as fallback implementation.\n",
-              crypto_tfm_alg_driver_name((struct crypto_tfm *) fallback));
 
        crypto_cipher_set_flags(fallback,
                                crypto_cipher_get_flags((struct
index 94ad5c0adbcbd3002e4813d70b100459cfa1ec57..46131701c3789d4e3e02fc0642c76301a0a8d4e9 100644 (file)
@@ -55,8 +55,6 @@ static int p8_aes_cbc_init(struct crypto_tfm *tfm)
                       alg, PTR_ERR(fallback));
                return PTR_ERR(fallback);
        }
-       printk(KERN_INFO "Using '%s' as fallback implementation.\n",
-              crypto_tfm_alg_driver_name((struct crypto_tfm *) fallback));
 
        crypto_blkcipher_set_flags(
                fallback,
index 7cf6d31c1123a117d55dc3de87ed543a3c6279a6..6ef7548c5c877f3cd47cd0666026f28243140a68 100644 (file)
@@ -53,8 +53,6 @@ static int p8_aes_ctr_init(struct crypto_tfm *tfm)
                       alg, PTR_ERR(fallback));
                return PTR_ERR(fallback);
        }
-       printk(KERN_INFO "Using '%s' as fallback implementation.\n",
-              crypto_tfm_alg_driver_name((struct crypto_tfm *) fallback));
 
        crypto_blkcipher_set_flags(
                fallback,
index 27a94a11900926d9614d5a747f7e95d07f21afb1..1c4b5b889fbacf181c074baf21d7ae0d65d64c3e 100644 (file)
@@ -64,8 +64,6 @@ static int p8_ghash_init_tfm(struct crypto_tfm *tfm)
                       alg, PTR_ERR(fallback));
                return PTR_ERR(fallback);
        }
-       printk(KERN_INFO "Using '%s' as fallback implementation.\n",
-              crypto_tfm_alg_driver_name(crypto_shash_tfm(fallback)));
 
        crypto_shash_set_flags(fallback,
                               crypto_shash_get_flags((struct crypto_shash