linux-sg2042/arch/arm64/crypto
Ard Biesheuvel c2b24c36e0 crypto: arm64/aes-gcm-ce - fix scatterwalk API violation
Commit 71e52c278c ("crypto: arm64/aes-ce-gcm - operate on
two input blocks at a time") modified the granularity at which
the AES/GCM code processes its input to allow subsequent changes
to be applied that improve performance by using aggregation to
process multiple input blocks at once.

For this reason, it doubled the algorithm's 'chunksize' property
to 2 x AES_BLOCK_SIZE, but retained the non-SIMD fallback path that
processes a single block at a time. In some cases, this violates the
skcipher scatterwalk API, by calling skcipher_walk_done() with a
non-zero residue value for a chunk that is expected to be handled
in its entirety. This results in a WARN_ON() to be hit by the TLS
self test code, but is likely to break other user cases as well.
Unfortunately, none of the current test cases exercises this exact
code path at the moment.

Fixes: 71e52c278c ("crypto: arm64/aes-ce-gcm - operate on two ...")
Reported-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-08-25 19:50:43 +08:00
..
.gitignore crypto: arm64/sha2 - add generated .S files to .gitignore 2016-11-29 16:06:56 +08:00
Kconfig crypto: arm64 - add support for SM4 encryption using special instructions 2018-05-05 14:52:53 +08:00
Makefile crypto: arm64 - add support for SM4 encryption using special instructions 2018-05-05 14:52:53 +08:00
aes-ce-ccm-core.S crypto: arm64 - revert NEON yield for fast AEAD implementations 2018-08-07 17:26:23 +08:00
aes-ce-ccm-glue.c crypto: arm64/aes-ce-ccm - move kernel mode neon en/disable into loop 2018-03-16 23:35:54 +08:00
aes-ce-core.S crypto: arm64/aes-ce-cipher - move assembler code to .S file 2017-11-29 17:33:30 +11:00
aes-ce-glue.c crypto: arm64/aes-ce-cipher - move assembler code to .S file 2017-11-29 17:33:30 +11:00
aes-ce-setkey.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aes-ce.S crypto: arm64/aes-blk - yield NEON after every block of input 2018-05-12 00:13:08 +08:00
aes-cipher-core.S crypto: arm64/aes-cipher - move S-box to .rodata section 2018-01-18 23:00:30 +11:00
aes-cipher-glue.c crypto: arm64/aes - add scalar implementation 2017-01-13 00:26:49 +08:00
aes-ctr-fallback.h crypto: arm64/aes-blk - add a non-SIMD fallback for synchronous CTR 2017-08-04 09:27:21 +08:00
aes-glue.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2018-08-03 17:55:12 +08:00
aes-modes.S crypto: arm64/aes-blk - yield NEON after every block of input 2018-05-12 00:13:08 +08:00
aes-neon.S crypto: arm64/aes-neon - move literal data to .rodata section 2018-01-18 23:00:30 +11:00
aes-neonbs-core.S crypto: arm64/aes-bs - yield NEON after every block of input 2018-05-12 00:13:09 +08:00
aes-neonbs-glue.c crypto: arm64/aes-bs - move kernel mode neon en/disable into loop 2018-03-16 23:35:55 +08:00
chacha20-neon-core.S crypto: arm64/chacha20 - implement NEON version based on SSE3 code 2017-01-13 00:26:48 +08:00
chacha20-neon-glue.c crypto: arm64/chacha20 - move kernel mode neon en/disable into loop 2018-03-16 23:35:55 +08:00
crc32-ce-core.S crypto: arm64/crc32-ce - yield NEON after every block of input 2018-05-12 00:13:10 +08:00
crc32-ce-glue.c crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
crct10dif-ce-core.S crypto: arm64/crct10dif-ce - yield NEON after every block of input 2018-05-12 00:13:11 +08:00
crct10dif-ce-glue.c crypto: arm64/crct10dif - add non-SIMD generic fallback 2017-08-04 09:27:16 +08:00
ghash-ce-core.S crypto: arm64/ghash-ce - implement 4-way aggregation 2018-08-07 17:51:40 +08:00
ghash-ce-glue.c crypto: arm64/aes-gcm-ce - fix scatterwalk API violation 2018-08-25 19:50:43 +08:00
sha1-ce-core.S crypto: arm64/sha1-ce - yield NEON after every block of input 2018-05-12 00:13:05 +08:00
sha1-ce-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha2-ce-core.S crypto: arm64/sha2-ce - yield NEON after every block of input 2018-05-12 00:13:06 +08:00
sha2-ce-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha3-ce-core.S crypto: arm64/sha3-ce - yield NEON after every block of input 2018-05-12 00:13:11 +08:00
sha3-ce-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha256-core.S_shipped crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
sha256-glue.c crypto: arm64/sha256 - increase cra_priority of scalar implementations 2018-07-27 19:16:38 +08:00
sha512-armv8.pl crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
sha512-ce-core.S crypto: arm64/sha512-ce - yield NEON after every block of input 2018-05-12 00:13:12 +08:00
sha512-ce-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha512-core.S_shipped crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
sha512-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sm3-ce-core.S crypto: arm64/sm3 - new v8.2 Crypto Extensions implementation 2018-01-26 01:10:35 +11:00
sm3-ce-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sm4-ce-core.S crypto: arm64 - add support for SM4 encryption using special instructions 2018-05-05 14:52:53 +08:00
sm4-ce-glue.c crypto: arm64/sm4-ce - check for the right CPU feature bit 2018-08-25 19:50:41 +08:00
speck-neon-core.S crypto: arm64/speck - add NEON-accelerated implementation of Speck-XTS 2018-03-16 23:35:41 +08:00
speck-neon-glue.c crypto: arm64/speck - add NEON-accelerated implementation of Speck-XTS 2018-03-16 23:35:41 +08:00