Re: [PATCH] crypto: Jitter RNG - consider 32 LSB for APT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 21, 2021 at 03:14:20PM +0100, Stephan Müller wrote:
> The APT compares the current time stamp with a pre-set value. The
> current code only considered the 4 LSB only. Yet, after reviews by
> mathematicians of the user space Jitter RNG version >= 3.1.0, it was
> concluded that the APT can be calculated on the 32 LSB of the time
> delta. Thi change is applied to the kernel.
> 
> This fixes a bug where an AMD EPYC fails this test as its RDTSC value
> contains zeros in the LSB. The most appropriate fix would have been to
> apply a GCD calculation and divide the time stamp by the GCD. Yet, this
> is a significant code change that will be considered for a future
> update. Note, tests showed that constantly the GCD always was 32 on
> these systems, i.e. the 5 LSB were always zero (thus failing the APT
> since it only considered the 4 LSB for its calculation).
> 
> Signed-off-by: Stephan Mueller <smueller@xxxxxxxxxx>
> ---
>  crypto/jitterentropy.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux