Re: [PATCH] lib/crypto: blake2b: Limit frame size workaround to GCC < 12.2 on i386

From: Eric Biggers

Date: Sat Nov 22 2025 - 15:04:05 EST


On Sat, Nov 22, 2025 at 11:55:31AM +0100, Thorsten Blum wrote:
> The GCC bug only occurred on i386 and has been resolved since GCC 12.2.
> Limit the frame size workaround to GCC < 12.2 on i386.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
> ---
> lib/crypto/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
> index b5346cebbb55..5ee36a231484 100644
> --- a/lib/crypto/Makefile
> +++ b/lib/crypto/Makefile
> @@ -33,7 +33,11 @@ obj-$(CONFIG_CRYPTO_LIB_GF128MUL) += gf128mul.o
>
> obj-$(CONFIG_CRYPTO_LIB_BLAKE2B) += libblake2b.o
> libblake2b-y := blake2b.o
> +ifeq ($(CONFIG_X86_32),y)
> +ifeq ($(CONFIG_CC_IS_GCC)_$(call gcc-min-version, 120200),y_)
> CFLAGS_blake2b.o := -Wframe-larger-than=4096 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105930
> +endif # CONFIG_CC_IS_GCC
> +endif # CONFIG_X86_32

How about we do it without the nested ifeq?

ifeq ($(CONFIG_X86_32)$(CONFIG_CC_IS_GCC)_$(call gcc-min-version, 120200),yy_)
CFLAGS_blake2b.o := -Wframe-larger-than=4096 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105930
endif

Also, according to the bugreport this was a regression in gcc 12. With
it having been fixed in 12.2, i.e. within the same gcc release series,
is this workaround still worth carrying at all?

- Eric