linux-stable/arch/x86/entry/vdso
Fangrui Song aff69273af vdso: Improve cmd_vdso_check to check all dynamic relocations
The actual intention is that no dynamic relocation exists in the VDSO. For
this the VDSO build validates that the resulting .so file does not have any
relocations which are specified via $(ARCH_REL_TYPE_ABS) per architecture,
which is fragile as e.g. ARM64 lacks an entry for R_AARCH64_RELATIVE. Aside
of that ARCH_REL_TYPE_ABS is a misnomer as it checks for relative
relocations too.

However, some GNU ld ports produce unneeded R_*_NONE relocation entries. If
a port fails to determine the exact .rel[a].dyn size, the trailing zeros
become R_*_NONE relocations. E.g. ld's powerpc port recently fixed
https://sourceware.org/bugzilla/show_bug.cgi?id=29540). R_*_NONE are
generally a no-op in the dynamic loaders. So just ignore them.

Remove the ARCH_REL_TYPE_ABS defines and just validate that the resulting
.so file does not contain any R_* relocation entries except R_*_NONE.

Signed-off-by: Fangrui Song <maskray@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com> # for aarch64
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> # for vDSO, aarch64
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Link: https://lore.kernel.org/r/20230310190750.3323802-1-maskray@google.com
2023-03-21 21:15:34 +01:00
..
vdso32 x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu 2023-02-07 18:20:41 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile vdso: Improve cmd_vdso_check to check all dynamic relocations 2023-03-21 21:15:34 +01:00
checkundef.sh
extable.c x86/vdso: Add support for exception fixup in vDSO functions 2020-11-18 18:02:50 +01:00
extable.h x86/vdso: Add support for exception fixup in vDSO functions 2020-11-18 18:02:50 +01:00
vclock_gettime.c y2038: vdso: change time_t to __kernel_old_time_t 2019-11-15 14:38:28 +01:00
vdso-layout.lds.S x86: Remove .fixup section 2021-12-11 09:09:50 +01:00
vdso-note.S
vdso.lds.S x86/vdso: Conditionally export __vdso_sgx_enter_enclave() 2022-12-09 14:58:02 +01:00
vdso2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE 2022-06-10 14:51:36 +02:00
vdso2c.h x86/vdso: Move VDSO image init to vdso2c generated code 2023-01-25 12:33:40 +01:00
vdso32-setup.c x86/vdso: Move VDSO image init to vdso2c generated code 2023-01-25 12:33:40 +01:00
vdsox32.lds.S x86/vdso: Switch to generic vDSO implementation 2019-06-22 21:21:10 +02:00
vgetcpu.c x86/vdso: Provide getcpu for x86-32. 2023-02-06 15:48:54 +01:00
vma.c - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
vsgx.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00