Messages in this thread | | | Date | Wed, 5 Mar 2014 09:43:59 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH 1/3] x86, random: Enable the RDSEED instruction |
| |
* H. Peter Anvin <hpa@linux.intel.com> wrote:
> From: "H. Peter Anvin" <hpa@linux.intel.com> > > Upcoming Intel silicon adds a new RDSEED instruction. Whereas RDRAND > returns output from a PRNG, the RDSEED instruction returns fully > conditioned entropy that is suitable for use as seeds to a PRNG. > > The RDSEED instruction takes the same time to execute as RDRAND, but > RDSEED unlike RDRAND can legitimately return failure (CF=0) due to > entropy exhaustion if too many threads on too many cores are hammering > the RDSEED instruction at the same time. Therefore, we have to be > more conservative and only use it in places where we can tolerate > failures. > > This patch introduces the primitives arch_get_random_seed_{int,long}() > but does not use it yet. > > Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> > --- > arch/x86/include/asm/archrandom.h | 34 +++++++++++++++++++++++++++++++++- > include/linux/random.h | 16 ++++++++++++++++ > 2 files changed, 49 insertions(+), 1 deletion(-)
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
| |