1
0
Fork 0
alistair23-linux/arch/powerpc
Alexandre Ghiti a531e6ba85 powerpc: Do not consider weak unresolved symbol relocations as bad
[ Upstream commit 43e76cd368 ]

Commit 8580ac9404 ("bpf: Process in-kernel BTF") introduced two weak
symbols that may be unresolved at link time which result in an absolute
relocation to 0. relocs_check.sh emits the following warning:

"WARNING: 2 bad relocations
c000000001a41478 R_PPC64_ADDR64    _binary__btf_vmlinux_bin_start
c000000001a41480 R_PPC64_ADDR64    _binary__btf_vmlinux_bin_end"

whereas those relocations are legitimate even for a relocatable kernel
compiled with -pie option.

relocs_check.sh already excluded some weak unresolved symbols explicitly:
remove those hardcoded symbols and add some logic that parses the symbols
using nm, retrieves all the weak unresolved symbols and excludes those from
the list of the potential bad relocations.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200118170335.21440-1-alex@ghiti.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:37:00 +01:00
..
boot powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize 2020-02-11 04:35:45 -08:00
configs powerpc/configs: Enable secure guest support in pseries and ppc64 defconfigs 2019-08-30 09:56:30 +10:00
crypto treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
include powerpc/kuap: Fix set direction in allow/prevent_user_access() 2020-02-11 04:35:55 -08:00
kernel powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV 2020-02-24 08:36:56 +01:00
kvm KVM: PPC: Remove set but not used variable 'ra', 'rs', 'rt' 2020-02-24 08:36:51 +01:00
lib powerpc: Fix __clear_user() with KUAP enabled 2020-01-04 19:18:37 +01:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mm powerpc/mm: Don't log user reads to 0xffffffff 2020-02-24 08:36:58 +01:00
net powerpc/bpf: Fix tail call implementation 2019-11-02 00:32:26 +01:00
oprofile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
perf powerpc/perf: fix imc allocation failure handling 2019-08-20 21:22:20 +10:00
platforms powerpc/pseries/lparcfg: Fix display of Maximum Memory 2020-02-24 08:36:57 +01:00
purgatory treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
sysdev powerpc/xive: Discard ESB load value when interrupt is invalid 2020-01-29 16:45:26 +01:00
tools powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00
xmon powerpc/xmon: don't access ASDR in VMs 2020-02-11 04:35:17 -08:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kconfig mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush 2020-02-11 04:35:42 -08:00
Kconfig.debug powerpc/ptdump: Only enable PPC_CHECK_WX with STRICT_KERNEL_RWX 2020-02-14 16:34:16 -05:00
Makefile powerpc: Don't add -mabi= flags when building with Clang 2020-01-04 19:18:23 +01:00
Makefile.postlink powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00