[PATCH 0/7] vDSO: Respect COMPAT_32BIT_TIME

Thomas Weißschuh thomas.weissschuh at linutronix.de
Thu Feb 26 22:57:39 PST 2026


If CONFIG_COMPAT_32BIT_TIME is disabled then the vDSO should not
provide any 32-bit time related functionality. This is the intended
effect of the kconfig option and also the fallback system calls would
also not be implemented.

Currently the kconfig option does not affect the gettimeofday() syscall,
so also keep that in the vDSO.

I also tried to introduce some helpers to avoid much of the ifdeffery,
but due to the high variance in the architecture-specific glue code
these would need to handle they ended up being worse than the current
proposal.

As a side-effect this will make the self-tests more reliable,
as there is now always a matching syscall available for each vDSO function.

clock_gettime_time64() was only introduced in v6.19, so libc implementations
are likely not using it yet.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
Thomas Weißschuh (7):
      x86/vdso: Respect COMPAT_32BIT_TIME
      ARM: VDSO: Respect COMPAT_32BIT_TIME
      arm64: vdso32: Respect COMPAT_32BIT_TIME
      powerpc/vdso: Respect COMPAT_32BIT_TIME
      MIPS: VDSO: Drop kconfig MIPS_CLOCK_VSYSCALL
      MIPS: VDSO: Respect COMPAT_32BIT_TIME
      vdso/gettimeofday: Verify COMPAT_32BIT_TIME interactions

 arch/arm/vdso/vdso.lds.S                    |  4 +++-
 arch/arm/vdso/vgettimeofday.c               | 14 ++++++------
 arch/arm64/kernel/vdso32/vdso.lds.S         |  4 +++-
 arch/arm64/kernel/vdso32/vgettimeofday.c    | 14 ++++++------
 arch/mips/Kconfig                           |  3 ---
 arch/mips/vdso/vdso.lds.S                   |  6 +++---
 arch/mips/vdso/vgettimeofday.c              | 33 +++++++----------------------
 arch/powerpc/kernel/vdso/gettimeofday.S     |  6 ++++++
 arch/powerpc/kernel/vdso/vdso32.lds.S       | 10 +++++----
 arch/powerpc/kernel/vdso/vgettimeofday.c    | 16 ++++++++------
 arch/x86/entry/vdso/common/vclock_gettime.c | 20 ++++++++++-------
 arch/x86/entry/vdso/vdso32/vdso32.lds.S     |  4 +++-
 lib/vdso/gettimeofday.c                     |  8 +++++++
 13 files changed, 78 insertions(+), 64 deletions(-)
---
base-commit: 328b128e8fe2ae981900c1f38b3b9c75c586455e
change-id: 20260113-vdso-compat_32bit_time-e808763e976a

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




More information about the linux-arm-kernel mailing list