Skip to content
Commit e1e6611c authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Paul Gortmaker
Browse files

crypto: testmgr - dynamically allocate crypto_shash



commit 149c4e6e upstream.

The largest stack object in this file is now the shash descriptor.
Since there are many other stack variables, this can push it
over the 1024 byte warning limit, in particular with clang and
KASAN:

crypto/testmgr.c:1693:12: error: stack frame size of 1312 bytes in function '__alg_test_hash' [-Werror,-Wframe-larger-than=]

Make test_hash_vs_generic_impl() do the same thing as the
corresponding eaed and skcipher functions by allocating the
descriptor dynamically. We can still do better than this,
but it brings us well below the 1024 byte limit.

Suggested-by: default avatarEric Biggers <ebiggers@kernel.org>
Fixes: 9a8a6b3f ("crypto: testmgr - fuzz hashes against their generic implementation")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarEric Biggers <ebiggers@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 633dc390
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment