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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YLfOApYdX/KL1wKF@zn.tnic>
Date:   Wed, 2 Jun 2021 20:29:22 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Tom Lendacky <thomas.lendacky@....com>
Cc:     Sean Christopherson <seanjc@...gle.com>,
        Kuppuswamy Sathyanarayanan 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        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>, linux-kernel@...r.kernel.org
Subject: Re: [RFC v2-fix-v2 1/1] x86: Introduce generic protected guest
 abstraction

On Wed, Jun 02, 2021 at 01:15:23PM -0500, Tom Lendacky wrote:
> The original suggestion from Boris, IIRC, was for protected_guest_has()
> function (below) to be:
> 
> 	if (intel)
> 		return intel_protected_guest_has();
> 	else if (amd)
> 		return amd_protected_guest_has();
> 	else
> 		return false;
> 
> And then you could check for TDX or SME/SEV in the respective functions.

Yeah, a single function call which calls vendor-specific functions.

If you can point me to a tree with your patches, I can try to hack up
what I mean.

> I believe Boris was wanting to replace the areas where sme_active() was
> specifically checked, too. And so protected_guest_has() can be confusing...

We can always say

	protected_guest_has(SME_ACTIVE);

or so and then it is clear.

> Maybe naming it protected_os_has() or protection_attr_active() might work.
> This would then work SME or MKTME as well.

But other names are fine too once we're done with the bikeshedding.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ