]> git.baikalelectronics.ru Git - kernel.git/commit
random: create add_device_randomness() interface
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jul 2012 15:16:01 +0000 (11:16 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 15 Jul 2012 00:17:44 +0000 (20:17 -0400)
commita5d00959a10a1b6bd666eaf318e378d712dcfaf4
tree47506f87de3ec08934d3333980b29a15cc86e764
parenta5be15fc0d866215a26849c85d13f1c02eb1e2e7
random: create add_device_randomness() interface

Add a new interface, add_device_randomness() for adding data to the
random pool that is likely to differ between two devices (or possibly
even per boot).  This would be things like MAC addresses or serial
numbers, or the read-out of the RTC. This does *not* add any actual
entropy to the pool, but it initializes the pool to different values
for devices that might otherwise be identical and have very little
entropy available to them (particularly common in the embedded world).

[ Modified by tytso to mix in a timestamp, since there may be some
  variability caused by the time needed to detect/configure the hardware
  in question. ]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
drivers/char/random.c
include/linux/random.h