Michael Ellerman be640317a1 powerpc/64s: Disable stack variable initialisation for prom_init
With GCC 12 allmodconfig prom_init fails to build:

  Error: External symbol 'memset' referenced from prom_init.c
  make[2]: *** [arch/powerpc/kernel/Makefile:204: arch/powerpc/kernel/prom_init_check] Error 1

The allmodconfig build enables KASAN, so all calls to memset in
prom_init should be converted to __memset by the #ifdefs in
asm/string.h, because prom_init must use the non-KASAN instrumented
versions.

The build failure happens because there's a call to memset that hasn't
been caught by the pre-processor and converted to __memset. Typically
that's because it's a memset generated by the compiler itself, and that
is the case here.

With GCC 12, allmodconfig enables CONFIG_INIT_STACK_ALL_PATTERN, which
causes the compiler to emit memset calls to initialise on-stack
variables with a pattern.

Because prom_init is non-user-facing boot-time only code, as a
workaround just disable stack variable initialisation to unbreak the
build.

Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220718134418.354114-1-mpe@ellerman.id.au
2022-07-20 15:13:02 +10:00
..
2021-12-09 22:41:21 +11:00
2022-05-08 22:15:40 +10:00
2022-05-28 11:27:17 -07:00
2022-05-05 22:12:44 +10:00
2022-05-05 22:12:44 +10:00
2022-05-08 22:15:40 +10:00
2022-05-05 22:12:44 +10:00
2022-05-28 11:27:17 -07:00
2022-02-07 21:03:10 +11:00
2022-01-14 15:17:26 +01:00
2022-02-07 21:03:10 +11:00
2022-02-07 21:03:10 +11:00
2022-03-25 09:39:36 -07:00
2020-12-04 01:01:09 +11:00
2022-05-19 23:10:42 +10:00
2022-06-02 08:55:01 -07:00
2022-05-08 22:15:40 +10:00
2021-12-09 22:41:19 +11:00
2022-05-08 22:15:40 +10:00
2021-12-09 22:41:21 +11:00
2022-05-08 22:15:40 +10:00
2022-05-05 22:11:57 +10:00
2022-05-08 22:15:40 +10:00
2022-05-08 22:15:40 +10:00
2022-05-08 22:15:40 +10:00
2022-05-08 22:15:40 +10:00
2022-05-08 22:15:40 +10:00
2022-05-05 22:12:44 +10:00
2022-05-08 22:15:40 +10:00
2022-05-08 22:15:40 +10:00
2022-05-08 22:15:40 +10:00
2022-06-02 08:55:01 -07:00
2021-11-16 21:24:16 +11:00
2022-05-22 15:59:43 +10:00
2022-05-08 22:15:40 +10:00
2022-05-08 22:15:40 +10:00
2021-08-19 09:02:55 +09:00
2021-12-09 22:41:21 +11:00
2022-05-05 22:12:44 +10:00