lkml.org 
[lkml]   [2024]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/2] CoCo/RDRAND brokenness fixes
Date
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


\
 
 \ /
  Last update: 2024-05-27 15:04    [W:0.259 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site