| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
| |
Caught by rpmlint.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
The DRNG entropy source, if present, is going to be orders of
magnitudes faster than most other sources, so initialize it
first so that it shows up first in the list.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FIPS tests have a measured false positive error rate of
approximately 1:1250. In order to not permanently disable a
functioning random number source under high traffic, allow
one failure per 1000 successful blocks.
However, never allow more than 25 subsequent failures; this is
handled by not allowing the failures counter to go below zero.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
If /dev/hwrng is avaiable, do not open the TPM. Newer kernels export
TPM randomness via /dev/hwrng; this properly handles multiplexing of
the TPM so that we don't interfere with TrouSerS. Thus, we don't want
to open /dev/tpm0 if we can open /dev/hwrng.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
|
| |
If we fail to write write_wakeup_threshold, log a warning but
continue.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The pointers were confused in such a way that the AES data reduction
wasn't actually being performed. Furthermore, architecturally we need
a 512:1 data reduction, rather than 128:1. Finally, initialize the IV
to random value during startup and remove some unnecessary buffer
shuffling.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Move all the DRNG code to a separate file, and make sure it is
properly stubbed out on non-x86. Furthermore, fix the CPUID bits we
check for; in particular we need AES-ni for the whitening code.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
| |
There is no reason for the stack to be executable.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Change the default device name for the hardware random number device
from /dev/hw_random to /dev/hwrng, which is the filename documented in
devices.txt and appears to be the device name created by udev and
devtmpfs.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The kernel.random.write_wakeup_threshold sysctl needs to be set to the
point where we want poll() on the random device to wake up. This
replaces the level check in ioctl() used during polling.
Set it by default to 3/4 to the value of kernel.random.poolsize.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
| |
() is an acceptable prototype in C++, but C requires (void).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
| |
|
|
|
|
|
| |
Removed timeout variables, parameters, and argument. Poll is now called
with -1 as the timeout.
|
| |
|
|
|
|
| |
Code imported from Project Hail
|
|
|
|
|
|
| |
-q and --quiet flags to suppress error messages from rngd.c
-v and --verbose flags to list available entropy sources
help and man page reflect these changes and have minor fixes
|
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
| |
If all entropy sources are disabled, exit.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
| |
Avoid global namespace clashes.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
|
| |
also, trim trailing whitespace.
Contributed by Dell, with bug fixes by David Howells @ Red Hat.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
|
|
|
|
| |
This matches the most prevalent, current Linux usage.
Imported from RHEL 6 rng-tools.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
|
|
|
| |
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
|
| |
|
| |
|
|
|