Re: [PATCH v4] x86/coco: Require seeding RNG with RDRAND on CoCo systems

From: Jason A. Donenfeld
Date: Fri Feb 23 2024 - 20:15:59 EST


Hi Tom,

On Fri, Feb 23, 2024 at 11:05 PM Tom Lendacky <thomas.lendacky@xxxxxxx> wrote:
>
> On 2/21/24 20:05, Jason A. Donenfeld wrote:
> > +
> > + if (cc_vendor == CC_VENDOR_NONE)
>
> I responded to an earlier version of this patch, adding that response here:
>
> You probably want to use:
>
> if (!cc_platform_has(CC_GUEST_MEM_ENCRYPT))
> return;
>
> Otherwise, you can hit the bare-metal case where AMD SME is active and
> then cc_vendor will not be CC_VENDOR_NONE.

Nice catch, thanks. I'll do that for v+1.


Jason