Re: clone3: allow creation of time namespace with offset

Arnd Bergmann
2020-03-19T08:17:03Z

On Thu, Mar 19, 2020 at 9:11 AM Adrian Reber <areber@redhat.com> wrote:

> With Arnd's idea of only using nanoseconds, timens_offset would then
> contain something like this:
>
> struct timens_offset {
> __aligned_s64 monotonic_offset_ns;
> __aligned_s64 boottime_offset_ns;
> };
>
> I kind of prefer adding boottime and monotonic directly to struct clone_args
>
> __aligned_u64 tls;
> __aligned_u64 set_tid;
> __aligned_u64 set_tid_size;
> + __aligned_s64 monotonic_offset_ns;
> + __aligned_s64 boottime_offset_ns;
> };

I would also prefer the second approach using two 64-bit integers
instead of a pointer, as it keeps the interface simpler to implement
and simpler to interpret by other tools.

Arnd