From: "Theodore Ts'o" <tytso@mit.edu>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
Dominik Brodowski <linux@dominikbrodowski.net>
Subject: Re: [PATCH v2] random: mix build-time latent entropy into pool at init
Date: Thu, 31 Mar 2022 13:55:20 -0400 [thread overview]
Message-ID: <YkXrCMKxwFT3dT8y@mit.edu> (raw)
In-Reply-To: <20220331152641.169301-1-Jason@zx2c4.com>
On Thu, Mar 31, 2022 at 11:26:41AM -0400, Jason A. Donenfeld wrote:
> Prior, the "input_pool_data" array needed no real initialization, and so
> it was easy to mark it with __latent_entropy to populate it during
> compile-time. In switching to using a hash function, this required us to
> specifically initialize it to some specific state, which means we
> dropped the __latent_entropy attribute. An unfortunate side effect was
> this meant the pool was no longer seeded using compile-time random data.
> In order to bring this back, we declare an array in rand_initialize()
> with __latent_entropy and call mix_pool_bytes() on that at init, which
> accomplishes the same thing as before. We make this __initconst, so that
> it doesn't take up space at runtime after init.
>
> Fixes: 6e8ec2552c7d ("random: use computational hash for entropy extraction")
> Cc: Dominik Brodowski <linux@dominikbrodowski.net>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
LGTM
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
next prev parent reply other threads:[~2022-03-31 17:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220331150706.124075-1-Jason@zx2c4.com>
2022-03-31 15:26 ` [PATCH v2] random: mix build-time latent entropy into pool at init Jason A. Donenfeld
2022-03-31 16:02 ` Michael Brooks
2022-03-31 18:21 ` Theodore Ts'o
2022-03-31 17:55 ` Theodore Ts'o [this message]
2022-04-02 4:44 ` Sandy Harris
2022-04-02 13:48 ` Jason A. Donenfeld
2022-04-04 23:27 ` Eric Biggers
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=YkXrCMKxwFT3dT8y@mit.edu \
--to=tytso@mit.edu \
--cc=Jason@zx2c4.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
/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