Skip to content

Commit de66242

Browse files
committed
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]> Acked-by: Ard Biesheuvel <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 7b6092e commit de66242

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/crypto/aesgcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ static int __init libaesgcm_init(void)
697697
u8 tagbuf[AES_BLOCK_SIZE];
698698
int plen = aesgcm_tv[i].plen;
699699
struct aesgcm_ctx ctx;
700-
u8 buf[sizeof(ptext12)];
700+
static u8 buf[sizeof(ptext12)];
701701

702702
if (aesgcm_expandkey(&ctx, aesgcm_tv[i].key, aesgcm_tv[i].klen,
703703
aesgcm_tv[i].clen - plen)) {

0 commit comments

Comments
 (0)