From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Harald Freudenberger <freude@linux.ibm.com>
Cc: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
Ard Biesheuvel <ardb@kernel.org>,
Holger Dengler <dengler@linux.ibm.com>
Subject: Re: [PATCH] hw_random: treat default_quality as a maximum and default to 1024
Date: Mon, 7 Nov 2022 12:18:04 +0100 [thread overview]
Message-ID: <Y2jpbDnEqlOT6RoB@zx2c4.com> (raw)
In-Reply-To: <a0863b503b22b42fb8129b6847188a2e@linux.ibm.com>
Hi Harald,
On Mon, Nov 07, 2022 at 10:24:42AM +0100, Harald Freudenberger wrote:
> Well, I am not sure if this is the right way to go. So by default a
> hw rng which does not implement the registration correctly is
> rewarded with the implicit assumption that it produces 100% of
> entropy.
> I see your point - a grep through the kernel code gives the impression
> that a whole bunch of registrations is done with an empty quality
> field. What about assuming a default quality of 50% if the field
> is not filled ?
The vast majority of hardware RNGs do *not* work this way. The
reasonable assumption is to assume that a hardware RNG provides fully
random bits, unless the documentation leads the driver author to specify
something less.
Really, just quit with all the nutty mailing list stuff here. Next: "how
about 74.4% because that matches the vibrations of cedar trees"... If
you want this to be different on a particular kernel, you can set your
exact value as a command line. This patch here is simply about a
sensible default.
Jason
prev parent reply other threads:[~2022-11-07 11:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 15:42 [PATCH] hw_random: treat default_quality as a maximum and default to 1024 Jason A. Donenfeld
2022-11-06 7:05 ` Dominik Brodowski
2022-11-06 14:40 ` Jason A. Donenfeld
2022-11-07 7:35 ` Dominik Brodowski
2022-11-07 11:13 ` Jason A. Donenfeld
2022-11-07 12:04 ` Jason A. Donenfeld
2022-11-07 12:24 ` [PATCH v2] " Jason A. Donenfeld
2022-11-07 12:44 ` Dominik Brodowski
2022-11-18 9:10 ` Herbert Xu
2022-11-07 9:24 ` [PATCH] " Harald Freudenberger
2022-11-07 11:18 ` Jason A. Donenfeld [this message]
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=Y2jpbDnEqlOT6RoB@zx2c4.com \
--to=jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=dengler@linux.ibm.com \
--cc=freude@linux.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.