linux-stable/arch/x86
Naveen N. Rao 53b858c807 kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]
commit 3e35142ef9 upstream.

Since commit d1bcae833b32f1 ("ELF: Don't generate unused section
symbols") [1], binutils (v2.36+) started dropping section symbols that
it thought were unused.  This isn't an issue in general, but with
kexec_file.c, gcc is placing kexec_arch_apply_relocations[_add] into a
separate .text.unlikely section and the section symbol ".text.unlikely"
is being dropped. Due to this, recordmcount is unable to find a non-weak
symbol in .text.unlikely to generate a relocation record against.

Address this by dropping the weak attribute from these functions.
Instead, follow the existing pattern of having architectures #define the
name of the function they want to override in their headers.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1

[akpm@linux-foundation.org: arch/s390/include/asm/kexec.h needs linux/module.h]
Link: https://lkml.kernel.org/r/20220519091237.676736-1-naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-09 10:23:27 +02:00
..
boot x86: Prepare asm files for straight-line-speculation 2022-05-15 20:18:49 +02:00
configs x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs 2022-01-27 11:04:56 +01:00
crypto lib/crypto: blake2s: avoid indirect calls to compression function for Clang CFI 2022-05-30 09:28:59 +02:00
entry x86/sev: Annotate stack change in the #VC handler 2022-06-09 10:23:00 +02:00
events perf/amd/ibs: Use interrupt regs ip for stack unwinding 2022-06-09 10:22:55 +02:00
hyperv x86/hyperv: Properly deal with empty cpumasks in hyperv_flush_tlb_multi() 2022-03-08 19:12:36 +01:00
ia32 binfmt: remove in-tree usage of MAP_DENYWRITE 2021-09-03 18:42:01 +02:00
include kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add] 2022-06-09 10:23:27 +02:00
kernel x86/mm: Cleanup the control_va_addr_alignment() __setup handler 2022-06-09 10:22:54 +02:00
kvm KVM: LAPIC: Drop pending LAPIC timer injection when canceling the timer 2022-06-09 10:23:13 +02:00
lib x86/delay: Fix the wrong asm constraint in delay_loop() 2022-06-09 10:22:45 +02:00
math-emu x86: Prepare asm files for straight-line-speculation 2022-05-15 20:18:49 +02:00
mm x86: Fix return value of __setup handlers 2022-06-09 10:22:53 +02:00
net bpf: Fix extable address check. 2021-12-22 09:32:50 +01:00
pci x86/PCI: Fix ALi M1487 (IBC) PIRQ router link value interpretation 2022-06-09 10:22:46 +02:00
platform x86: Prepare asm files for straight-line-speculation 2022-05-15 20:18:49 +02:00
power x86: Prepare asm files for straight-line-speculation 2022-05-15 20:18:49 +02:00
purgatory kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
ras
realmode x86/mm: Flush global TLB when switching to trampoline page-table 2022-01-27 11:04:35 +01:00
tools - Remove cc-option checks which are old and already supported by the 2021-08-30 13:27:16 -07:00
um um: Fix out-of-bounds read in LDT setup 2022-06-09 10:23:27 +02:00
video
xen x86: Prepare asm files for straight-line-speculation 2022-05-15 20:18:49 +02:00
.gitignore
Kbuild
Kconfig x86/microcode: Add explicit CPU vendor dependency 2022-06-09 10:22:39 +02:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile x86: Add straight-line-speculation mitigation 2022-05-15 20:18:51 +02:00
Makefile.um
Makefile_32.cpu x86/build: Do not add -falign flags unconditionally for clang 2021-09-19 10:35:53 +09:00