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: <4ukjpckzgbfyef7wrajivc6qzw4ycdudmqdr55rbcz6fsecv5c@yovyjdmhs4tg>
Date: Wed, 1 Oct 2025 12:27:00 +0100
From: Kiryl Shutsemau <kas@...nel.org>
To: "Huang, Kai" <kai.huang@...el.com>
Cc: "linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Gao, Chao" <chao.gao@...el.com>, 
	"x86@...nel.org" <x86@...nel.org>, "Williams, Dan J" <dan.j.williams@...el.com>, 
	"yilun.xu@...ux.intel.com" <yilun.xu@...ux.intel.com>, "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 2/2] coco/tdx-host: Expose TDX module version

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.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ