Linux Integrity Measurement development
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] tpm: add send_recv() op and use it in tpm_ftpm_tee and tpm_svsm drivers
@ 2025-03-11 10:01 Stefano Garzarella
  2025-03-11 10:01 ` [RFC PATCH 1/3] tpm: add send_recv() op in tpm_class_ops Stefano Garzarella
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stefano Garzarella @ 2025-03-11 10:01 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: linux-integrity, linux-kernel, James Bottomley, Peter Huewe,
	Jason Gunthorpe, Stefano Garzarella

This series is a follow-up to the discussion we had about whether or not
to add send_recv() op in tpm_class_ops[1].

Some devices do not support interrupts and provide a single operation
to send the command and receive the response on the same buffer.
In order to simplify these drivers and avoid temporary buffers to be
used between the .send() and .recv() callbacks, introduce a new callback
send_recv(). This was suggested by Jason Gunthorpe while reviewing
the new SVSM vTPM driver, but the same callback can be used also for the
fTPM driver to simplify it a bit (second patch of this series).
I only successfully compiled fTPM, but I don't know how to test, if anyone
can test or suggest how to do it, I would be grateful.

This series is based on "[PATCH v3 0/4] Enlightened vTPM support for SVSM
on SEV-SNP" [2] (actually only the last patch in this series).

[1] https://lore.kernel.org/linux-integrity/Z8sfiDEhsG6RATiQ@kernel.org/
[2] https://lore.kernel.org/linux-integrity/20250311094225.35129-1-sgarzare@redhat.com/

Stefano Garzarella (3):
  tpm: add send_recv() op in tpm_class_ops
  tpm/tpm_ftpm_tee: use send_recv() op
  tpm/tpm_svsm: use send_recv() op

 drivers/char/tpm/tpm_ftpm_tee.h  |  4 --
 include/linux/tpm.h              |  2 +
 drivers/char/tpm/tpm-interface.c |  7 +++
 drivers/char/tpm/tpm_ftpm_tee.c  | 86 ++++++++------------------------
 drivers/char/tpm/tpm_svsm.c      | 46 ++++-------------
 5 files changed, 39 insertions(+), 106 deletions(-)


base-commit: f2cb83b7f8c58952b424a83bf86680f1263ad417
-- 
2.48.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-20 11:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-11 10:01 [RFC PATCH 0/3] tpm: add send_recv() op and use it in tpm_ftpm_tee and tpm_svsm drivers Stefano Garzarella
2025-03-11 10:01 ` [RFC PATCH 1/3] tpm: add send_recv() op in tpm_class_ops Stefano Garzarella
2025-03-11 10:01 ` [RFC PATCH 2/3] tpm/tpm_ftpm_tee: use send_recv() op Stefano Garzarella
2025-03-13  9:12   ` Sumit Garg
2025-03-13 12:59     ` Jens Wiklander
2025-03-18 10:55       ` Stefano Garzarella
2025-03-11 10:01 ` [RFC PATCH 3/3] tpm/tpm_svsm: " Stefano Garzarella
2025-03-19 19:58   ` Jason Gunthorpe
2025-03-20 11:15     ` Stefano Garzarella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox