[PATCH v2 0/2] vdso: Work around and reject absolute relocations

Thomas Weißschuh posted 2 patches 9 months, 2 weeks ago
arch/arm64/include/asm/vdso/gettimeofday.h | 13 +++++++++++++
lib/vdso/Makefile.include                  |  6 ++++++
2 files changed, 19 insertions(+)
[PATCH v2 0/2] vdso: Work around and reject absolute relocations
Posted by Thomas Weißschuh 9 months, 2 weeks ago
GCC on arm64 would incorrectly emit absolute relocations in vDSO code.
Work around those and break the build if new ones appear.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Changes in v2:
- Link to openend (invalid) GCC bug containing more explanations
- Refine commit messages
- Don't fail on commit absolute relocations in debug info
- Link to v1: https://lore.kernel.org/r/20250429-vdso-absolute-reloc-v1-0-987a0afd10b5@linutronix.de

---
Thomas Weißschuh (2):
      arm64: vdso: Work around invalid absolute relocations from GCC
      vdso: Reject absolute relocations during build

 arch/arm64/include/asm/vdso/gettimeofday.h | 13 +++++++++++++
 lib/vdso/Makefile.include                  |  6 ++++++
 2 files changed, 19 insertions(+)
---
base-commit: b4432656b36e5cc1d50a1f2dc15357543add530e
change-id: 20250428-vdso-absolute-reloc-a226293c1761

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Re: [PATCH v2 0/2] vdso: Work around and reject absolute relocations
Posted by Jan Stancek 9 months, 1 week ago
On Wed, Apr 30, 2025 at 11:23 AM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> GCC on arm64 would incorrectly emit absolute relocations in vDSO code.
> Work around those and break the build if new ones appear.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> Changes in v2:
> - Link to openend (invalid) GCC bug containing more explanations
> - Refine commit messages
> - Don't fail on commit absolute relocations in debug info
> - Link to v1: https://lore.kernel.org/r/20250429-vdso-absolute-reloc-v1-0-987a0afd10b5@linutronix.de

Tested-by: Jan Stancek <jstancek@redhat.com>

v2 works for me with both reproducers. LTP syscalls run passed as well.

I did a scratch builds of latest Fedora rawhide and ELN with this
series, both passed on all arches:
https://koji.fedoraproject.org/koji/taskinfo?taskID=132140190
https://koji.fedoraproject.org/koji/taskinfo?taskID=132137468


>
> ---
> Thomas Weißschuh (2):
>       arm64: vdso: Work around invalid absolute relocations from GCC
>       vdso: Reject absolute relocations during build
>
>  arch/arm64/include/asm/vdso/gettimeofday.h | 13 +++++++++++++
>  lib/vdso/Makefile.include                  |  6 ++++++
>  2 files changed, 19 insertions(+)
> ---
> base-commit: b4432656b36e5cc1d50a1f2dc15357543add530e
> change-id: 20250428-vdso-absolute-reloc-a226293c1761
>
> Best regards,
> --
> Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>