Re: [PATCH v3 2/3] fs/proc: apply the time namespace offset to /proc/stat btime

2020-10-15 Thread Michael Weiß
On 15.10.20 09:53, Andrei Vagin wrote: > On Sun, Oct 11, 2020 at 04:59:23PM +0200, Michael Weiß wrote: >> @@ -79,6 +80,20 @@ static u64 get_iowait_time(struct kernel_cpustat *kcs, >> int cpu) >> >> #endif >> >> +static void get_boottime(struct timespec64 *ts) >> +{ > >> +ktime_t

Re: [PATCH v3 2/3] fs/proc: apply the time namespace offset to /proc/stat btime

2020-10-15 Thread Andrei Vagin
On Sun, Oct 11, 2020 at 04:59:23PM +0200, Michael Weiß wrote: > @@ -79,6 +80,20 @@ static u64 get_iowait_time(struct kernel_cpustat *kcs, int > cpu) > > #endif > > +static void get_boottime(struct timespec64 *ts) > +{ > + ktime_t boottime; > + > + /* get kernel internal system boot

[PATCH v3 2/3] fs/proc: apply the time namespace offset to /proc/stat btime

2020-10-11 Thread Michael Weiß
'/proc/stat' provides the field 'btime' which states the time stamp of system boot in seconds. In case of time namespaces, the offset to the boot time stamp was not applied earlier. However, in container runtimes which utilize time namespaces to virtualize boottime of a container, this leaks