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]
Message-ID: <e0447cc1ce172e1c845405c828cd3b6934b85917.camel@intel.com>
Date: Tue, 6 Aug 2024 11:23:34 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "Hansen, Dave" <dave.hansen@...el.com>, "seanjc@...gle.com"
	<seanjc@...gle.com>, "bp@...en8.de" <bp@...en8.de>, "peterz@...radead.org"
	<peterz@...radead.org>, "hpa@...or.com" <hpa@...or.com>, "mingo@...hat.com"
	<mingo@...hat.com>, "Williams, Dan J" <dan.j.williams@...el.com>,
	"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
	"pbonzini@...hat.com" <pbonzini@...hat.com>, "tglx@...utronix.de"
	<tglx@...utronix.de>
CC: "Gao, Chao" <chao.gao@...el.com>, "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>, "binbin.wu@...ux.intel.com"
	<binbin.wu@...ux.intel.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Edgecombe, Rick P"
	<rick.p.edgecombe@...el.com>, "x86@...nel.org" <x86@...nel.org>, "Yamahata,
 Isaku" <isaku.yamahata@...el.com>
Subject: Re: [PATCH v2 06/10] x86/virt/tdx: Refine a comment to reflect the
 latest TDX spec

On Mon, 2024-08-05 at 20:43 -0700, Williams, Dan J wrote:
> Kai Huang wrote:
> > The old versions of "Intel TDX Module v1.5 ABI Specification" contain
> > the definitions of all global metadata field IDs directly in a table.
> > 
> > However, the latest spec moves those definitions to a dedicated
> > 'global_metadata.json' file as part of a new (separate) "Intel TDX
> > Module v1.5 ABI definitions" [1].
> > 
> > Update the comment to reflect this.
> > 
> > [1]: https://cdrdv2.intel.com/v1/dl/getContent/795381
> > 
> > Signed-off-by: Kai Huang <kai.huang@...el.com>
> > ---
> > 
> > v1 -> v2:
> >  - New patch to fix a comment spotted by Nikolay.
> > 
> > ---
> >  arch/x86/virt/vmx/tdx/tdx.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/x86/virt/vmx/tdx/tdx.h b/arch/x86/virt/vmx/tdx/tdx.h
> > index fdb879ef6c45..4e43cec19917 100644
> > --- a/arch/x86/virt/vmx/tdx/tdx.h
> > +++ b/arch/x86/virt/vmx/tdx/tdx.h
> > @@ -29,7 +29,7 @@
> >  /*
> >   * Global scope metadata field ID.
> >   *
> > - * See Table "Global Scope Metadata", TDX module 1.5 ABI spec.
> > + * See the "global_metadata.json" in the "TDX 1.5 ABI definitions".
> >   */
> >  #define MD_FIELD_ID_MAX_TDMRS			0x9100000100000008ULL
> >  #define MD_FIELD_ID_MAX_RESERVED_PER_TDMR	0x9100000100000009ULL
> 
> Given this is JSON any plan to just check-in "global_metadata.json"
> somewhere in tools/ with a script that queries for a set of fields and
> spits them out into a Linux data structure + set of TD_SYSINFO_*_MAP()
> calls? Then no future review bandwidth needs to be spent on manually
> checking offsets names and values, they will just be pulled from the
> script.

This seems a good idea.  I'll add this to my TODO list and evaluate it
first.

One minor issue is some metadata fields may need special handling.  E.g.,
MAX_VCPUS_PER_TD (which is u16) may not be supported by some old TDX
modules, but this isn't an error because we can just treats it as
U16_MAX.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ