Merge tag 'timers-vdso-2025-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 Mar 2025 18:30:42 +0000 (11:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 Mar 2025 18:30:42 +0000 (11:30 -0700)
Pull VDSO infrastructure updates from Thomas Gleixner:

 - Consolidate the VDSO storage

   The VDSO data storage and data layout has been largely architecture
   specific for historical reasons. That increases the maintenance
   effort and causes inconsistencies over and over.

   There is no real technical reason for architecture specific layouts
   and implementations. The architecture specific details can easily be
   integrated into a generic layout, which also reduces the amount of
   duplicated code for managing the mappings.

   Convert all architectures over to a unified layout and common mapping
   infrastructure. This splits the VDSO data layout into subsystem
   specific blocks, timekeeping, random and architecture parts, which
   provides a better structure and allows to improve and update the
   functionalities without conflict and interaction.

 - Rework the timekeeping data storage

   The current implementation is designed for exposing system
   timekeeping accessors, which was good enough at the time when it was
   designed.

   PTP and Time Sensitive Networking (TSN) change that as there are
   requirements to expose independent PTP clocks, which are not related
   to system timekeeping.

   Replace the monolithic data storage by a structured layout, which
   allows to add support for independent PTP clocks on top while reusing
   both the data structures and the time accessor implementations.

* tag 'timers-vdso-2025-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (55 commits)
  sparc/vdso: Always reject undefined references during linking
  x86/vdso: Always reject undefined references during linking
  vdso: Rework struct vdso_time_data and introduce struct vdso_clock
  vdso: Move architecture related data before basetime data
  powerpc/vdso: Prepare introduction of struct vdso_clock
  arm64/vdso: Prepare introduction of struct vdso_clock
  x86/vdso: Prepare introduction of struct vdso_clock
  time/namespace: Prepare introduction of struct vdso_clock
  vdso/namespace: Rename timens_setup_vdso_data() to reflect new vdso_clock struct
  vdso/vsyscall: Prepare introduction of struct vdso_clock
  vdso/gettimeofday: Prepare helper functions for introduction of struct vdso_clock
  vdso/gettimeofday: Prepare do_coarse_timens() for introduction of struct vdso_clock
  vdso/gettimeofday: Prepare do_coarse() for introduction of struct vdso_clock
  vdso/gettimeofday: Prepare do_hres_timens() for introduction of struct vdso_clock
  vdso/gettimeofday: Prepare do_hres() for introduction of struct vdso_clock
  vdso/gettimeofday: Prepare introduction of struct vdso_clock
  vdso/helpers: Prepare introduction of struct vdso_clock
  vdso/datapage: Define vdso_clock to prepare for multiple PTP clocks
  vdso: Make vdso_time_data cacheline aligned
  arm64: Make asm/cache.h compatible with vDSO
  ...

15 files changed:
1  2 
MAINTAINERS
arch/arm64/Kconfig
arch/arm64/kernel/vdso/vdso.lds.S
arch/loongarch/Kconfig
arch/riscv/Kconfig
arch/x86/Kconfig
arch/x86/entry/vdso/Makefile
arch/x86/entry/vdso/vma.c
arch/x86/include/asm/vdso/getrandom.h
arch/x86/include/asm/vdso/gettimeofday.h
arch/x86/include/asm/vdso/vsyscall.h
include/uapi/linux/elf.h
lib/Makefile
tools/include/nolibc/Makefile
tools/testing/selftests/vDSO/parse_vdso.c

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -27,16 -27,6 +27,6 @@@ static __always_inline ssize_t getrando
        return ret;
  }
  
- extern struct vdso_rng_data vdso_rng_data
-       __attribute__((visibility("hidden")));
- static __always_inline const struct vdso_rng_data *__arch_get_vdso_rng_data(void)
- {
-       if (IS_ENABLED(CONFIG_TIME_NS) && __arch_get_vdso_data()->clock_mode == VDSO_CLOCKMODE_TIMENS)
-               return (void *)&vdso_rng_data + ((void *)&timens_page - (void *)__arch_get_vdso_data());
-       return &vdso_rng_data;
- }
 -#endif /* !__ASSEMBLY__ */
 +#endif /* !__ASSEMBLER__ */
  
  #endif /* __ASM_VDSO_GETRANDOM_H */
Simple merge
Simple merge
diff --cc lib/Makefile
@@@ -124,7 -132,7 +124,7 @@@ endi
  obj-$(CONFIG_DEBUG_INFO_REDUCED) += debug_info.o
  CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any)
  
- obj-y += math/ crypto/ tests/
 -obj-y += math/ crypto/ vdso/
++obj-y += math/ crypto/ tests/ vdso/
  
  obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
  obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
@@@ -29,8 -29,8 +29,9 @@@ all_files := 
                compiler.h \
                crt.h \
                ctype.h \
 +              dirent.h \
                errno.h \
+               limits.h \
                nolibc.h \
                signal.h \
                stackprotector.h \