Skip to content
Commit 80d04b7f authored by George Spelvin's avatar George Spelvin Committed by Michael Ellerman
Browse files

powerpc/crypto: Use cheaper random numbers for crc-vpmsum self-test



This code was filling a 64K buffer from /dev/urandom in order to
compute a CRC over (on average half of) it by two different methods,
comparing the CRCs, and repeating.

This is not a remotely security-critical application, so use the far
faster and cheaper prandom_u32() generator.

And, while we're at it, only fill as much of the buffer as we plan to use.

Signed-off-by: default avatarGeorge Spelvin <lkml@sdf.org>
Acked-by: default avatarDaniel Axtens <dja@axtens.net>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 6917735e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment