crypto: lib/aesgcm - Reduce stack usage in libaesgcm_init
Subsystems (2)
Herbert Xu
maintainerPATCH 1/1 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 <[email protected]>
lib/crypto/aesgcm.c +1 -1
@@ -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)) {
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Quoted 6 lines · Herbert Xu
The stack frame in
libaesgcm_inittriggers a size warning on x86-64. Reduce it by making buf static.Signed-off-by Herbert Xu <[email protected]>
Acked-by Ard Biesheuvel <[email protected]>
Quoted 17 lines
lib/crypto/aesgcm.c +1
-2@@ -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)) { --Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt