Hi Linus,
On Thu, 5 Sep 2013, Linus Walleij wrote:
Atleast eight bytes of this number are totally unique for the device
it seems, so this is a perfect candidate for feeding the entropy
pool. One byte more or less of constants does not matter so feed in
the entire OID struct.
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Paul Walmsley <paul@pwsan.com>
Reviewed-by: Kevin Hilman <redacted>
Signed-off-by: Linus Walleij <redacted>
Heh, that function name "add_device_randomness()" is a bit misleading.
It's not actually intended to add "randomness": from
drivers/char/random.c:
/*
* Add device- or boot-specific data to the input and nonblocking
* pools to help initialize them to unique values.
*
* None of this adds any entropy, it is meant to avoid the
* problem of the nonblocking pool having similar initial state
* across largely identical devices.
*/
But of course the function name is not your fault :-) The entropy count
isn't increased by this, so:
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Thanks Linus.
- Paul