Re: [PATCH v2 2/4] time: make getboottime64 aware of time namespace

From: Thomas Gleixner
Date: Sat Oct 10 2020 - 19:14:53 EST


Michael,

On Sat, Oct 10 2020 at 13:50, Michael Weiß wrote:
> On 10.10.20 09:19, Andrei Vagin wrote:
>> And I think we need to consider an option to not change getbootime64 and
>> apply a timens offset right in the show_stat(fs/proc/stat.c)
>> function.

That's what I meant and failed to express correctly.

> Since the problems in softirq context mentioned from Thomas,
> I would agree to Andrei's option to just patch proc/stat.c and leave
> getboottime64 unchanged.
>
> Digging around in the kernel tree, I just found /proc/stat as the only
> place where boottime is exposed to userspace, thus it seems a valid
> option.

Yes, I thought about a wrapper function which adds the namespace offset,
but as it is the only place, open coding is fine.

Thanks,

tglx