From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
"Jason A . Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH 0/4] hw_random: introduce rng_quality sysfs attribute
Date: Sun, 13 Feb 2022 21:46:27 +0100 [thread overview]
Message-ID: <20220213204631.354247-1-linux@dominikbrodowski.net> (raw)
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
next reply other threads:[~2022-02-13 20:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-13 20:46 Dominik Brodowski [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220213204631.354247-1-linux@dominikbrodowski.net \
--to=linux@dominikbrodowski.net \
--cc=Jason@zx2c4.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®