]> git.ipfire.org Git - thirdparty/rng-tools.git/commit
rdrand: Enable the RDSEED instruction
authorH. Peter Anvin <hpa@linux.intel.com>
Tue, 4 Mar 2014 23:24:39 +0000 (15:24 -0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 4 Mar 2014 23:24:39 +0000 (15:24 -0800)
commitf655a53acbb2ca6df707577d2a20cc938d61157f
tree4a0f037c9ef7fc3ce39ff22e30bc0b8edcca274b
parent3e89e082e8f716fec82f21ca888b36b70177712f
rdrand: Enable the RDSEED instruction

Enable the use of the RDSEED instruction.  Since RDSEED can more
easily be starved of entropy due to use on other threads, allow it to
fall back to RDRAND by having a function which for every RDSEED
failure executes RDRAND and stores a sample in a separate buffer.

The RDRAND buffer and its high water mark are made static so that they
can accumulate data across multiple invocations.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
rdrand_asm.S
rngd_rdrand.c