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, 11 Apr 2023 16:04:00 +0200
From:   Juergen Gross <jgross@...e.com>
To:     "Michael Kelley (LINUX)" <mikelley@...rosoft.com>,
        Borislav Petkov <bp@...en8.de>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v5 04/15] x86/mtrr: support setting MTRR state for
 software defined MTRRs

On 11.04.23 15:59, Michael Kelley (LINUX) wrote:
> From: Borislav Petkov <bp@...en8.de> Sent: Tuesday, April 11, 2023 6:21 AM
>>
>> On Sat, Apr 01, 2023 at 08:36:41AM +0200, Juergen Gross wrote:
> 
> [snip]
> 
>>>
>>> +
>>> +	/*
>>> +	 * Only allowed for special virtualization cases:
>>> +	 * - when running as SEV-SNP guest
>>> +	 * - when running as Hyper-V isolated guest
>>
>> 	when running as a SEV-SNP guest on a HyperV with vTOM enabled
>>
>> that's a single condition.
>>
>>> +	 * - when running as Xen PV guest
>>> +	 * - when running as TSX guest
>>> +	 */
>>> +	if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP) &&
>>> +	    !hv_is_isolation_supported() &&
>>> +	    !cpu_feature_enabled(X86_FEATURE_XENPV) &&
>>> +	    !cpu_feature_enabled(X86_FEATURE_TDX_GUEST))
>>
>> IOW:
>>
>> 	if (!(hv_is_isolation_supported() && cc_platform_has(CC_ATTR_GUEST_SEV_SNP)) &&
>> 	    !cpu_feature_enabled(X86_FEATURE_XENPV) &&
>> 	    !cpu_feature_enabled(X86_FEATURE_TDX_GUEST))
>>
> 
> That's doesn't work.  Hyper-V guests with vTOM don't have
> CC_ATTR_GUEST_SEV_SNP.

Yeah, the condition needs to be:

	if (!(hv_is_isolation_supported() ||
	      cc_platform_has(CC_ATTR_GUEST_SEV_SNP)) &&
  	    !cpu_feature_enabled(X86_FEATURE_XENPV) &&
  	    !cpu_feature_enabled(X86_FEATURE_TDX_GUEST))

This is equivalent to the condition in my patch.


Juergen

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ