linux/arch
Nathan Chancellor 91d2be8d4b powerpc/vdso: Drop -mstack-protector-guard flags in 32-bit files with clang
[ Upstream commit d677ce5213 ]

Under certain conditions, the 64-bit '-mstack-protector-guard' flags may
end up in the 32-bit vDSO flags, resulting in build failures due to the
structure of clang's argument parsing of the stack protector options,
which validates the arguments of the stack protector guard flags
unconditionally in the frontend, choking on the 64-bit values when
targeting 32-bit:

  clang: error: invalid value 'r13' in 'mstack-protector-guard-reg=', expected one of: r2
  clang: error: invalid value 'r13' in 'mstack-protector-guard-reg=', expected one of: r2
  make[3]: *** [arch/powerpc/kernel/vdso/Makefile:85: arch/powerpc/kernel/vdso/vgettimeofday-32.o] Error 1
  make[3]: *** [arch/powerpc/kernel/vdso/Makefile:87: arch/powerpc/kernel/vdso/vgetrandom-32.o] Error 1

Remove these flags by adding them to the CC32FLAGSREMOVE variable, which
already handles situations similar to this. Additionally, reformat and
align a comment better for the expanding CONFIG_CC_IS_CLANG block.

Cc: stable@vger.kernel.org # v6.1+
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20241030-powerpc-vdso-drop-stackp-flags-clang-v1-1-d95e7376d29c@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-12-14 19:59:44 +01:00
..
alpha Revert "change alloc_pages name in dma_map_ops to avoid name conflicts" 2024-09-04 13:28:24 +02:00
arc of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
arm ARM: 9431/1: mm: Pair atomic_set_release() with _read_acquire() 2024-12-09 10:33:06 +01:00
arm64 KVM: arm64: Don't retire aborted MMIO instruction 2024-12-14 19:59:40 +01:00
csky of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
hexagon hexagon: fix fadvise64_64 calling conventions 2024-07-05 09:34:02 +02:00
ia64 vgacon: rework screen_info #ifdef checks 2024-06-27 13:49:15 +02:00
loongarch LoongArch: BPF: Sign-extend return values 2024-12-09 10:32:31 +01:00
m68k m68k: coldfire/device.c: only build FEC when HW macros are defined 2024-12-09 10:32:28 +01:00
microblaze of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
mips of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
nios2 of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
openrisc openrisc: Use asm-generic's version of fix_to_virt() & virt_to_fix() 2024-12-11 16:13:43 +01:00
parisc parisc/ftrace: Fix function graph tracing disablement 2024-12-09 10:32:48 +01:00
powerpc powerpc/vdso: Drop -mstack-protector-guard flags in 32-bit files with clang 2024-12-14 19:59:44 +01:00
riscv RISC-V: KVM: Fix APLIC in_clrip and clripnum write emulation 2024-12-09 10:32:16 +01:00
s390 s390/entry: Mark IRQ entries to fix stack depot warnings 2024-12-09 10:33:06 +01:00
sh sh: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2024-12-09 10:32:50 +01:00
sparc sparc64: Fix incorrect function signature and add prototype for prom_cif_init 2024-08-03 08:53:55 +02:00
um um: Always dump trace for specified task in show_stack 2024-12-09 10:32:54 +01:00
x86 Revert "x86/pvh: Set phys_base when calling xen_prepare_pvh()" 2024-12-11 16:13:43 +01:00
xtensa of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default" 2024-06-27 13:49:15 +02:00