Re: [patch 3/3] x86/fpu: Make FPU protection more robust

Jason A. Donenfeld
2022-05-05T11:36:19Z

On Thu, May 5, 2022 at 1:34 PM David Laight <David.Laight@aculab.com> wrote:
>
> ...
> > + cycles_t end, start = get_cycles();
> > blake2s_update(&input_pool.hash, in, nbytes);
> > + end = get_cycles();
>
> If get_cycles() is rdtsc then that gives meaningless numbers.
> The cpu clock frequency will change on you.
>
> You can use one of the performance counters to get an actual

Indeed. In the process of wiring up rdpmc now.

Jason