linux/arch/arm64
Mikulas Patocka f960d2093f crypto: arm64-aes - fix encryption of unaligned data
cryptsetup fails on arm64 when using kernel encryption via AF_ALG socket.
See https://bugzilla.redhat.com/show_bug.cgi?id=1122937

The bug is caused by incorrect handling of unaligned data in
arch/arm64/crypto/aes-glue.c. Cryptsetup creates a buffer that is aligned
on 8 bytes, but not on 16 bytes. It opens AF_ALG socket and uses the
socket to encrypt data in the buffer. The arm64 crypto accelerator causes
data corruption or crashes in the scatterwalk_pagedone.

This patch fixes the bug by passing the residue bytes that were not
processed as the last parameter to blkcipher_walk_done.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2014-07-28 22:01:02 +08:00
..
boot arm64: add APM X-Gene SoC RTC DTS entry 2014-06-06 16:08:06 -07:00
configs arm64: defconfig: enable a few more common/useful options in defconfig 2014-05-22 16:07:13 +01:00
crypto crypto: arm64-aes - fix encryption of unaligned data 2014-07-28 22:01:02 +08:00
include - Optimised assembly string/memory routines (based on the AArch64 Cortex 2014-06-06 10:43:28 -07:00
kernel - Optimised assembly string/memory routines (based on the AArch64 Cortex 2014-06-06 10:43:28 -07:00
kvm - Optimised assembly string/memory routines (based on the AArch64 Cortex 2014-06-06 10:43:28 -07:00
lib arm64: lib: Implement optimized string length routines 2014-05-23 15:17:12 +01:00
mm - Optimised assembly string/memory routines (based on the AArch64 Cortex 2014-06-06 10:43:28 -07:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig - Optimised assembly string/memory routines (based on the AArch64 Cortex 2014-06-06 10:43:28 -07:00
Kconfig.debug arm64: remove arch specific earlyprintk 2014-04-24 16:32:27 -07:00
Makefile arm64/crypto: SHA-1 using ARMv8 Crypto Extensions 2014-05-14 10:03:17 -07:00