From: Jarkko Sakkinen <jarkko@kernel.org>
To: Arun Menon <armenon@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org,
Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [RFC v2 1/5] tpm_crb: Add register definitions of TPM CRB chunking fields
Date: Sat, 9 May 2026 17:41:27 +0300 [thread overview]
Message-ID: <af9Hl3P91Z82j8ij@kernel.org> (raw)
In-Reply-To: <20260324181244.17741-2-armenon@redhat.com>
On Tue, Mar 24, 2026 at 11:42:40PM +0530, Arun Menon wrote:
> Post-quantum cryptographic (PQC) algorithms can require buffer sizes that
> exceed the physical capacity of the TPM's Command/Response Buffer (CRB).
> To support these larger payloads, the TPM 2.0 CRB specification [1]
> allows for data chunking when the physical MMIO window is smaller than
> the required buffer size.
>
> To support this protocol, the TPM driver must be able to detect the
> chunking capability, and signal the backend using specific start
> method flags, also known as the control area start register bits.
>
> As per sections 6.4.2.2 and 6.5.3.9 of the specification document [1]
> Add 2 new bit flags to the existing enum crb_start and add the
> capability bit.
> - CRB_INTF_CAP_CRB_CHUNK: A capability bit used to detect if the backend
> supports chunking.
> - CRB_START_NEXT_CHUNK: A control bit to signal the TPM to consume the
> current command buffer, or to get the next chunk from the response
> buffer.
> - CRB_START_RESP_RETRY: A control bit to signal retransmission of a
> response buffer.
>
> [1] https://trustedcomputinggroup.org/wp-content/uploads/PC-Client-Specific-Platform-TPM-Profile-for-TPM-2p0-v1p07_rc1_121225.pdf
>
> Signed-off-by: Arun Menon <armenon@redhat.com>
> ---
> drivers/char/tpm/tpm_crb.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
> index 6c25305c256ef..67c0061d4cab7 100644
> --- a/drivers/char/tpm/tpm_crb.c
> +++ b/drivers/char/tpm/tpm_crb.c
> @@ -56,12 +56,18 @@ enum crb_ctrl_sts {
>
> enum crb_start {
> CRB_START_INVOKE = BIT(0),
> + CRB_START_RESP_RETRY = BIT(1),
> + CRB_START_NEXT_CHUNK = BIT(2),
> };
>
> enum crb_cancel {
> CRB_CANCEL_INVOKE = BIT(0),
> };
>
> +enum crb_intf {
> + CRB_INTF_CAP_CRB_CHUNK = BIT(10),
> +};
> +
> struct crb_regs_head {
> u32 loc_state;
> u32 reserved1;
> --
> 2.53.0
>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
next parent reply other threads:[~2026-05-09 14:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260324181244.17741-1-armenon@redhat.com>
[not found] ` <20260324181244.17741-2-armenon@redhat.com>
2026-05-09 14:41 ` Jarkko Sakkinen [this message]
[not found] ` <20260324181244.17741-3-armenon@redhat.com>
2026-05-09 14:43 ` [RFC v2 2/5] tpm_crb: Add new wrapper function to invoke start method Jarkko Sakkinen
2026-05-13 11:08 ` Arun Menon
[not found] ` <20260324181244.17741-4-armenon@redhat.com>
2026-05-09 14:53 ` [RFC v2 3/5] tpm_crb: Implement command and response chunking logic Jarkko Sakkinen
2026-05-13 11:07 ` Arun Menon
[not found] ` <20260324181244.17741-5-armenon@redhat.com>
2026-05-09 14:54 ` [RFC v2 4/5] tpm: Increase TPM_BUFSIZE to 8kB for chunking support Jarkko Sakkinen
2026-05-09 15:07 ` Jarkko Sakkinen
2026-05-13 11:06 ` Arun Menon
2026-05-13 11:09 ` Arun Menon
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=af9Hl3P91Z82j8ij@kernel.org \
--to=jarkko@kernel.org \
--cc=armenon@redhat.com \
--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