linux-stable/arch/csky/kernel
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
..
probes csky/kprobe: reclaim insn_slot on kprobe unregistration 2022-07-22 21:36:14 -04:00
vdso vdso: Improve cmd_vdso_check to check all dynamic relocations 2023-03-21 21:15:34 +01:00
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
asm-offsets.c uaccess: remove CONFIG_SET_FS 2022-02-25 09:36:06 +01:00
atomic.S csky: Remove prologue of page fault handler in entry.S 2021-01-12 09:52:40 +08:00
cpu-probe.c csky: Exception handling and mm-fault 2018-10-25 23:36:19 +08:00
entry.S Revert "csky: Add support for restartable sequence" 2022-11-11 04:59:28 -05:00
ftrace.c ftrace: Cleanup ftrace_dyn_arch_init() 2021-10-08 19:41:39 -04:00
head.S csky: Add memory layout 2.5G(user):1.5G(kernel) 2021-01-12 09:52:40 +08:00
io.c csky: optimize memcpy_{from,to}io() and memset_io() 2022-04-18 21:23:55 +08:00
irq.c irq: csky: perform irqentry in entry code 2021-10-26 10:13:27 +01:00
jump_label.c csky: Add jump-label implementation 2022-07-30 11:12:03 -04:00
module.c csky: fix typos in comments 2022-04-06 22:37:58 +08:00
perf_callchain.c uaccess: fix type mismatch warnings from access_ok() 2022-02-25 09:36:05 +01:00
perf_event.c csky: Add VDSO with GENERIC_GETTIMEOFDAY, GENERIC_TIME_VSYSCALL, HAVE_GENERIC_VDSO 2021-02-27 16:35:09 +08:00
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
power.c csky: Use do_kernel_power_off() 2022-05-19 19:30:30 +02:00
process.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
ptrace.c ptrace: Create ptrace_report_syscall_{entry,exit} in ptrace.h 2022-03-10 13:35:08 -06:00
setup.c csky: Correct position of _stext 2022-07-22 21:36:14 -04:00
signal.c Revert "csky: Add support for restartable sequence" 2022-11-11 04:59:28 -05:00
smp.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
stacktrace.c csky: add arch support current_stack_pointer 2022-10-21 23:52:29 -04:00
syscall.c csky: System Call 2018-10-25 23:36:19 +08:00
syscall_table.c csky: System Call 2018-10-25 23:36:19 +08:00
time.c csky: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-23 12:48:55 +08:00
traps.c Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
vdso.c csky: Add VDSO with GENERIC_GETTIMEOFDAY, GENERIC_TIME_VSYSCALL, HAVE_GENERIC_VDSO 2021-02-27 16:35:09 +08:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00