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: <CAGxU2F55VWoBJ92gM+Rora=+_B94PzW+DwRYjsa6=sdS+ZWLVQ@mail.gmail.com>
Date: Wed, 9 Apr 2025 18:51:56 +0200
From: Stefano Garzarella <sgarzare@...hat.com>
To: Tom Lendacky <thomas.lendacky@....com>
Cc: Borislav Petkov <bp@...en8.de>, Jarkko Sakkinen <jarkko@...nel.org>, 
	Dave Hansen <dave.hansen@...ux.intel.com>, Peter Huewe <peterhuewe@....de>, 
	Jason Gunthorpe <jgg@...pe.ca>, "H. Peter Anvin" <hpa@...or.com>, linux-coco@...ts.linux.dev, 
	linux-integrity@...r.kernel.org, Ingo Molnar <mingo@...hat.com>, x86@...nel.org, 
	Joerg Roedel <jroedel@...e.de>, Dionna Glaze <dionnaglaze@...gle.com>, 
	Claudio Carvalho <cclaudio@...ux.ibm.com>, 
	James Bottomley <James.Bottomley@...senpartnership.com>, linux-kernel@...r.kernel.org, 
	Dov Murik <dovmurik@...ux.ibm.com>, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v6 4/4] x86/sev: register tpm-svsm platform device

On Wed, 9 Apr 2025 at 18:08, Tom Lendacky <thomas.lendacky@....com> wrote:
>
> On 4/9/25 06:31, Borislav Petkov wrote:
> > On Wed, Apr 09, 2025 at 12:43:01PM +0200, Stefano Garzarella wrote:
> >> Sorry, maybe I missed something.
> >>
> >> tpm_svsm.c registers the driver with module_platform_driver_probe().
> >>
> >> Someone (the platform I guess) has to register the device by calling
> >> platform_device_register(), as we already do for example for
> >> sev_guest.
> >
> > Maybe that platform device thing is the wrong approach. Why does the core code
> > need to register some dummy platform device in the first place? Why can't
> > drivers/char/tpm/tpm_svsm.c probe and init without it?
>
> I think the platform device is the right approach (just like we do for the
> sev-guest driver), but I think we should only register the device if an
> SVSM is present. Then let the vTPM driver probe routine check if the SVSM
> vTPM support is present.

I see, agree.

>
> So the vTPM driver wouldn't change, just snp_init_platform_device():
>
>         if (snp_vmpl && platform_device_register(&tpm_svsm_device))

I can do if we agree on that.

>
> Looking at the message that is issued after, maybe it should read
> "devices" now.

Good catch, I'll update the pr_info() message!

Thanks,
Stefano


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ