Add an Armv8 rndr random number providerArmv8.5 adds an optional random number generator. This is implementedas two special registers one to read a random number, the other tore-seed the entropy
Add an Armv8 rndr random number providerArmv8.5 adds an optional random number generator. This is implementedas two special registers one to read a random number, the other tore-seed the entropy pool before reading a random number. Both registerswill set the condition flags to tell the caller they can't produce arandom number in a reasonable amount of time.Without a signal to reseed the entropy pool use the latter registerto provide random numbers to the kernel pool. If at a later time wehad a way to tell the provider if it needs to reseed or not we coulduse the former.On an Amazon AWS Graviton3 VM this never failed, however this may notbe the case on low end CPUs so retry reading the random number 10 timesbefore returning an error.Reviewed by: imp, delphij (csprng)Sponsored by: The FreeBSD FoundationSponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D35411
show more ...