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] [day] [month] [year] [list]
Date:   Fri, 15 Oct 2021 00:45:15 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Tom Lendacky <thomas.lendacky@....com>
Cc:     "Kuppuswamy, Sathyanarayanan" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, "H . Peter Anvin" <hpa@...or.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
        Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 05/10] x86/tdx: Handle port I/O

On Thu, Sep 23, 2021, Tom Lendacky wrote:
> On 9/23/21 12:24 PM, Kuppuswamy, Sathyanarayanan wrote:
> > Any reason for using sev_enable_key over CC attribute? IMO, CC attribute
> > exist to generalize the common feature code. My impression is SEV is
> > specific to AMD code.

Unless CC attributes have static_<whatever> support, that would add a CMP+Jcc to
every I/O instruction in the kernel.

> When the SEV series was initially submitted, it originally did an
> sev_active() check. For various reasons a static key and the
> sev_key_active() call was requested.
> 
> My suggestion was to change the name to something that doesn't have SEV/sev
> in it that can be used by both SEV and TDX. The sev_enable_key can be moved
> to a common file (maybe cc_platform.c) and renamed. Then
> arch/x86/include/asm/io.h can change the #ifdef from CONFIG_AMD_MEM_ENCRYPT
> to CONFIG_ARCH_HAS_CC_PLATFORM.
> 
> Not sure if anyone else feels the same, though, so just my suggestion.

+1 to a static key to gate high volume and/or performance critical things that
are common to SEV and TDX.

Powered by blists - more mailing lists