rngd: As long as FIPS error rates are low, re-try the same source

Allow for a small number of FIPS errors before advancing to the
next source.  This prevents a high bandwidth source from stalling
out by shifting to a low bandwidth source (e.g. DRNG->TPM) just
because of a single FIPS failure.  FIPS failures are frequent
enough (1:1250) that this happens on a regular basis.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
1 file changed