From: Petr Mladek <pmladek@suse.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: Re: [PATCH] random: remove get_random_bytes_arch() and add rng_has_arch_random()
Date: Tue, 17 May 2022 09:54:00 +0200 [thread overview]
Message-ID: <YoNUmF3+lVxIjoik@alley> (raw)
In-Reply-To: <20220514112307.349599-1-Jason@zx2c4.com>
On Sat 2022-05-14 13:23:07, Jason A. Donenfeld wrote:
> The RNG incorporates RDRAND into its state at boot and every time it
> reseeds, so there's no reason for callers to use it directly. The
> hashing that the RNG does on it is preferable to using the bytes raw.
>
> The only current use case of it is vsprintf's siphash key for pointer
> hashing, which uses it to initialize the pointer secret earlier than
> usual if RDRAND is available. In order to replace this narrow use case,
> just expose whether RDRAND is available. With that taken care of, there
> are no users of get_random_bytes_arch() left, so the function can be
> removed.
>
> Later if trust_cpu gets turned on by default (as most distros are
> doing), this one use of rng_has_arch_random() can probably go away as
> well.
>
> Cc: Petr Mladek <pmladek@suse.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Looks good to me. Thanks for the clean up.
Acked-by: Petr Mladek <pmladek@suse.com> # for vsprintf.c
Best Regards,
Petr
prev parent reply other threads:[~2022-05-17 7:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 11:23 [PATCH] random: remove get_random_bytes_arch() and add rng_has_arch_random() Jason A. Donenfeld
2022-05-15 13:18 ` Jason A. Donenfeld
2022-05-15 13:19 ` [PATCH] random: remove mostly unused async readiness notifier Jason A. Donenfeld
2022-05-17 9:04 ` Petr Mladek
2022-05-17 9:48 ` Jason A. Donenfeld
2022-05-17 10:46 ` Petr Mladek
2022-05-18 8:54 ` Petr Mladek
2022-05-18 9:52 ` Jason A. Donenfeld
2022-05-18 9:56 ` [PATCH v2] " Jason A. Donenfeld
2022-05-19 7:10 ` Petr Mladek
2022-05-17 7:54 ` Petr Mladek [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=YoNUmF3+lVxIjoik@alley \
--to=pmladek@suse.com \
--cc=Jason@zx2c4.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.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;
as well as URLs for NNTP newsgroup(s).