lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250701-vdso-auxclock-v1-0-df7d9f87b9b8@linutronix.de>
Date: Tue, 01 Jul 2025 10:57:54 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, 
 Vincenzo Frascino <vincenzo.frascino@....com>, 
 Shuah Khan <shuah@...nel.org>, 
 Anna-Maria Behnsen <anna-maria@...utronix.de>, 
 Frederic Weisbecker <frederic@...nel.org>, John Stultz <jstultz@...gle.com>, 
 Stephen Boyd <sboyd@...nel.org>, Catalin Marinas <catalin.marinas@....com>, 
 Will Deacon <will@...nel.org>, Arnd Bergmann <arnd@...db.de>
Cc: linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org, 
 linux-arm-kernel@...ts.infradead.org, linux-arch@...r.kernel.org, 
 Richard Cochran <richardcochran@...il.com>, 
 Christopher Hall <christopher.s.hall@...el.com>, 
 Frederic Weisbecker <frederic@...nel.org>, 
 Anna-Maria Behnsen <anna-maria@...utronix.de>, 
 Miroslav Lichvar <mlichvar@...hat.com>, 
 Werner Abt <werner.abt@...nberg-usa.com>, 
 David Woodhouse <dwmw2@...radead.org>, Stephen Boyd <sboyd@...nel.org>, 
 Kurt Kanzenbach <kurt@...utronix.de>, Nam Cao <namcao@...utronix.de>, 
 Antoine Tenart <atenart@...nel.org>, 
 Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH 00/14] vdso: Add support for auxiliary clocks

Extend the vDSO for fast-path access to auxiliary clocks (CLOCK_AUX).
The implementation is based on the generic vDSO infrastructure and works for
all its supported architectures.
Namely x86, arm, arm64, riscv, powerpc, loongarch and s390.
No changes to userspace are necessary.

Based on timers/ptp of tip.git.

This also depends on v6.16-rc2 *exactly*.
The specific dependency is commit 11fcf368506d ("uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again"),
which is available in v6.16-rc2.
Unfortunately that got broken again in v6.16-rc3 by
commit  fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel sources").
Another fix for this is pending [0] and should make it into v6.16.

[0] https://lore.kernel.org/lkml/20250630-uapi-genmask-v1-1-eb0ad956a83e@linutronix.de/

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
---
Thomas Weißschuh (14):
      selftests/timers: Add testcase for auxiliary clocks
      vdso/vsyscall: Introduce a helper to fill clock configurations
      vdso/vsyscall: Split up __arch_update_vsyscall() into __arch_update_vdso_clock()
      vdso/helpers: Add helpers for seqlocks of single vdso_clock
      vdso/gettimeofday: Return bool from clock_getres() helpers
      vdso/gettimeofday: Return bool from clock_gettime() helpers
      vdso/gettimeofday: Introduce vdso_clockid_valid()
      vdso/gettimeofday: Introduce vdso_set_timespec()
      vdso/gettimeofday: Introduce vdso_get_timestamp()
      vdso: Introduce aux_clock_resolution_ns()
      vdso/vsyscall: Update auxiliary clock data in the datapage
      vdso/gettimeofday: Add support for auxiliary clocks
      Revert "selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers"
      selftests/timers/auxclock: Test vDSO functionality

 arch/arm64/include/asm/vdso/vsyscall.h    |   7 +-
 include/asm-generic/vdso/vsyscall.h       |   6 +-
 include/linux/timekeeper_internal.h       |  13 +
 include/vdso/auxclock.h                   |  13 +
 include/vdso/datapage.h                   |   5 +
 include/vdso/helpers.h                    |  40 ++-
 kernel/time/namespace.c                   |   5 +
 kernel/time/timekeeping.c                 |  18 +-
 kernel/time/vsyscall.c                    |  70 ++++--
 lib/vdso/gettimeofday.c                   | 212 ++++++++++------
 tools/testing/selftests/timers/.gitignore |   1 +
 tools/testing/selftests/timers/Makefile   |   2 +-
 tools/testing/selftests/timers/auxclock.c | 406 ++++++++++++++++++++++++++++++
 tools/testing/selftests/vDSO/Makefile     |   2 -
 tools/testing/selftests/vDSO/parse_vdso.c |   3 +-
 15 files changed, 683 insertions(+), 120 deletions(-)
---
base-commit: 4e83b31e48cf2e62aeaed5cd9875c851e36a90d9
change-id: 20250630-vdso-auxclock-97abdf8e042a

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ