diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/crypto/aesbs-glue.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/crypto/aesbs-glue.c b/arch/arm/crypto/aesbs-glue.c index 4522366da759..15468fbbdea3 100644 --- a/arch/arm/crypto/aesbs-glue.c +++ b/arch/arm/crypto/aesbs-glue.c | |||
@@ -137,7 +137,7 @@ static int aesbs_cbc_encrypt(struct blkcipher_desc *desc, | |||
137 | dst += AES_BLOCK_SIZE; | 137 | dst += AES_BLOCK_SIZE; |
138 | } while (--blocks); | 138 | } while (--blocks); |
139 | } | 139 | } |
140 | err = blkcipher_walk_done(desc, &walk, 0); | 140 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
141 | } | 141 | } |
142 | return err; | 142 | return err; |
143 | } | 143 | } |
@@ -158,7 +158,7 @@ static int aesbs_cbc_decrypt(struct blkcipher_desc *desc, | |||
158 | bsaes_cbc_encrypt(walk.src.virt.addr, walk.dst.virt.addr, | 158 | bsaes_cbc_encrypt(walk.src.virt.addr, walk.dst.virt.addr, |
159 | walk.nbytes, &ctx->dec, walk.iv); | 159 | walk.nbytes, &ctx->dec, walk.iv); |
160 | kernel_neon_end(); | 160 | kernel_neon_end(); |
161 | err = blkcipher_walk_done(desc, &walk, 0); | 161 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
162 | } | 162 | } |
163 | while (walk.nbytes) { | 163 | while (walk.nbytes) { |
164 | u32 blocks = walk.nbytes / AES_BLOCK_SIZE; | 164 | u32 blocks = walk.nbytes / AES_BLOCK_SIZE; |
@@ -182,7 +182,7 @@ static int aesbs_cbc_decrypt(struct blkcipher_desc *desc, | |||
182 | dst += AES_BLOCK_SIZE; | 182 | dst += AES_BLOCK_SIZE; |
183 | src += AES_BLOCK_SIZE; | 183 | src += AES_BLOCK_SIZE; |
184 | } while (--blocks); | 184 | } while (--blocks); |
185 | err = blkcipher_walk_done(desc, &walk, 0); | 185 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
186 | } | 186 | } |
187 | return err; | 187 | return err; |
188 | } | 188 | } |
@@ -268,7 +268,7 @@ static int aesbs_xts_encrypt(struct blkcipher_desc *desc, | |||
268 | bsaes_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr, | 268 | bsaes_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr, |
269 | walk.nbytes, &ctx->enc, walk.iv); | 269 | walk.nbytes, &ctx->enc, walk.iv); |
270 | kernel_neon_end(); | 270 | kernel_neon_end(); |
271 | err = blkcipher_walk_done(desc, &walk, 0); | 271 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
272 | } | 272 | } |
273 | return err; | 273 | return err; |
274 | } | 274 | } |
@@ -292,7 +292,7 @@ static int aesbs_xts_decrypt(struct blkcipher_desc *desc, | |||
292 | bsaes_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr, | 292 | bsaes_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr, |
293 | walk.nbytes, &ctx->dec, walk.iv); | 293 | walk.nbytes, &ctx->dec, walk.iv); |
294 | kernel_neon_end(); | 294 | kernel_neon_end(); |
295 | err = blkcipher_walk_done(desc, &walk, 0); | 295 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
296 | } | 296 | } |
297 | return err; | 297 | return err; |
298 | } | 298 | } |