lkml.org 
[lkml]   [2022]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 01/21] x86/virt/tdx: Detect SEAM
On Mon, Apr 18, 2022, Sathyanarayanan Kuppuswamy wrote:
> > +static void detect_seam_ap(struct cpuinfo_x86 *c)
> > +{
> > + u64 base, mask;
> > +
> > + /*
> > + * Don't bother to detect this AP if SEAMRR is not
> > + * enabled after earlier detections.
> > + */
> > + if (!__seamrr_enabled())
> > + return;
> > +
> > + rdmsrl(MSR_IA32_SEAMRR_PHYS_BASE, base);
> > + rdmsrl(MSR_IA32_SEAMRR_PHYS_MASK, mask);
> > +
> > + if (base == seamrr_base && mask == seamrr_mask)
> > + return;
> > +
> > + pr_err("Inconsistent SEAMRR configuration by BIOS\n");
>
> Do we need to panic for SEAM config issue (for security)?

No, clearing seamrr_mask will effectively prevent the kernel from attempting to
use TDX or any other feature that might depend on SEAM. Panicking because the
user's BIOS is crappy would be to kicking them while they're down.

As for security, it's the TDX Module's responsibility to validate the security
properties of the system, the kernel only cares about not dying/crashing.

> > + /* Mark SEAMRR as disabled. */
> > + seamrr_base = 0;
> > + seamrr_mask = 0
> > +}

\
 
 \ /
  Last update: 2022-04-19 00:51    [W:0.176 / U:2.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site