This is a note to let you know that I've just added the patch titled crypto: lib/blake2s - reduce stack frame usage in self test to the 5.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: crypto-lib-blake2s-reduce-stack-frame-usage-in-self-test.patch and it can be found in the queue-5.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d6c14da474bf260d73953fbf7992c98d9112aec7 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" <Jason@xxxxxxxxx> Date: Mon, 20 Jun 2022 09:52:43 +0200 Subject: crypto: lib/blake2s - reduce stack frame usage in self test From: Jason A. Donenfeld <Jason@xxxxxxxxx> commit d6c14da474bf260d73953fbf7992c98d9112aec7 upstream. Using 3 blocks here doesn't give us much more than using 2, and it causes a stack frame size warning on certain compiler/config/arch combinations: lib/crypto/blake2s-selftest.c: In function 'blake2s_selftest': >> lib/crypto/blake2s-selftest.c:632:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=] 632 | } | ^ So this patch just reduces the block from 3 to 2, which makes the warning go away. Reported-by: kernel test robot <lkp@xxxxxxxxx> Link: https://lore.kernel.org/linux-crypto/202206200851.gE3MHCgd-lkp@xxxxxxxxx Fixes: 2d16803c562e ("crypto: blake2s - remove shash module") Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- lib/crypto/blake2s-selftest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/lib/crypto/blake2s-selftest.c +++ b/lib/crypto/blake2s-selftest.c @@ -593,7 +593,7 @@ bool __init blake2s_selftest(void) enum { TEST_ALIGNMENT = 16 }; u8 unaligned_block[BLAKE2S_BLOCK_SIZE + TEST_ALIGNMENT - 1] __aligned(TEST_ALIGNMENT); - u8 blocks[BLAKE2S_BLOCK_SIZE * 3]; + u8 blocks[BLAKE2S_BLOCK_SIZE * 2]; struct blake2s_state state1, state2; get_random_bytes(blocks, sizeof(blocks)); @@ -603,8 +603,8 @@ bool __init blake2s_selftest(void) defined(CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S) memcpy(&state1, &state, sizeof(state1)); memcpy(&state2, &state, sizeof(state2)); - blake2s_compress(&state1, blocks, 3, BLAKE2S_BLOCK_SIZE); - blake2s_compress_generic(&state2, blocks, 3, BLAKE2S_BLOCK_SIZE); + blake2s_compress(&state1, blocks, 2, BLAKE2S_BLOCK_SIZE); + blake2s_compress_generic(&state2, blocks, 2, BLAKE2S_BLOCK_SIZE); if (memcmp(&state1, &state2, sizeof(state1))) { pr_err("blake2s random compress self-test %d: FAIL\n", i + 1); Patches currently in stable-queue which might be from Jason@xxxxxxxxx are queue-5.18/crypto-lib-blake2s-reduce-stack-frame-usage-in-self-test.patch queue-5.18/wireguard-ratelimiter-use-hrtimer-in-selftest.patch queue-5.18/fs-check-fmode_lseek-to-control-internal-pipe-splici.patch queue-5.18/wireguard-allowedips-don-t-corrupt-stack-when-detect.patch queue-5.18/timekeeping-contribute-wall-clock-to-rng-on-time-cha.patch queue-5.18/powerpc-powernv-kvm-use-darn-for-h_random-on-power9.patch queue-5.18/powerpc-powernv-avoid-crashing-if-rng-is-null.patch queue-5.18/wireguard-selftests-set-config_nonportable-on-riscv32.patch queue-5.18/um-seed-rng-using-host-os-rng.patch queue-5.18/crypto-blake2s-remove-shash-module.patch