posix-clocks: Wire up clock_gettime() with timens offsets
authorAndrei Vagin <avagin@openvz.org>
Tue, 12 Nov 2019 01:27:00 +0000 (01:27 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 14 Jan 2020 11:20:52 +0000 (12:20 +0100)
commit5a590f35add93c2bdf3ed83eee73111021679562
tree259e9f5d400065e26a4a3b6f0a2ac98b39c9e096
parent198fa445d5c4c1a1c6c1d39f962559f8d008e79d
posix-clocks: Wire up clock_gettime() with timens offsets

Adjust monotonic and boottime clocks with per-timens offsets.  As the
result a process inside time namespace will see timers and clocks corrected
to offsets that were set when the namespace was created

Note that applications usually go through vDSO to get time, which is not
yet adjusted. Further changes will complete time namespace virtualisation
with vDSO support.

Co-developed-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20191112012724.250792-12-dima@arista.com
kernel/time/alarmtimer.c
kernel/time/posix-stubs.c
kernel/time/posix-timers.c