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] [day] [month] [year] [list]
Message-ID: <4619ca4ec7097678b387e003c76f44c879524a88.camel@intel.com>
Date: Wed, 1 Oct 2025 21:41:02 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "kas@...nel.org" <kas@...nel.org>
CC: "Williams, Dan J" <dan.j.williams@...el.com>, "linux-coco@...ts.linux.dev"
	<linux-coco@...ts.linux.dev>, "yilun.xu@...ux.intel.com"
	<yilun.xu@...ux.intel.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Gao, Chao" <chao.gao@...el.com>,
	"x86@...nel.org" <x86@...nel.org>, "dave.hansen@...ux.intel.com"
	<dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 2/2] coco/tdx-host: Expose TDX module version

On Wed, 2025-10-01 at 12:27 +0100, Kiryl Shutsemau wrote:
> On Wed, Oct 01, 2025 at 04:12:10AM +0000, Huang, Kai wrote:
> > On Tue, 2025-09-30 at 19:22 -0700, Chao Gao wrote:
> > > Currently these is no way to know the TDX module version from the
> > 	    ^
> > 	    there is
> > 
> > > userspace. such information is helpful for bug reporting or
> > 	     ^
> > 	     Such
> > 
> > > debugging.
> > > 
> > > 
> > 
> > [...]
> > 
> > > +static ssize_t version_show(struct device *dev, struct device_attribute *attr,
> > > +			    char *buf)
> > > +{
> > > +	const struct tdx_sys_info *tdx_sysinfo = tdx_get_sysinfo();
> > > +	const struct tdx_sys_info_version *ver;
> > > +
> > > +	if (!tdx_sysinfo)
> > > +		return -ENXIO;
> > > +
> > > +	ver = &tdx_sysinfo->version;
> > > +
> > > +	return sysfs_emit(buf, "%u.%u.%02u\n", ver->major_version,
> > > +					       ver->minor_version,
> > > +					       ver->update_version);
> > 
> > Nit: not sure whether the "%u.%u.%02u" needs a comment, e.g., why the %02u
> > is used for the update_version?
> 
> That's how TDX module version formatted:
> 
> https://github.com/intel/tdx-module/tags
> 
> I think it is good idea to match it.

Yeah agreed!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ