Re: [PATCH] powerpc/prom_init: Fix build failure with GCC_PLUGIN_STRUCTLEAK_BYREF_ALL and KASAN

From: Michael Ellerman
Date: Sat Jun 25 2022 - 20:29:00 EST


On Fri, 10 Jun 2022 17:43:43 +0200, Christophe Leroy wrote:
> When CONFIG_KASAN is selected, we expect prom_init to use __memset()
> because it is too early to use memset().
>
> But with CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL, the compiler adds calls
> to memset() to clear objects on stack, hence the following failure:
>
> PROMCHK arch/powerpc/kernel/prom_init_check
> Error: External symbol 'memset' referenced from prom_init.c
> make[2]: *** [arch/powerpc/kernel/Makefile:204 : arch/powerpc/kernel/prom_init_check] Erreur 1
>
> [...]

Applied to powerpc/fixes.

[1/1] powerpc/prom_init: Fix build failure with GCC_PLUGIN_STRUCTLEAK_BYREF_ALL and KASAN
https://git.kernel.org/powerpc/c/ca5dabcff1df6bc8c413922b5fa63cc602858803

cheers