| 5dc9cf83 | 26-Mar-2026 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/timens: Move functions to new file
As a preparation of the untangling of time namespaces and the vDSO, move the glue functions between those subsystems into a new file.
While at it, switch the
vdso/timens: Move functions to new file
As a preparation of the untangling of time namespaces and the vDSO, move the glue functions between those subsystems into a new file.
While at it, switch the mutex lock and mmap_read_lock() in the vDSO namespace code to guard().
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260326-vdso-timens-decoupling-v2-1-c82693a7775f@linutronix.de
show more ...
|
| 750d8cc8 | 27-Feb-2026 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/datapage: Remove inclusion of gettimeofday.h
vdso/datapage.h is useful without pulling in the architecture-specific gettimeofday() helpers.
Move the include to the only users which needs it.
vdso/datapage: Remove inclusion of gettimeofday.h
vdso/datapage.h is useful without pulling in the architecture-specific gettimeofday() helpers.
Move the include to the only users which needs it.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260227-vdso-header-cleanups-v2-12-35d60acf7410@linutronix.de
show more ...
|
| 9fc2232e | 27-Feb-2026 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Add explicit includes
Various used symbols are only visible through transitive includes. These transitive includes are about to go away.
Explicitly include the necessary headers.
vdso/gettimeofday: Add explicit includes
Various used symbols are only visible through transitive includes. These transitive includes are about to go away.
Explicitly include the necessary headers.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260227-vdso-header-cleanups-v2-10-35d60acf7410@linutronix.de
show more ...
|
| 0c02d6df | 27-Feb-2026 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Move the unlikely() into vdso_read_retry()
All callers of vdso_read_retry() test its return value with unlikely(). Move the unlikely into the helper to make the code easier to rea
vdso/gettimeofday: Move the unlikely() into vdso_read_retry()
All callers of vdso_read_retry() test its return value with unlikely(). Move the unlikely into the helper to make the code easier to read. This is equivalent to the retry function of non-vDSO seqlocks.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260227-vdso-cleanups-v1-4-c848b4bc4850@linutronix.de
show more ...
|
| a657bebd | 27-Feb-2026 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Add a helper to test if a clock is namespaced
Currently this logic is duplicate multiple times.
Add a helper for it to make the code more readable.
[ bp: Add a missing clockso
vdso/gettimeofday: Add a helper to test if a clock is namespaced
Currently this logic is duplicate multiple times.
Add a helper for it to make the code more readable.
[ bp: Add a missing clocksource.h include, see https://lore.kernel.org/r/20260311113435-f72f81d8-33a6-4a0f-bd80-4997aad068cc@linutronix.de ]
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260227-vdso-cleanups-v1-3-c848b4bc4850@linutronix.de
show more ...
|
| ed78b7b2 | 27-Feb-2026 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Add a helper to read the sequence lock of a time namespace aware clock
Currently there are three different open-coded variants of a time namespace aware variant of vdso_read_begin
vdso/gettimeofday: Add a helper to read the sequence lock of a time namespace aware clock
Currently there are three different open-coded variants of a time namespace aware variant of vdso_read_begin(). They make the code hard to read and introduce an inconsistency, as only the first copy uses unlikely().
Split the code into a shared helper function. Move that next to the definition of the regular vdso_read_begin(), so that any future changes can be kept in sync easily.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260227-vdso-cleanups-v1-2-c848b4bc4850@linutronix.de
show more ...
|
| 05988dba | 04-Mar-2026 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/datastore: Allocate data pages dynamically
Allocating the data pages as part of the kernel image does not work on SPARC. The MMU will raise a fault when userspace tries to access them.
Allocat
vdso/datastore: Allocate data pages dynamically
Allocating the data pages as part of the kernel image does not work on SPARC. The MMU will raise a fault when userspace tries to access them.
Allocate the data pages through the page allocator instead.
Unused pages in the vDSO VMA are still allocated to keep the virtual addresses aligned. Switch the mapping from PFNs to 'struct page' as that is required for dynamically allocated pages. This also aligns the allocation of the datapages with the code pages and is a prerequisite for mlockall() support.
VM_MIXEDMAP is necessary for the call to vmf_insert_page() in the timens prefault path to work.
The data pages need to be order-0, non-compound pages so that the mapping to userspace and the different orderings work.
These pages are also used by the timekeeping, random pool and architecture initialization code. Some of these are running before the page allocator is available. To keep these subsytems working without changes, introduce early, statically data storage which will then replaced by the real one as soon as that is available.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Link: https://patch.msgid.link/20260304-vdso-sparc64-generic-2-v6-3-d8eb3b0e1410@linutronix.de
show more ...
|
| c0c9439b | 04-Mar-2026 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/datastore: Drop inclusion of linux/mmap_lock.h
This header is unnecessary and together with some upcoming changes would introduce compiler warnings.
Signed-off-by: Thomas Weißschuh <thomas.wei
vdso/datastore: Drop inclusion of linux/mmap_lock.h
This header is unnecessary and together with some upcoming changes would introduce compiler warnings.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Tested-by: Andreas Larsson <andreas@gaisler.com> Reviewed-by: Andreas Larsson <andreas@gaisler.com> Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Link: https://lore.kernel.org/lkml/20250916-mm-rcuwait-v1-1-39a3beea6ec3@linutronix.de/ Link: https://patch.msgid.link/20260304-vdso-sparc64-generic-2-v6-2-d8eb3b0e1410@linutronix.de
show more ...
|
| 258b37c6 | 26-Aug-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO
All architectures which want to implement getrandom() in the vDSO need to use the generic vDSO library.
Signed-off-by: Thomas Weißschuh <thomas.we
vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO
All architectures which want to implement getrandom() in the vDSO need to use the generic vDSO library.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250826-vdso-cleanups-v1-11-d9b65750e49f@linutronix.de
show more ...
|
| bad53ae2 | 26-Aug-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso: Drop Kconfig GENERIC_VDSO_TIME_NS
All architectures implementing time-related functionality in the vDSO are using the generic vDSO library which handles time namespaces properly.
Remove the n
vdso: Drop Kconfig GENERIC_VDSO_TIME_NS
All architectures implementing time-related functionality in the vDSO are using the generic vDSO library which handles time namespaces properly.
Remove the now unnecessary Kconfig symbol.
Enables the use of time namespaces on architectures, which use the generic vDSO but did not enable GENERIC_VDSO_TIME_NS, namely MIPS and arm.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/all/20250826-vdso-cleanups-v1-10-d9b65750e49f@linutronix.de
show more ...
|
| bb5bc7bf | 26-Aug-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso: Drop kconfig GENERIC_COMPAT_VDSO
This configuration is never used.
Remove it.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutroni
vdso: Drop kconfig GENERIC_COMPAT_VDSO
This configuration is never used.
Remove it.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/all/20250826-vdso-cleanups-v1-8-d9b65750e49f@linutronix.de
show more ...
|
| cd3557a7 | 01-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Add support for auxiliary clocks
Expose the auxiliary clocks through the vDSO.
Architectures not using the generic vDSO time framework, namely SPARC64, are not supported.
Signed
vdso/gettimeofday: Add support for auxiliary clocks
Expose the auxiliary clocks through the vDSO.
Architectures not using the generic vDSO time framework, namely SPARC64, are not supported.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250701-vdso-auxclock-v1-12-df7d9f87b9b8@linutronix.de
show more ...
|
| 562f03ed | 01-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Introduce vdso_get_timestamp()
This code is duplicated and with the introduction of auxiliary clocks will be duplicated even more.
Introduce a helper.
Signed-off-by: Thomas Weiß
vdso/gettimeofday: Introduce vdso_get_timestamp()
This code is duplicated and with the introduction of auxiliary clocks will be duplicated even more.
Introduce a helper.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250701-vdso-auxclock-v1-9-df7d9f87b9b8@linutronix.de
show more ...
|
| 381d96cc | 01-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Introduce vdso_set_timespec()
This code is duplicated and with the introduction of auxiliary clocks will be duplicated even more.
Introduce a helper.
Signed-off-by: Thomas Weißs
vdso/gettimeofday: Introduce vdso_set_timespec()
This code is duplicated and with the introduction of auxiliary clocks will be duplicated even more.
Introduce a helper.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250701-vdso-auxclock-v1-8-df7d9f87b9b8@linutronix.de
show more ...
|
| 1a1cd5fe | 01-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Introduce vdso_clockid_valid()
Move the clock ID validation check into a common helper.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gl
vdso/gettimeofday: Introduce vdso_clockid_valid()
Move the clock ID validation check into a common helper.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250701-vdso-auxclock-v1-7-df7d9f87b9b8@linutronix.de
show more ...
|
| fb61bdb2 | 01-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Return bool from clock_gettime() helpers
The internal helpers are effectively using boolean results, while pretending to use error numbers.
Switch the return type to bool for mor
vdso/gettimeofday: Return bool from clock_gettime() helpers
The internal helpers are effectively using boolean results, while pretending to use error numbers.
Switch the return type to bool for more clarity.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250701-vdso-auxclock-v1-6-df7d9f87b9b8@linutronix.de
show more ...
|