sys/sysinfo: Respect boottime inside time namespace

The sysinfo() syscall includes uptime in seconds but has no correction for
time namespaces which makes it inconsistent with the /proc/uptime inside of
a time namespace.

Add the missing time namespace adjustment call.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Dmitry Safonov <dima@arista.com>
Link: https://lkml.kernel.org/r/20200303150638.7329-1-chrubis@suse.cz

authored by Cyril Hrubis and committed by Thomas Gleixner ecc421e0 98d54f81

+2
+2
kernel/sys.c
··· 47 47 #include <linux/syscalls.h> 48 48 #include <linux/kprobes.h> 49 49 #include <linux/user_namespace.h> 50 + #include <linux/time_namespace.h> 50 51 #include <linux/binfmts.h> 51 52 52 53 #include <linux/sched.h> ··· 2547 2546 memset(info, 0, sizeof(struct sysinfo)); 2548 2547 2549 2548 ktime_get_boottime_ts64(&tp); 2549 + timens_add_boottime(&tp); 2550 2550 info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0); 2551 2551 2552 2552 get_avenrun(info->loads, 0, SI_LOAD_SHIFT - FSHIFT);