]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.17.2/crypto-vmx-remove-overly-verbose-printk-from-aes-init-routines.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.17.2 / crypto-vmx-remove-overly-verbose-printk-from-aes-init-routines.patch
1 From 1411b5218adbcf1d45ddb260db5553c52e8d917c Mon Sep 17 00:00:00 2001
2 From: Michael Ellerman <mpe@ellerman.id.au>
3 Date: Thu, 3 May 2018 22:29:29 +1000
4 Subject: crypto: vmx - Remove overly verbose printk from AES init routines
5
6 From: Michael Ellerman <mpe@ellerman.id.au>
7
8 commit 1411b5218adbcf1d45ddb260db5553c52e8d917c upstream.
9
10 In the vmx AES init routines we do a printk(KERN_INFO ...) to report
11 the fallback implementation we're using.
12
13 However with a slow console this can significantly affect the speed of
14 crypto operations. Using 'cryptsetup benchmark' the removal of the
15 printk() leads to a ~5x speedup for aes-cbc decryption.
16
17 So remove them.
18
19 Fixes: 8676590a1593 ("crypto: vmx - Adding AES routines for VMX module")
20 Fixes: 8c755ace357c ("crypto: vmx - Adding CBC routines for VMX module")
21 Fixes: 4f7f60d312b3 ("crypto: vmx - Adding CTR routines for VMX module")
22 Fixes: cc333cd68dfa ("crypto: vmx - Adding GHASH routines for VMX module")
23 Cc: stable@vger.kernel.org # v4.1+
24 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
25 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27
28 ---
29 drivers/crypto/vmx/aes.c | 2 --
30 drivers/crypto/vmx/aes_cbc.c | 3 ---
31 drivers/crypto/vmx/aes_ctr.c | 2 --
32 drivers/crypto/vmx/ghash.c | 2 --
33 4 files changed, 9 deletions(-)
34
35 --- a/drivers/crypto/vmx/aes.c
36 +++ b/drivers/crypto/vmx/aes.c
37 @@ -48,8 +48,6 @@ static int p8_aes_init(struct crypto_tfm
38 alg, PTR_ERR(fallback));
39 return PTR_ERR(fallback);
40 }
41 - printk(KERN_INFO "Using '%s' as fallback implementation.\n",
42 - crypto_tfm_alg_driver_name((struct crypto_tfm *) fallback));
43
44 crypto_cipher_set_flags(fallback,
45 crypto_cipher_get_flags((struct
46 --- a/drivers/crypto/vmx/aes_cbc.c
47 +++ b/drivers/crypto/vmx/aes_cbc.c
48 @@ -52,9 +52,6 @@ static int p8_aes_cbc_init(struct crypto
49 alg, PTR_ERR(fallback));
50 return PTR_ERR(fallback);
51 }
52 - printk(KERN_INFO "Using '%s' as fallback implementation.\n",
53 - crypto_skcipher_driver_name(fallback));
54 -
55
56 crypto_skcipher_set_flags(
57 fallback,
58 --- a/drivers/crypto/vmx/aes_ctr.c
59 +++ b/drivers/crypto/vmx/aes_ctr.c
60 @@ -50,8 +50,6 @@ static int p8_aes_ctr_init(struct crypto
61 alg, PTR_ERR(fallback));
62 return PTR_ERR(fallback);
63 }
64 - printk(KERN_INFO "Using '%s' as fallback implementation.\n",
65 - crypto_skcipher_driver_name(fallback));
66
67 crypto_skcipher_set_flags(
68 fallback,
69 --- a/drivers/crypto/vmx/ghash.c
70 +++ b/drivers/crypto/vmx/ghash.c
71 @@ -64,8 +64,6 @@ static int p8_ghash_init_tfm(struct cryp
72 alg, PTR_ERR(fallback));
73 return PTR_ERR(fallback);
74 }
75 - printk(KERN_INFO "Using '%s' as fallback implementation.\n",
76 - crypto_tfm_alg_driver_name(crypto_shash_tfm(fallback)));
77
78 crypto_shash_set_flags(fallback,
79 crypto_shash_get_flags((struct crypto_shash