kernel: add KERNEL_TIME_NS Kconfig knob

Enable time namespaces by default, following the existing pattern of
enabling all container-relevant features by default with optional
opt-out.

The knob carries no architecture dependency of its own. TIME_NS is
gated on GENERIC_VDSO_TIME_NS on 6.12 and on GENERIC_GETTIMEOFDAY on
6.18, so the set of architectures able to honour it differs per kernel
version. Where the dependency is unmet the kernel drops the symbol
during syncconfig, as it does for the other options offered
unconditionally here.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle committed 2026-09-18 16:03:13 +01:00
1 parent 5369699684
commit eb3df655fd
1 file changed
+7
+7
View File
@@ -1229,6 +1229,13 @@ if KERNEL_NAMESPACES
Allow user space to create what appear to be multiple instances
of the network stack.
config KERNEL_TIME_NS
bool "Time namespace"
default y
help
In this namespace boottime and monotonic clocks can be set.
The time will keep going with the same pace.
endif
config KERNEL_POSIX_MQUEUE