[PATCH v4 5/6] tpm: Increase TPM_BUFSIZE to 8kB for chunking support
From: Arun Menon
Date: Sun Oct 25 2026 - 16:22:11 EST
From: Arun Menon <armenon@xxxxxxxxxx>
The size of the command is checked against TPM_BUFSIZE early on before
even sending it to the backend. We therefore need to increase the
TPM_BUFSIZE to allow support for larger commands.
For now, 8KB seems sufficient for ML-KEM and ML-DSA algorithms and it is
also order-1 safe.
Signed-off-by: Arun Menon <armenon@xxxxxxxxxx>
---
include/linux/tpm_command.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/tpm_command.h b/include/linux/tpm_command.h
index fc446a1282e2..4ad11068b090 100644
--- a/include/linux/tpm_command.h
+++ b/include/linux/tpm_command.h
@@ -434,7 +434,7 @@ struct tpm2_context {
*/
#define TPM_DIGEST_SIZE 20 /* Max TPM v1.2 PCR size */
-#define TPM_BUFSIZE 4096
+#define TPM_BUFSIZE 8192
/*
* SHA-512 is, as of today, the largest digest in the TCG algorithm repository.
--
2.54.0