summaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2024-12-21 17:52:27 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2024-12-28 14:49:22 +0300
commitde662429f3362dcc0647dd16879214efa4373d9d (patch)
tree4d74579e54173f1975df6be7def90b62da803669 /lib/crypto
parent7b6092ee7a4ce2d03dc65b87537889e8e1e0ab95 (diff)
downloadlinux-de662429f3362dcc0647dd16879214efa4373d9d.tar.xz
crypto: lib/aesgcm - Reduce stack usage in libaesgcm_init
The stack frame in libaesgcm_init triggers a size warning on x86-64. Reduce it by making buf static. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/aesgcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto/aesgcm.c b/lib/crypto/aesgcm.c
index 6bba6473fdf3..902e49410aaf 100644
--- a/lib/crypto/aesgcm.c
+++ b/lib/crypto/aesgcm.c
@@ -697,7 +697,7 @@ static int __init libaesgcm_init(void)
u8 tagbuf[AES_BLOCK_SIZE];
int plen = aesgcm_tv[i].plen;
struct aesgcm_ctx ctx;
- u8 buf[sizeof(ptext12)];
+ static u8 buf[sizeof(ptext12)];
if (aesgcm_expandkey(&ctx, aesgcm_tv[i].key, aesgcm_tv[i].klen,
aesgcm_tv[i].clen - plen)) {