Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
lib/crypto/aesgcm.c
··· 697 697 u8 tagbuf[AES_BLOCK_SIZE]; 698 698 int plen = aesgcm_tv[i].plen; 699 699 struct aesgcm_ctx ctx; 700 - u8 buf[sizeof(ptext12)]; 700 + static u8 buf[sizeof(ptext12)]; 701 701 702 702 if (aesgcm_expandkey(&ctx, aesgcm_tv[i].key, aesgcm_tv[i].klen, 703 703 aesgcm_tv[i].clen - plen)) {