Re: [Y2038] [PATCH] crypto: use timespec64 for jent_get_nstime

From: Stephan Mueller
Date: Tue Jun 21 2016 - 13:18:34 EST


Am Dienstag, 21. Juni 2016, 10:12:24 schrieb John Stultz:

Hi John,
>
> So this is definitely more clear then what was described earlier, and
> worries me because on many x86 machines (though fewer I guess these
> days then in the past) the clocksource will often not be the TSC (and
> have lower resolution).

Please note, the use of the ktime_get_raw_ns() is *only* used as a fallback on
architectures where random_get_entropy / get_cycles is not implemented.

So, on X86 and on many other arches, this function call will never be
triggered.

...
>
> But please just make sure the reason why you're using that specific
> interface is clearly documented in the code so we don't have to later
> reverse engineer the intent.

Will do.

@Arnd: I would prepare a patch then using ktime_get_raw_ns and providing a
good documentation in the code.

Ciao
Stephan