Linux Integrity Measurement development
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: Jarkko Sakkinen <jarkko@kernel.org>
Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	Stefano Garzarella <sgarzare@redhat.com>
Subject: [RFC PATCH 0/3] tpm: add send_recv() op and use it in tpm_ftpm_tee and tpm_svsm drivers
Date: Tue, 11 Mar 2025 11:01:27 +0100	[thread overview]
Message-ID: <20250311100130.42169-1-sgarzare@redhat.com> (raw)

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


             reply	other threads:[~2025-03-11 10:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11 10:01 Stefano Garzarella [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250311100130.42169-1-sgarzare@redhat.com \
    --to=sgarzare@redhat.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox