mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] hw_random: introduce rng_quality sysfs attribute
@ 2022-02-13 20:46 Dominik Brodowski
  2022-02-13 20:46 ` [PATCH 1/4] hw_random: do not bother to order list of devices by quality Dominik Brodowski
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Dominik Brodowski @ 2022-02-13 20:46 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-kernel, linux-crypto, Jason A . Donenfeld

Currently, the hw_random core exposes a module parameter "current_quality".
However, that is fundamentally broken: If it is set at boot time, it is
overwritten once the first hw rng device is loaded. If it is set at
runtime, it is without effect if the hw rng device had its quality value
set to 0 (and no default_quality was set). If a new rng is selected, it
gets overwritten.

Therefore, let's mark it as obsolete, and replace it with a new sysfs
attribute named "rng_quality". This sets the quality setting of the
hw rng device currently loaded and active, and starts/stops the hwrng
kernel thread as required.

Dominik Brodowski (4):
  hw_random: do not bother to order list of devices by quality
  hw_random: start and stop in-kernel rngd in separate function
  hw_random: use per-rng quality value instead of global setting
  hw_random: introduce rng_quality sysfs attribute

 drivers/char/hw_random/core.c | 145 +++++++++++++++++++++++++---------
 1 file changed, 107 insertions(+), 38 deletions(-)

---
If preferred, the "current_quality" module parameter can be removed
altogether.

-- 
2.35.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-23  2:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-13 20:46 [PATCH 0/4] hw_random: introduce rng_quality sysfs attribute Dominik Brodowski
2022-02-13 20:46 ` [PATCH 1/4] hw_random: do not bother to order list of devices by quality Dominik Brodowski
2022-02-13 20:46 ` [PATCH 2/4] hw_random: start and stop in-kernel rngd in separate function Dominik Brodowski
2022-02-13 20:46 ` [PATCH 3/4] hw_random: use per-rng quality value instead of global setting Dominik Brodowski
2022-02-13 20:46 ` [PATCH 4/4] hw_random: introduce rng_quality sysfs attribute Dominik Brodowski
2022-02-23  2:45 ` [PATCH 0/4] " Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®