Messages in this thread | | | Date | Wed, 14 Feb 2024 18:30:35 +0100 | From | "Jason A. Donenfeld" <> | Subject | Re: [PATCH 1/2] x86/random: Retry on RDSEED failure |
| |
On Mon, Feb 12, 2024 at 08:25:33AM +0000, Reshetova, Elena wrote: > So the change would be around adding the notion of conditional entropy > counting (we will always take input as we do now because it wont hurt), > which would automatically give us a correct behavior in _credit_init_bits() > for initial seeding of crng.
I basically have zero interest in this kind of highly complex addition, and I think that'll lead us back toward how the RNG was in the past. "Entropy counting" is mostly an illusion, at least in terms of doing so from measurement. We've got some heuristics to mitigate "premature first" but these things will mostly only ever be heuristic. If a platform like CoCo knows nothing else will work, then a platform-specific choice like the one in this patch is sufficient to do the trick. And in general, this seems like a weird thing to design around: if the CPU is actually just totally broken and defective, maybe CoCo shouldn't continue executing anyway? So I'm pretty loathe to go in this direction of highly complex policy frameworks and such.
Anyway, based on your last email (and my reply to it), it seems like we're mostly in the clear anyway, and we can rely on RDRAND failure ==> hardware failure.
Jason
| |