aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/random.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-16 12:15:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-16 12:15:21 -0400
commit0d2ecee2bdb2a19d04bc5cefac0f86e790f1aad4 (patch)
tree2e0f08819a57e2c191f6e7fe2b2cd2f2415143bd /drivers/char/random.c
parent3ae2a1ce2e7b70254e5c9e465adefac9cba191d6 (diff)
parentf07ef1de9baeb2add514c51f59d4bc3c659c2ca4 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: tcrypt - do not attempt to write to readonly variable random: update interface comments to reflect reality crypto: picoxcell - add support for the picoxcell crypto engines crypto: sha1 - Add test vector to test partial block processing hwrng: omap - Convert release_resource to release_region/release_mem_region crypto: aesni-intel - Fix remaining leak in rfc4106_set_hash_key crypto: omap-sham - don't treat NULL clk as an error crypto: omap-aes - don't treat NULL clk as an error crypto: testmgr - mark ghash as fips_allowed crypto: testmgr - mark xts(aes) as fips_allowed crypto: skcipher - remove redundant NULL check hwrng: pixocell - add support for picoxcell TRNG crypto: aesni-intel - Don't leak memory in rfc4106_set_hash_subkey
Diffstat (limited to 'drivers/char/random.c')
-rw-r--r--drivers/char/random.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 72a4fcb1774..5e29e8031bb 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -128,6 +128,7 @@
128 * void add_input_randomness(unsigned int type, unsigned int code, 128 * void add_input_randomness(unsigned int type, unsigned int code,
129 * unsigned int value); 129 * unsigned int value);
130 * void add_interrupt_randomness(int irq); 130 * void add_interrupt_randomness(int irq);
131 * void add_disk_randomness(struct gendisk *disk);
131 * 132 *
132 * add_input_randomness() uses the input layer interrupt timing, as well as 133 * add_input_randomness() uses the input layer interrupt timing, as well as
133 * the event type information from the hardware. 134 * the event type information from the hardware.
@@ -136,9 +137,15 @@
136 * inputs to the entropy pool. Note that not all interrupts are good 137 * inputs to the entropy pool. Note that not all interrupts are good
137 * sources of randomness! For example, the timer interrupts is not a 138 * sources of randomness! For example, the timer interrupts is not a
138 * good choice, because the periodicity of the interrupts is too 139 * good choice, because the periodicity of the interrupts is too
139 * regular, and hence predictable to an attacker. Disk interrupts are 140 * regular, and hence predictable to an attacker. Network Interface
140 * a better measure, since the timing of the disk interrupts are more 141 * Controller interrupts are a better measure, since the timing of the
141 * unpredictable. 142 * NIC interrupts are more unpredictable.
143 *
144 * add_disk_randomness() uses what amounts to the seek time of block
145 * layer request events, on a per-disk_devt basis, as input to the
146 * entropy pool. Note that high-speed solid state drives with very low
147 * seek times do not make for good sources of entropy, as their seek
148 * times are usually fairly consistent.
142 * 149 *
143 * All of these routines try to estimate how many bits of randomness a 150 * All of these routines try to estimate how many bits of randomness a
144 * particular randomness source. They do this by keeping track of the 151 * particular randomness source. They do this by keeping track of the