lkml.org 
[lkml]   [2014]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2014-03-06 15:02    [W:0.078 / U:1.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site