public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arun Menon <armenon@redhat.com>
To: Jarkko Sakkinen <jarkko@kernel.org>,
	Stefan Berger <stefanb@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org,
	Jason Gunthorpe <jgg@ziepe.ca>, Peter Huewe <peterhuewe@gmx.de>
Subject: Re: [RFC 0/4] tpm_crb: Add command and response buffer chunking support
Date: Thu, 23 Apr 2026 16:13:27 +0530	[thread overview]
Message-ID: <aen3zxxedDXlekRb@fedora> (raw)
In-Reply-To: <adYTLq0qgWpA1kIS@kernel.org>

On Wed, Apr 08, 2026 at 11:34:54AM +0300, Jarkko Sakkinen wrote:
> On Tue, Mar 24, 2026 at 06:11:11PM +0530, Arun Menon wrote:
> > Hi Jarkko,
> > 
> > On Tue, Mar 24, 2026 at 12:41:26PM +0200, Jarkko Sakkinen wrote:
> > > On Tue, Mar 24, 2026 at 12:47:59PM +0530, Arun Menon wrote:
> > > > The new version of TCG TPM v185 (currently under review [1]) supports
> > > > sending data/commands in chunks for the CRB (Command Response Buffer)
> > > > interface. This is in line with the initiative to support PQC algorithms.
> > > > 
> > > > This series implements the logic to send and receive larger TPM
> > > > cmd/rsp between the linux guest and the TPM backend in chunks.
> > > > Currently, the TPM CRB driver is limited by the physical size of the
> > > > MMIO window. When userspace attempts to send a payload that exceeds this
> > > > size, the driver rejects it.
> > > > 
> > > > This series introduces chunking support. The driver now checks the CRB
> > > > interface capability for CRB_INTF_CAP_CRB_CHUNK. If supported by the
> > > > backend, the driver will slice oversized commands into MMIO-sized
> > > > chunks, signalling the backend via CRB_START_NEXT_CHUNK, and finalizing
> > > > with CRB_START_INVOKE. Responses are also read back in a similar chunked
> > > > manner.
> > > > 
> > > > If the backend does not support chunking, the driver retains its legacy
> > > > behaviour and enforces the standard size limits.
> > > > 
> > > > This feature also requires the QEMU to interpret the data in chunks and
> > > > forward it to the TPM backend and subsequently dispatch the TPM response
> > > > in chunks back to the linux guest. This is implemented in [2]
> > > > 
> > > > [1] https://trustedcomputinggroup.org/wp-content/uploads/PC-Client-Specific-Platform-TPM-Profile-for-TPM-2p0-v1p07_rc1_121225.pdf
> > > > [2] https://lore.kernel.org/qemu-devel/20260319135316.37412-1-armenon@redhat.com/
> > > > 
> > > > Arun Menon (4):
> > > >   tpm_crb: Add definition of TPM CRB chunking fields
> > > >   tpm_crb: Add new wrapper function to invoke start method
> > > >   tpm_crb: Implement command and response chunking logic
> > > >   tpm: Increase TPM_BUFSIZE to 64kB for chunking support
> > > > 
> > > >  drivers/char/tpm/tpm.h     |   2 +-
> > > >  drivers/char/tpm/tpm_crb.c | 194 ++++++++++++++++++++++++++-----------
> > > >  2 files changed, 137 insertions(+), 59 deletions(-)
> > > > 
> > > > -- 
> > > > 2.53.0
> > > > 
> > > 
> > > When QEMU has the feature available?
> > 
> > The QEMU patches are in review at the moment,
> > here is the link: https://lore.kernel.org/qemu-devel/20260319135316.37412-1-armenon@redhat.com/
> > Hoping to have them merged soon.
> 
> Right, and additional question: what about swtpm?

Hi Jarkko,

Apologies for the delay in following up.
Regarding your question about swtpm, I’ve looped in Stefan Berger who 
should be able to provide more technical context on that front.

I also wanted to gently point you toward the latest revision of this
series v2, as I’ve addressed some feedback since our last exchange.
latest : https://lore.kernel.org/lkml/20260324181244.17741-1-armenon@redhat.com/

I’ve been working on the QEMU integration side in the meantime to ensure
the end-to-end flow is solid.
qemu link : https://lore.kernel.org/qemu-devel/20260422103018.123608-1-armenon@redhat.com/

I look forward to your feedback when time permits.

> 
> For both, to give detailed review, good enough is their main branch
> (i.e. as long as upstream accepts them I can use them).
> 
> > 
> > > 
> > > BR, Jarkko
> > > 
> > 
> > Regards,
> > Arun Menon
> > 
> 
> BR, Jarkko

Regards,
Arun Menon


  reply	other threads:[~2026-04-23 10:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24  7:17 [RFC 0/4] tpm_crb: Add command and response buffer chunking support Arun Menon
2026-03-24  7:18 ` [RFC 1/4] tpm_crb: Add definition of TPM CRB chunking fields Arun Menon
2026-03-24  7:18 ` [RFC 2/4] tpm_crb: Add new wrapper function to invoke start method Arun Menon
2026-03-24 10:42   ` Jarkko Sakkinen
2026-03-24 12:43     ` Arun Menon
2026-04-08  8:36       ` Jarkko Sakkinen
2026-04-23 10:48         ` Arun Menon
2026-03-24  7:18 ` [RFC 3/4] tpm_crb: Implement command and response chunking logic Arun Menon
2026-03-24 10:45   ` Jarkko Sakkinen
2026-03-24 12:46     ` Arun Menon
2026-03-24  7:18 ` [RFC 4/4] tpm: Increase TPM_BUFSIZE to 64kB for chunking support Arun Menon
2026-03-24 10:41 ` [RFC 0/4] tpm_crb: Add command and response buffer " Jarkko Sakkinen
2026-03-24 12:41   ` Arun Menon
2026-04-08  8:34     ` Jarkko Sakkinen
2026-04-23 10:43       ` Arun Menon [this message]
2026-04-23 12:50         ` Jarkko Sakkinen

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=aen3zxxedDXlekRb@fedora \
    --to=armenon@redhat.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 \
    --cc=stefanb@linux.ibm.com \
    /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