summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2022-05-02 20:19:13 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2022-05-13 17:24:17 +0800
commit22d03a0aad0ecf5ab871a83493f593e2127961a1 (patch)
treed98e1c6cd196921f65f7c14f43ec38f034e52df5 /drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h
parent22f7c2f8cfdac70a4414b66ce6ffa270fcd15aa7 (diff)
downloadlinux-stable-22d03a0aad0ecf5ab871a83493f593e2127961a1.tar.gz
linux-stable-22d03a0aad0ecf5ab871a83493f593e2127961a1.tar.bz2
linux-stable-22d03a0aad0ecf5ab871a83493f593e2127961a1.zip
crypto: sun4i-ss - do not allocate backup IV on requests
Instead of allocate memory on each requests, it is easier to pre-allocate buffer for backup IV. This made error path easier. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h')
-rw-r--r--drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h
index 0fee6f4e2d90..ba59c7a48825 100644
--- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h
+++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h
@@ -183,6 +183,7 @@ struct sun4i_tfm_ctx {
struct sun4i_cipher_req_ctx {
u32 mode;
+ u8 backup_iv[AES_BLOCK_SIZE];
struct skcipher_request fallback_req; // keep at the end
};