Re: [PATCH] random: mix all saved registers into entropy pool

From: H. Peter Anvin
Date: Mon May 19 2014 - 18:18:23 EST


On 05/19/2014 02:23 PM, JÃrn Engel wrote:
> On Mon, 19 May 2014 17:17:19 -0400, JÃrn Engel wrote:
>>
>> Experimentation show this to be an excellent entropy source. Doing 1000
>> boottests with kvm and dumping a hash of the registers for the first
>> 1024 interrupts each, >40% of all hashes were unique and >80% of all
>> hashes occurred less than once 1% of the time.
>
> And since I previously claimed the opposite, the negative result was
> caused by a kvm oddity. When starting kvm in the background, it will
> run just fine. But when starting kvm with "-nographic" in the
> background, the process gets stopped. No output is generated and the
> output file is not even truncated before kvm is stopped. Therefore
> every single run will have identical kernel output - that of the
> previous run.
>
> With that embarrassment out of the way, I find this approach hugely
> valuable. Even if you disagree with some detail of this patch, we
> should definitely merge something roughly related.
>
> JÃrn
>

I think this is likely to be particularly valuable during boot. I can
see it becoming substantially less valuable after that point, but during
boot is when the most critical.

What I do see as an issue is that the value is probably impossible to
quantify, and so I feel more than a bit queasy about giving it
/dev/random credit. However, making sure the pool is well stirred
during boot is really way more important.

-hpa

--
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/