]> www.infradead.org Git - users/willy/linux.git/commit
vdso: Add generic time data storage
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Tue, 4 Feb 2025 12:05:37 +0000 (13:05 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 21 Feb 2025 08:54:01 +0000 (09:54 +0100)
commitdf7fcbefa71090a276fb841ffe19b8e5f12b4767
treeefa7b1e59e09024b989e5911914df9070906c37c
parent127b0e05c1669d240426719b3b9db8a8366eed50
vdso: Add generic time data storage

Historically each architecture defined their own way to store the vDSO
data page. Add a generic mechanism to provide storage for that page.

Furthermore this generic storage will be extended to also provide
uniform storage for *non*-time-related data, like the random state or
architecture-specific data. These will have their own pages and data
structures, so rename 'vdso_data' into 'vdso_time_data' to make that
split clear from the name.

Also introduce a new consistent naming scheme for the symbols related to
the vDSO, which makes it clear if the symbol is accessible from
userspace or kernel space and the type of data behind the symbol.

The generic fault handler contains an optimization to prefault the vvar
page when the timens page is accessed. This was lifted from s390 and x86.

Co-developed-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250204-vdso-store-rng-v3-5-13a4669dfc8c@linutronix.de
include/asm-generic/vdso/vsyscall.h
include/linux/time_namespace.h
include/linux/vdso_datastore.h [new file with mode: 0644]
include/vdso/datapage.h
kernel/time/vsyscall.c
lib/Makefile
lib/vdso/Kconfig
lib/vdso/Makefile [new file with mode: 0644]
lib/vdso/datastore.c [new file with mode: 0644]
lib/vdso/gettimeofday.c