summaryrefslogtreecommitdiffstats
path: root/include/linux/random.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-04 11:16:01 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-07-14 20:17:44 -0400
commita2080a67abe9e314f9e9c2cc3a4a176e8a8f8793 (patch)
tree47506f87de3ec08934d3333980b29a15cc86e764 /include/linux/random.h
parent902c098a3663de3fa18639efbb71b6080f0bcd3c (diff)
downloadop-kernel-dev-a2080a67abe9e314f9e9c2cc3a4a176e8a8f8793.zip
op-kernel-dev-a2080a67abe9e314f9e9c2cc3a4a176e8a8f8793.tar.gz
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
Diffstat (limited to 'include/linux/random.h')
-rw-r--r--include/linux/random.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/random.h b/include/linux/random.h
index 6ef39d7..e14b438 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -50,6 +50,7 @@ struct rnd_state {
extern void rand_initialize_irq(int irq);
+extern void add_device_randomness(const void *, unsigned int);
extern void add_input_randomness(unsigned int type, unsigned int code,
unsigned int value);
extern void add_interrupt_randomness(int irq, int irq_flags);
OpenPOWER on IntegriCloud