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: <67d8cde71e75b_201f0294a@dwillia2-xfh.jf.intel.com.notmuch>
Date: Mon, 17 Mar 2025 18:35:35 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>, Dan Williams
	<dan.j.williams@...el.com>
CC: Alexey Gladkov <legion@...nel.org>, <x86@...nel.org>,
	<linux-kernel@...r.kernel.org>, <linux-coco@...ts.linux.dev>, Alexey Gladkov
	<alexey.gladkov@...el.com>, "H . Peter Anvin" <hpa@...or.com>, Joerg Roedel
	<jroedel@...e.de>, Juergen Gross <jgross@...e.com>, <Larry.Dewey@....com>,
	Nikunj A Dadhania <nikunj@....com>, Tom Lendacky <thomas.lendacky@....com>
Subject: Re: [RFC PATCH v1 1/3] x86/tdx: Make TDX metadata available via SYSFS

Kirill A . Shutemov wrote:
> On Fri, Mar 14, 2025 at 04:42:31PM -0700, Dan Williams wrote:
> > Alexey Gladkov wrote:
> > > From: "Alexey Gladkov (Intel)" <legion@...nel.org>
> > > 
> > > Expose the TDX module information to userspace. The version information
> > > is valuable for debugging, as knowing the exact module version can help
> > > reproduce TDX-related issues.
> > > 
> > > Signed-off-by: Alexey Gladkov (Intel) <legion@...nel.org>
> > > ---
> > >  arch/x86/Kconfig                  |  1 +
> > >  arch/x86/include/asm/shared/tdx.h |  2 +
> > >  arch/x86/include/asm/tdx.h        | 12 +++++
> > >  arch/x86/virt/vmx/tdx/tdx.c       | 74 +++++++++++++++++++++++++++++++
> > >  4 files changed, 89 insertions(+)
> > > 
[..]
> > > +__init static int tdh_sysfs_init(void)
> > > +{
> > > +	struct kobject *tdx_kobj;
> > > +	int ret;
> > > +
> > > +	if (!hypervisor_kobj)
> > > +		return -ENOMEM;
> > > +
> > > +	tdx_kobj = kobject_create_and_add("tdx", hypervisor_kobj);
> > 
> > So this "/sys/hypervisor" proposal is clearly unaware of some other
> > discussions that have been happening around sysfs ABI for TEE Security
> > Managers like the PSP or TDX Module [1]. That PCI/TSM series discusses
> > the motivation for a bus/class + device model, not just raw hand-crafted
> > kobjects.
> > 
> > My other concern for hand-crafted kobjects is that it also destroys the
> > relationship with other existing objects. A /sys/hypervisor/$technology
> > is awkward when ABI like Documentation/ABI/testing/sysfs-driver-ccp
> > already exists.
> > 
> > So, no, I am not on board with this proposal. There are already patches
> > in flight to have TDX create a 'struct device' object that plays a
> > similar role as the PSP device object. For any potential common
> > attributes across vendors the proposal is that be handled via a typical
> > sysfs class device construction that links back to the $technology
> > device. That "tsm" class device is present in the PCI/TSM series [1].
> > 
> > [1]: http://lore.kernel.org/174107245357.1288555.10863541957822891561.stgit@dwillia2-xfh.jf.intel.com
> 
> Dan, could you elaborate on what is actual proposal? I am not sure I
> understand what 'struct device' can have info on TDX module version be
> attached to it.

Confused, you do not understand that devices can have sysfs attributes?

Documentation/ABI/testing/sysfs-driver-ccp describes a device object and
sysfs attributes for SEV-SNP firmware status.

For TDX, the proposal is to create virtual device to stand in for the
lack of a PCI device that fills the same role as AMD PSP.

With the expectation that all TSM technolgies (SEV-SNP, TDX, CCA, etc)
register a device, udev rules can trigger off a common class device
uevent. That proposal is detailed here [1]:

[1]: http://lore.kernel.org/174107247268.1288555.9365605713564715054.stgit@dwillia2-xfh.jf.intel.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ