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:   Wed, 23 Nov 2022 19:13:33 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     Sathyanarayanan Kuppuswamy 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        "ak@...ux.intel.com" <ak@...ux.intel.com>,
        "arnd@...db.de" <arnd@...db.de>, "bp@...en8.de" <bp@...en8.de>,
        "brijesh.singh@....com" <brijesh.singh@....com>,
        "Williams, Dan J" <dan.j.williams@...el.com>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "jane.chu@...cle.com" <jane.chu@...cle.com>,
        "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
        KY Srinivasan <kys@...rosoft.com>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "luto@...nel.org" <luto@...nel.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        "x86@...nel.org" <x86@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 4/6] x86/hyperv: Add hv_isolation_type_tdx() to detect TDX
 guests

> From: Sathyanarayanan Kuppuswamy
> <sathyanarayanan.kuppuswamy@...ux.intel.com>
> 
> On 11/21/22 11:51 AM, Dexuan Cui wrote:
> > No logic change to SNP/VBS guests.
> 
> Add some info on how and where you are going to use this function.

Will do.

> > +DEFINE_STATIC_KEY_FALSE(isolation_type_tdx);
> > +
> > +bool hv_isolation_type_tdx(void)
> > +{
> > +	return static_branch_unlikely(&isolation_type_tdx);
> > +}
> 
> Does it need #ifdef CONFIG_INTEL_TDX_GUEST? If not TDX, you can
> live with weak reference.

Will add the #ifdef.

> > -		if (IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT)) {
> > -			if (hv_get_isolation_type() != HV_ISOLATION_TYPE_NONE)
> > +		if (IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT) ||
> > +		    IS_ENABLED(CONFIG_INTEL_TDX_GUEST)) {
> > +
> > +			switch (hv_get_isolation_type()) {
> > +			case HV_ISOLATION_TYPE_VBS:
> > +			case HV_ISOLATION_TYPE_SNP:
> >  				cc_set_vendor(CC_VENDOR_HYPERV);
> > +				break;
> > +
> > +			case HV_ISOLATION_TYPE_TDX:
> > +				static_branch_enable(&isolation_type_tdx);
> > +				break;
> > +
> 
> It is not clear why you need special handling for TDX?

It's being discussed in another thread:
https://lwn.net/ml/linux-kernel/BYAPR21MB16886FF8B35F51964A515CD5D70C9@BYAPR21MB1688.namprd21.prod.outlook.com/

I'll wait for Michael Kelley's v4 and rebase my patches accordingly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ