linux-coco.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] CoCo/RDRAND brokenness fixes
@ 2024-02-14 19:56 Jason A. Donenfeld
  2024-02-14 19:56 ` [PATCH v2 1/2] x86/archrandom: WARN if RDRAND fails and don't retry Jason A. Donenfeld
  2024-02-14 19:56 ` [PATCH v2 2/2] x86/coco: Require seeding RNG with RDRAND on CoCo systems Jason A. Donenfeld
  0 siblings, 2 replies; 9+ messages in thread
From: Jason A. Donenfeld @ 2024-02-14 19:56 UTC (permalink / raw)
  To: x86, linux-coco, linux-kernel
  Cc: Jason A. Donenfeld, Borislav Petkov, Daniel P . Berrangé,
	Dave Hansen, Elena Reshetova, H . Peter Anvin, Ingo Molnar,
	Kirill A . Shutemov, Theodore Ts'o, Thomas Gleixner

This takes a two-pronged approach to the matter, now that we have
details from Intel and AMD:

- In the generic case, if RDRAND fails, simply WARN(), and don't try
  again. It turns out the "try 10 times" thing isn't actually a correct
  recommendation from Intel. Since RDRAND failure implies CPU failure, a
  WARN() seems in order on all platforms.

- On CoCo machines, where RDRAND failure implies the whole threat model
  is compromised and execution shouldn't continue, we ensure that the
  RNG gets 256-bits of RDRAND at boot, or otherwise fails.

Cc: Borislav Petkov <bp@alien8.de>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Thomas Gleixner <tglx@linutronix.de>

Jason A. Donenfeld (2):
  x86/archrandom: WARN if RDRAND fails and don't retry
  x86/coco: Require seeding RNG with RDRAND on CoCo systems

 arch/x86/coco/core.c              | 37 +++++++++++++++++++++++++++++++
 arch/x86/include/asm/archrandom.h | 18 ++++++---------
 arch/x86/include/asm/coco.h       |  2 ++
 arch/x86/kernel/setup.c           |  2 ++
 4 files changed, 48 insertions(+), 11 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-21 12:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-14 19:56 [PATCH v2 0/2] CoCo/RDRAND brokenness fixes Jason A. Donenfeld
2024-02-14 19:56 ` [PATCH v2 1/2] x86/archrandom: WARN if RDRAND fails and don't retry Jason A. Donenfeld
2024-02-14 19:56 ` [PATCH v2 2/2] x86/coco: Require seeding RNG with RDRAND on CoCo systems Jason A. Donenfeld
2024-02-15  7:30   ` Reshetova, Elena
2024-02-15 13:22     ` Jason A. Donenfeld
2024-02-16  7:57       ` Reshetova, Elena
2024-02-16 18:17         ` Jason A. Donenfeld
2024-02-21  7:52           ` Reshetova, Elena
2024-02-21 12:24             ` Jason A. Donenfeld

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).