Re: [PATCH 05/32] timerfd/timens: Take into account ns clock offsets

2019-02-06 Thread Andrei Vagin
On Wed, Feb 06, 2019 at 11:52:03AM +0300, Cyrill Gorcunov wrote: > On Wed, Feb 06, 2019 at 12:10:39AM +, Dmitry Safonov wrote: > > From: Andrei Vagin > > > > Make timerfd respect timens offsets. > > Provide two helpers timens_clock_to_host() timens_clock_from_host() that > > are useful to

Re: [PATCH 05/32] timerfd/timens: Take into account ns clock offsets

2019-02-06 Thread Cyrill Gorcunov
On Wed, Feb 06, 2019 at 11:52:03AM +0300, Cyrill Gorcunov wrote: ... > > > > - if ((flags & ~TFD_SETTIME_FLAGS) || > > -!itimerspec64_valid(new)) > > - return -EINVAL; > > Please don't defer this early test of a @flags value. Otherwise > if @flags is invalid you continue

Re: [PATCH 05/32] timerfd/timens: Take into account ns clock offsets

2019-02-06 Thread Cyrill Gorcunov
On Wed, Feb 06, 2019 at 12:10:39AM +, Dmitry Safonov wrote: > From: Andrei Vagin > > Make timerfd respect timens offsets. > Provide two helpers timens_clock_to_host() timens_clock_from_host() that > are useful to wire up timens to different kernel subsystems. > Following patches will use

[PATCH 05/32] timerfd/timens: Take into account ns clock offsets

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Make timerfd respect timens offsets. Provide two helpers timens_clock_to_host() timens_clock_from_host() that are useful to wire up timens to different kernel subsystems. Following patches will use timens_clock_from_host(), added here for completeness. Signed-off-by: Andrei