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, 18 Jun 2024 23:28:40 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "nik.borisov@...e.com" <nik.borisov@...e.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>, "Hansen, Dave"
	<dave.hansen@...el.com>, "bp@...en8.de" <bp@...en8.de>, "x86@...nel.org"
	<x86@...nel.org>, "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>, "seanjc@...gle.com" <seanjc@...gle.com>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>, "binbin.wu@...ux.intel.com"
	<binbin.wu@...ux.intel.com>, "Yamahata, Isaku" <isaku.yamahata@...el.com>
Subject: Re: [PATCH 3/9] x86/virt/tdx: Support global metadata read for all
 element sizes

On Tue, 2024-06-18 at 14:42 +0300, Nikolay Borisov wrote:
> <snip>
> 
> >   
> > -static int read_sys_metadata_field16(u64 field_id,
> > -				     int offset,
> > -				     void *stbuf)
> > +/*
> > + * Read one global metadata field and store the data to a location of a
> > + * given buffer specified by the offset and size (in bytes).
> > + */
> > +static int stbuf_read_sysmd_field(u64 field_id, void *stbuf, int offset,
> 
> read_system_metadat_field or read_sys_metadata_field or simply
> read_metadata_field

read_sys_metadata_field() is already taken.

What's wrong of stbuf_read_sysmd_field()?  It indicates the function reads
one system metadata field to a structure member.

> 
> > +				  int bytes)
> s/bytes/size
> >   {
> > -	u16 *st_member = stbuf + offset;
> > +	void *st_member = stbuf + offset;
> 
> Again, this could be renamed to just 'member', what value does the 'st' 
> prefix bring?

Will do.

[...]


> >   
> > -#define MD_FIELD_ID_ELE_SIZE_16BIT	1
> > +#define MD_FIELD_BYTES(_field_id)	\
> 
> Just name it MD_FIELD_SIZE, even the MD_FIELD_ID member is called 
> ELEMENT_SIZE_CODE, rather than ELEMENT_BYTES_CODE or some such.

Will do.

I will also change the 'bytes' argument to 'size' in
stbuf_read_sysmd_field() (or whatever name we finally have).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ