lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Apr 2021 18:54:41 +0300
From:   "Kirill A. Shutemov" <kirill@...temov.name>
To:     Dave Hansen <dave.hansen@...el.com>
Cc:     Kuppuswamy Sathyanarayanan 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
        Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Raj Ashok <ashok.raj@...el.com>,
        Sean Christopherson <seanjc@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC v1 22/26] x86/tdx: Exclude Shared bit from __PHYSICAL_MASK

On Thu, Apr 01, 2021 at 01:13:16PM -0700, Dave Hansen wrote:
> > @@ -56,6 +61,9 @@ static void tdx_get_info(void)
> >  
> >  	td_info.gpa_width = rcx & GENMASK(5, 0);
> >  	td_info.attributes = rdx;
> > +
> > +	/* Exclude Shared bit from the __PHYSICAL_MASK */
> > +	physical_mask &= ~tdx_shared_mask();
> >  }
> 
> I wish we had all of these 'physical_mask' manipulations in a single
> spot.  Can we consolidate these instead of having TDX and SME poke at
> them individually?

SME has to do it very early -- from __startup_64() -- as it sets the bit
on all memory, except what used for communication. TDX can postpone as we
don't need any shared mapping in very early boot.

Basically, to make it done from the same place we would need to move TDX
enumeration earlier into boot. It's risky: everything is more fragile
there.

I would rather keep it as is. We should be fine as long as we only allow
to clear bits from the mask.

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ