]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8f140b7496c9791325741f3e6b8cf51fd2f613e3
tree4ce9e61ae36a8261d41d8bae1a4c8a78b3d04416
parent48a3c0194da8724ebf58c5547a58a3effb45c527
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