diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/crypto/aesni-intel_asm.S | 5 | ||||
| -rw-r--r-- | arch/x86/crypto/aesni-intel_glue.c | 4 | ||||
| -rw-r--r-- | arch/x86/crypto/fpu.c | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S index caba99601703..eb0566e83319 100644 --- a/arch/x86/crypto/aesni-intel_asm.S +++ b/arch/x86/crypto/aesni-intel_asm.S | |||
| @@ -845,7 +845,7 @@ ENTRY(aesni_cbc_enc) | |||
| 845 | */ | 845 | */ |
| 846 | ENTRY(aesni_cbc_dec) | 846 | ENTRY(aesni_cbc_dec) |
| 847 | cmp $16, LEN | 847 | cmp $16, LEN |
| 848 | jb .Lcbc_dec_ret | 848 | jb .Lcbc_dec_just_ret |
| 849 | mov 480(KEYP), KLEN | 849 | mov 480(KEYP), KLEN |
| 850 | add $240, KEYP | 850 | add $240, KEYP |
| 851 | movups (IVP), IV | 851 | movups (IVP), IV |
| @@ -891,6 +891,7 @@ ENTRY(aesni_cbc_dec) | |||
| 891 | add $16, OUTP | 891 | add $16, OUTP |
| 892 | cmp $16, LEN | 892 | cmp $16, LEN |
| 893 | jge .Lcbc_dec_loop1 | 893 | jge .Lcbc_dec_loop1 |
| 894 | movups IV, (IVP) | ||
| 895 | .Lcbc_dec_ret: | 894 | .Lcbc_dec_ret: |
| 895 | movups IV, (IVP) | ||
| 896 | .Lcbc_dec_just_ret: | ||
| 896 | ret | 897 | ret |
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 4e663398f77f..c580c5ec1cad 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
| @@ -198,6 +198,7 @@ static int ecb_encrypt(struct blkcipher_desc *desc, | |||
| 198 | 198 | ||
| 199 | blkcipher_walk_init(&walk, dst, src, nbytes); | 199 | blkcipher_walk_init(&walk, dst, src, nbytes); |
| 200 | err = blkcipher_walk_virt(desc, &walk); | 200 | err = blkcipher_walk_virt(desc, &walk); |
| 201 | desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; | ||
| 201 | 202 | ||
| 202 | kernel_fpu_begin(); | 203 | kernel_fpu_begin(); |
| 203 | while ((nbytes = walk.nbytes)) { | 204 | while ((nbytes = walk.nbytes)) { |
| @@ -221,6 +222,7 @@ static int ecb_decrypt(struct blkcipher_desc *desc, | |||
| 221 | 222 | ||
| 222 | blkcipher_walk_init(&walk, dst, src, nbytes); | 223 | blkcipher_walk_init(&walk, dst, src, nbytes); |
| 223 | err = blkcipher_walk_virt(desc, &walk); | 224 | err = blkcipher_walk_virt(desc, &walk); |
| 225 | desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; | ||
| 224 | 226 | ||
| 225 | kernel_fpu_begin(); | 227 | kernel_fpu_begin(); |
| 226 | while ((nbytes = walk.nbytes)) { | 228 | while ((nbytes = walk.nbytes)) { |
| @@ -266,6 +268,7 @@ static int cbc_encrypt(struct blkcipher_desc *desc, | |||
| 266 | 268 | ||
| 267 | blkcipher_walk_init(&walk, dst, src, nbytes); | 269 | blkcipher_walk_init(&walk, dst, src, nbytes); |
| 268 | err = blkcipher_walk_virt(desc, &walk); | 270 | err = blkcipher_walk_virt(desc, &walk); |
| 271 | desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; | ||
| 269 | 272 | ||
| 270 | kernel_fpu_begin(); | 273 | kernel_fpu_begin(); |
| 271 | while ((nbytes = walk.nbytes)) { | 274 | while ((nbytes = walk.nbytes)) { |
| @@ -289,6 +292,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc, | |||
| 289 | 292 | ||
| 290 | blkcipher_walk_init(&walk, dst, src, nbytes); | 293 | blkcipher_walk_init(&walk, dst, src, nbytes); |
| 291 | err = blkcipher_walk_virt(desc, &walk); | 294 | err = blkcipher_walk_virt(desc, &walk); |
| 295 | desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; | ||
| 292 | 296 | ||
| 293 | kernel_fpu_begin(); | 297 | kernel_fpu_begin(); |
| 294 | while ((nbytes = walk.nbytes)) { | 298 | while ((nbytes = walk.nbytes)) { |
diff --git a/arch/x86/crypto/fpu.c b/arch/x86/crypto/fpu.c index 5f9781a3815f..daef6cd2b45d 100644 --- a/arch/x86/crypto/fpu.c +++ b/arch/x86/crypto/fpu.c | |||
| @@ -48,7 +48,7 @@ static int crypto_fpu_encrypt(struct blkcipher_desc *desc_in, | |||
| 48 | struct blkcipher_desc desc = { | 48 | struct blkcipher_desc desc = { |
| 49 | .tfm = child, | 49 | .tfm = child, |
| 50 | .info = desc_in->info, | 50 | .info = desc_in->info, |
| 51 | .flags = desc_in->flags, | 51 | .flags = desc_in->flags & ~CRYPTO_TFM_REQ_MAY_SLEEP, |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | kernel_fpu_begin(); | 54 | kernel_fpu_begin(); |
| @@ -67,7 +67,7 @@ static int crypto_fpu_decrypt(struct blkcipher_desc *desc_in, | |||
| 67 | struct blkcipher_desc desc = { | 67 | struct blkcipher_desc desc = { |
| 68 | .tfm = child, | 68 | .tfm = child, |
| 69 | .info = desc_in->info, | 69 | .info = desc_in->info, |
| 70 | .flags = desc_in->flags, | 70 | .flags = desc_in->flags & ~CRYPTO_TFM_REQ_MAY_SLEEP, |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | kernel_fpu_begin(); | 73 | kernel_fpu_begin(); |
