From: Borislav Petkov <bp@suse.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Theodore Ts'o <tytso@mit.edu>, "H . Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH random v2] x86/rdrand: Remove "nordrand" flag in favor of "random.trust_cpu"
Date: Sat, 9 Jul 2022 13:30:52 +0200 [thread overview]
Message-ID: <Yslm7D9E7nXAsPWk@zn.tnic> (raw)
In-Reply-To: <20220709104306.1094431-1-Jason@zx2c4.com>
On Sat, Jul 09, 2022 at 12:43:06PM +0200, Jason A. Donenfeld wrote:
> The decision of whether or not to trust RDRAND is controlled by the
> "random.trust_cpu" boot time parameter or the CONFIG_RANDOM_TRUST_CPU
> compile time default. The "nordrand" flag was added during the early
> days of RDRAND, when there were worries that merely using its values
> could compromise the RNG. However, these days, RDRAND values are not
> used directly but always go through the RNG's hash function, making
> "nordrand" no longer useful.
>
> Rather, the correct switch is "random.trust_cpu", which not only handles
> the relevant trust issue directly, but also is general to multiple CPU
> types, not just x86.
>
> However, x86 RDRAND does have a history of being occasionally
> problematic. Prior, when the kernel would notice something strange, it'd
> warn in dmesg and suggest enabling "nordrand". We can improve on that by
> making the test a little bit better and then taking the step of
> automatically disabling RDRAND if we detect it's problematic.
>
> Also extend the basic sanity test to RDSEED in addition to RDRAND, and
> disable both if either one fails.
>
> Cc: x86@kernel.org
> Cc: Theodore Ts'o <tytso@mit.edu>
> Suggested-by: H. Peter Anvin <hpa@zytor.com>
> Suggested-by: Borislav Petkov <bp@suse.de>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
> This is a tip-ish commit, but it relies on the CONFIG_ARCH_RANDOM commit
> in the random tree, so I'll take this through the random tree to avoid
> conflicts.
Acked-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman
(HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2022-07-09 11:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 0:00 [PATCH] random: remove " Jason A. Donenfeld
2022-07-07 0:12 ` Randy Dunlap
2022-07-07 0:14 ` Jason A. Donenfeld
2022-07-09 10:43 ` [PATCH random v2] x86/rdrand: Remove " Jason A. Donenfeld
2022-07-09 11:30 ` Borislav Petkov [this message]
2022-07-17 11:38 ` [PATCH v3] " Jason A. Donenfeld
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=Yslm7D9E7nXAsPWk@zn.tnic \
--to=bp@suse.de \
--cc=Jason@zx2c4.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=x86@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®