Re: [PATCH 1/3] x86, random: Enable the RDSEED instruction

From: Ingo Molnar
Date: Wed Mar 05 2014 - 03:44:14 EST



* H. Peter Anvin <hpa@xxxxxxxxxxxxxxx> wrote:

> From: "H. Peter Anvin" <hpa@xxxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxx>
> ---
> arch/x86/include/asm/archrandom.h | 34 +++++++++++++++++++++++++++++++++-
> include/linux/random.h | 16 ++++++++++++++++
> 2 files changed, 49 insertions(+), 1 deletion(-)

Reviewed-by: Ingo Molnar <mingo@xxxxxxxxxx>

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/