OSDN Git Service

crypto: sun4i-ss - linearize buffers content must be kept
authorCorentin Labbe <clabbe@baylibre.com>
Mon, 14 Dec 2020 20:02:25 +0000 (20:02 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 2 Jan 2021 21:41:35 +0000 (08:41 +1100)
commit583513510a7acd2306787865bcd19ebb2f629d42
treea2d00f1214acbb3f0520d796570b537fac99fb6b
parent7334a4be50764500d5cae4d9a655f7755dbedd5d
crypto: sun4i-ss - linearize buffers content must be kept

When running the non-optimized cipher function, SS produce partial random
output.
This is due to linearize buffers being reseted after each loop.

For preserving stack, instead of moving them back to start of function,
I move them in sun4i_ss_ctx.

Fixes: 8d3bcb9900ca ("crypto: sun4i-ss - reduce stack usage")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h