Skip to content

Commit

Permalink
crypto: vmx - Remove overly verbose printk from AES init routines
Browse files Browse the repository at this point in the history
commit 1411b52 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: 8676590 ("crypto: vmx - Adding AES routines for VMX module")
Fixes: 8c755ac ("crypto: vmx - Adding CBC routines for VMX module")
Fixes: 4f7f60d ("crypto: vmx - Adding CTR routines for VMX module")
Fixes: cc333cd ("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>
  • Loading branch information
Michael Ellerman authored and Greg Kroah-Hartman committed Jun 16, 2018
1 parent 05ca7fe commit ef2aa9f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions drivers/crypto/vmx/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions drivers/crypto/vmx/aes_cbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions drivers/crypto/vmx/aes_ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions drivers/crypto/vmx/ghash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef2aa9f

Please sign in to comment.