[PATCH v3] vdso: Improve cmd_vdso_check to check all dynamic relocations

Michael Ellerman mpe at ellerman.id.au
Tue Mar 14 06:28:53 PDT 2023


Fangrui Song <maskray at google.com> writes:
> The actual intention is that no dynamic relocation exists. However, some
> GNU ld ports produce unneeded R_*_NONE. (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 no-op in the dynamic loaders. So just ignore them.
>
> With the change, we can remove ARCH_REL_TYPE_ABS. ARCH_REL_TYPE_ABS is a
> bit misnomer as ports may check RELAVETIVE/GLOB_DAT/JUMP_SLOT which are
> not called "absolute relocations". (The patch is motivated by the arm64
> port missing R_AARCH64_RELATIVE.)
>
> Signed-off-by: Fangrui Song <maskray at google.com>
> Reviewed-by: Christophe Leroy <christophe.leroy at csgroup.eu>
> Reviewed-by: Vincenzo Frascino <vincenzo.frascino at arm.com> # for vDSO, aarch64
> Tested-by: Vincenzo Frascino <vincenzo.frascino at arm.com> # for aarch64
> ---
> Changes from v2:
> * rebase
>
> Changes from v3:
> * Add a comment before `include $(srctree)/lib/vdso/Makefile` in every touched arch Makefile
> ---
>  arch/arm/vdso/Makefile            |  4 +---
>  arch/arm64/kernel/vdso/Makefile   |  4 +---
>  arch/arm64/kernel/vdso32/Makefile |  3 ---
>  arch/csky/kernel/vdso/Makefile    |  4 +---
>  arch/loongarch/vdso/Makefile      |  4 +---
>  arch/mips/vdso/Makefile           |  4 +---
>  arch/powerpc/kernel/vdso/Makefile |  2 +-

Acked-by: Michael Ellerman <mpe at ellerman.id.au> (powerpc)

cheers



More information about the linux-arm-kernel mailing list