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

From: Jason A. Donenfeld
Date: Thu May 05 2022 - 07:36:19 EST


On Thu, May 5, 2022 at 1:34 PM David Laight <David.Laight@xxxxxxxxxx> 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