lkml.org 
[lkml]   [2014]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] random: Use arch_get_random_seed*() at init time and once a second

* H. Peter Anvin <hpa@linux.intel.com> wrote:

> From: "H. Peter Anvin" <hpa@linux.intel.com>
>
> Use arch_get_random_seed*() in two places in the Linux random
> driver (drivers/char/random.c):
>
> 1. During entropy pool initialization, use RDSEED in favor of RDRAND,
> with a fallback to the latter. Entropy exhaustion is unlikely to
> happen there on physical hardware as the machine is single-threaded
> at that point, but could happen in a virtual machine. In that
> case, the fallback to RDRAND will still provide more than adequate
> entropy pool initialization.
>
> 2. Once a second, issue RDSEED and, if successful, feed it to the
> entropy pool. To ensure an extra layer of security, only credit
> half the entropy just in case.
>
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
> ---
> drivers/char/random.c | 24 ++++++++++++++++++++----
> 1 file changed, 20 insertions(+), 4 deletions(-)

Reviewed-by: Ingo Molnar <mingo@kernel.org>

Thanks,

Ingo


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