Re: [RFC PATCH v2 5/6] tpm: add SNP SVSM vTPM driver

2025-03-03 Thread Stefano Garzarella
On Fri, Feb 28, 2025 at 08:28:19PM -0400, Jason Gunthorpe wrote: On Fri, Feb 28, 2025 at 06:07:19PM +0100, Stefano Garzarella wrote: +/* + * tpm_svsm_remove() lives in .exit.text. For drivers registered via + * module_platform_driver_probe() this is ok because they cannot get unbound + * at runt

Re: [RFC PATCH v2 3/6] tpm: add send_recv() ops in tpm_class_ops

2025-03-03 Thread Stefano Garzarella
On Sat, Mar 01, 2025 at 03:45:10AM +0200, Jarkko Sakkinen wrote: On Fri, Feb 28, 2025 at 06:07:17PM +0100, Stefano Garzarella wrote: + int (*send_recv)(struct tpm_chip *chip, u8 *buf, size_t buf_len, +size_t to_send); Please describe the meaning and purpose of to_

Re: [RFC PATCH v2 0/6] Enlightened vTPM support for SVSM on SEV-SNP

2025-03-03 Thread Stefano Garzarella
On Fri, Feb 28, 2025 at 08:30:09PM -0400, Jason Gunthorpe wrote: On Fri, Feb 28, 2025 at 06:07:14PM +0100, Stefano Garzarella wrote: I put RFC back in because we haven't yet decided if this is the best approach to support SVSM vTPM, but I really like to receive feedbacks especially from the main

Re: [RFC PATCH v2 5/6] tpm: add SNP SVSM vTPM driver

2025-03-03 Thread Stefano Garzarella
On Sat, Mar 01, 2025 at 03:51:46AM +0200, Jarkko Sakkinen wrote: On Fri, Feb 28, 2025 at 06:07:19PM +0100, Stefano Garzarella wrote: Add driver for the vTPM defined by the AMD SVSM spec [1]. The specification defines a protocol that a SEV-SNP guest OS can use to discover and talk to a vTPM emul

Re: [PATCH v2 0/2] ima: minimize open-writers and ToMToU violations

2025-03-03 Thread Roberto Sassu
On Fri, 2025-02-28 at 15:55 -0500, Mimi Zohar wrote: > Each time a file in policy, that is already opened for write, is opened > for read, an open-writers integrity violation audit message is emitted > and a violation record is added to the IMA measurement list. > > Similarly each time a file in p

Re: [RFC][PATCH] ima: add measurement for first unverified write on ima policy file

2025-03-03 Thread Enrico Bravi
On Thu, 2025-02-27 at 15:49 +0100, Roberto Sassu wrote: > On Thu, 2025-02-27 at 11:36 +, Enrico  Bravi wrote: > > On Wed, 2025-02-26 at 22:05 -0500, Mimi Zohar wrote: > > > On Wed, 2025-02-26 at 22:53 +, Enrico  Bravi wrote: > > > > On Tue, 2025-02-25 at 20:53 -0500, Mimi Zohar wrote: > > >

Re: [RFC PATCH v2 3/6] tpm: add send_recv() ops in tpm_class_ops

2025-03-03 Thread Tom Lendacky
On 2/28/25 11:07, Stefano Garzarella wrote: > Some devices do not support interrupts and provide a single operation > to send the command and receive the response on the same buffer. > > To support this scenario, a driver could set TPM_CHIP_FLAG_IRQ in the > chip's flags to get recv() to be called

Re: [RFC PATCH v2 4/6] tpm: add interface to interact with devices based on TCG Simulator

2025-03-03 Thread Tom Lendacky
On 2/28/25 11:07, Stefano Garzarella wrote: > This is primarily designed to support an enlightened driver for the > AMD SVSM based vTPM, but it could be used by any TPM driver which > communicates with a TPM device implemented through the TCG TPM reference > implementation (https://github.com/Trust

Re: [RFC PATCH v2 3/6] tpm: add send_recv() ops in tpm_class_ops

2025-03-03 Thread Stefano Garzarella
On Mon, Mar 03, 2025 at 08:06:43AM -0600, Tom Lendacky wrote: On 2/28/25 11:07, Stefano Garzarella wrote: Some devices do not support interrupts and provide a single operation to send the command and receive the response on the same buffer. To support this scenario, a driver could set TPM_CHIP_

Re: [RFC PATCH v2 5/6] tpm: add SNP SVSM vTPM driver

2025-03-03 Thread Jason Gunthorpe
On Mon, Mar 03, 2025 at 05:19:05PM +0100, Stefano Garzarella wrote: > On Fri, Feb 28, 2025 at 08:28:19PM -0400, Jason Gunthorpe wrote: > > On Fri, Feb 28, 2025 at 06:07:19PM +0100, Stefano Garzarella wrote: > > > +/* > > > + * tpm_svsm_remove() lives in .exit.text. For drivers registered via > > >

Re: [RFC PATCH v2 4/6] tpm: add interface to interact with devices based on TCG Simulator

2025-03-03 Thread Stefano Garzarella
On Sat, Mar 01, 2025 at 03:48:35AM +0200, Jarkko Sakkinen wrote: On Fri, Feb 28, 2025 at 06:07:18PM +0100, Stefano Garzarella wrote: This is primarily designed to support an enlightened driver for the The commit message is half-way cut. I.e. it lacks the explanation of "this". Yes, sorry, I

Re: [RFC PATCH v2 4/6] tpm: add interface to interact with devices based on TCG Simulator

2025-03-03 Thread Stefano Garzarella
On Mon, Mar 03, 2025 at 08:28:45AM -0600, Tom Lendacky wrote: On 2/28/25 11:07, Stefano Garzarella wrote: This is primarily designed to support an enlightened driver for the AMD SVSM based vTPM, but it could be used by any TPM driver which communicates with a TPM device implemented through the T

Re: [PATCH v4 0/5] Add support for the TPM FF-A start method

2025-03-03 Thread Jason Gunthorpe
On Sun, Mar 02, 2025 at 09:33:59PM +0200, Jarkko Sakkinen wrote: > WARNING: line length of 102 exceeds 100 columns > #764: FILE: drivers/char/tpm/tpm_crb.c:821: > + FW_BUG "TPM2 ACPI table has wrong size %u for > start method type %d\n", Just ignore that, it is an er