linux/arch/powerpc
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
..
boot powerpc updates for 5.19 2022-05-28 11:27:17 -07:00
configs eth: de4x5: remove support for Generic DECchip & DIGITAL EtherWORKS PCI/EISA 2022-05-23 11:43:51 +01:00
crypto powerpc: fix typos in comments 2022-05-05 22:12:44 +10:00
include powerpc/bpf: Fix use of user_pt_regs in uapi 2022-06-29 20:43:04 +10:00
kernel powerpc/64s: Disable stack variable initialisation for prom_init 2022-07-20 15:13:02 +10:00
kexec powerpc/kasan: Mark more real-mode code as not to be instrumented 2022-05-29 10:30:42 +10:00
kvm powerpc: Fix all occurences of "the the" 2022-05-22 15:59:43 +10:00
lib powerpc updates for 5.19 2022-05-28 11:27:17 -07:00
math-emu
mm powerpc/memhotplug: Add add_pages override for PPC 2022-06-29 20:43:16 +10:00
net powerpc/inst: Remove PPC_INST_BL 2022-05-22 15:58:27 +10:00
perf powerpc/perf: Fix the threshold compare group constraint for power9 2022-05-22 15:58:30 +10:00
platforms powerpc/powernv: delay rng platform device creation until later in boot 2022-07-04 21:11:47 +10:00
purgatory
sysdev powerpc/xive/spapr: correct bitmap allocation size 2022-06-24 12:40:38 +10:00
tools powerpc/64: Add UADDR64 relocation support 2022-03-09 21:47:53 +11:00
xmon More power management updates for 5.19-rc1 2022-05-30 11:37:26 -07:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc/memhotplug: Add add_pages override for PPC 2022-06-29 20:43:16 +10:00
Kconfig.debug powerpc: Book3S 64-bit outline-only KASAN support 2022-05-22 15:58:29 +10:00
Makefile powerpc updates for 5.19 2022-05-28 11:27:17 -07:00
Makefile.postlink