Re: [Y2038] [PATCH v2 08/10] fix get_timespec64() for y2038 safe compat interfaces

From: Ben Hutchings
Date: Sun Dec 17 2017 - 18:52:06 EST


On Fri, 2017-12-15 at 13:02 +0100, Arnd Bergmann wrote:
[...]
> - I had an idea to handle the copying of timespec/timeval with a
> one-size-fits-all
> Â function and multiple wrappers around it, such as
>
> enum user_ts_type {
> ÂÂÂÂÂÂUSER_TS_TIMEVAL = 1,
> ÂÂÂÂÂÂUSER_TS_32 = 2,
> ÂÂÂÂÂÂUSER_TS_CLEARNSEC = 4,
> ÂÂÂÂÂÂUSER_TS_NOCHECK = 8,
> };
[...]
> While working on the driver patches I encountered lots of different
> combinations of
> those that might be interesting here, so we could have wrappers for
> the most common
> ones and call get_timestruct() and put_timestruct() directly for the
> less common
> variations. Am I taking it too far here, or would that make sense?

I don't think I've reviewed enough time-handling stuff to know, but I
can certainly believe that this could be worth doing.

Ben.

--
Ben Hutchings
Software Developer, Codethink Ltd.