OSDN Git Service

hwrng: create filler thread
authorTorsten Duwe <duwe@lst.de>
Sun, 15 Jun 2014 03:46:03 +0000 (23:46 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 15 Jul 2014 08:49:40 +0000 (04:49 -0400)
commitbe4000bc4644d027c519b6361f5ae3bbfc52c347
tree4ce9e61ae36a8261d41d8bae1a4c8a78b3d04416
parentc84dbf61a7b322188d2a7fddc0cc6317ac6713e2
hwrng: create filler thread

This can be viewed as the in-kernel equivalent of hwrngd;
like FUSE it is a good thing to have a mechanism in user land,
but for some reasons (simplicity, secrecy, integrity, speed)
it may be better to have it in kernel space.

This patch creates a thread once a hwrng registers, and uses
the previously established add_hwgenerator_randomness() to feed
its data to the input pool as long as needed. A derating factor
is used to bias the entropy estimation and to disable this
mechanism entirely when set to zero.

Signed-off-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: H. Peter Anvin <hpa@zytor.com>
drivers/char/hw_random/core.c