From: Arun Menon <[email protected]>

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 <[email protected]>
---
 include/linux/tpm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index 01216156a1ec..af2bfac45fe0 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -26,7 +26,7 @@
 #include <crypto/aes.h>
 
 #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


Reply via email to