OSDN Git Service

crypto: arch/nhpoly1305 - process in explicit 4k chunks
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 22 Apr 2020 23:18:54 +0000 (17:18 -0600)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 30 Apr 2020 05:16:59 +0000 (15:16 +1000)
commita9a8ba90fa5857c2c8a0e32eef2159cec717da11
tree998a6b4608c7bb74f0f0b57e2615a8c9ffb6d532
parent706024a52c614b478b63f7728d202532ce6591a9
crypto: arch/nhpoly1305 - process in explicit 4k chunks

Rather than chunking via PAGE_SIZE, this commit changes the arch
implementations to chunk in explicit 4k parts, so that calculations on
maximum acceptable latency don't suddenly become invalid on platforms
where PAGE_SIZE isn't 4k, such as arm64.

Fixes: 0f961f9f670e ("crypto: x86/nhpoly1305 - add AVX2 accelerated NHPoly1305")
Fixes: 012c82388c03 ("crypto: x86/nhpoly1305 - add SSE2 accelerated NHPoly1305")
Fixes: a00fa0c88774 ("crypto: arm64/nhpoly1305 - add NEON-accelerated NHPoly1305")
Fixes: 16aae3595a9d ("crypto: arm/nhpoly1305 - add NEON-accelerated NHPoly1305")
Cc: stable@vger.kernel.org
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/crypto/nhpoly1305-neon-glue.c
arch/arm64/crypto/nhpoly1305-neon-glue.c
arch/x86/crypto/nhpoly1305-avx2-glue.c
arch/x86/crypto/nhpoly1305-sse2-glue.c