crypto: sun8i-ss - rework handling of IV
authorCorentin Labbe <clabbe@baylibre.com>
Mon, 2 May 2022 20:19:14 +0000 (20:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:11 +0000 (10:23 +0200)
commitbbfc612ac579dee355b212e492b22ce273dfa4a7
treebf9a6b6708d3f0827bbf0b6432d9e9f17e27a00f
parent18ca0d55e8639b911df8aae1b47598b13f9acded
crypto: sun8i-ss - rework handling of IV

[ Upstream commit 359e893e8af456be2fefabe851716237df289cbf ]

sun8i-ss fail handling IVs when doing decryption of multiple SGs in-place.
It should backup the last block of each SG source for using it later as
IVs.
In the same time remove allocation on requests path for storing all
IVs.

Fixes: f08fcced6d00 ("crypto: allwinner - Add sun8i-ss cryptographic offloader")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h