Skip to contentSkip to conversation

tpm: Raise the TPM2_SelfTest duration to 4000 ms

PATCH In review Surendran Kanagaraj 2 participants 2 messages Nov 25

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tpm: Raise the TPM2_SelfTest duration to 4000 ms

TPM2_SelfTest duration is currently 3000 ms, following PTP version 1.06. Version 1.07 [1] has since raised the full self-test timeout from 3000 ms to 4000 ms (Table 26, Command Timing). Raise the TPM2_SelfTest duration to 4000 ms to match PTP version 1.07.

[1] https://medias.cdn.trustedcomputinggroup.org/production/PC_Client_Specific_Platform_TPM_Profile_for_TPM_2p0_v1p07_Pub_5643562943.pdf

---
Found while working on the RFC series "tpm: Rework timeout and duration handling":
https://lore.kernel.org/linux-integrity/[email protected]/

 drivers/char/tpm/tpm2-cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm2-cmd.c +1 -1
index 65928ae85b49..d58c306f7d93 100644
@@ -59,7 +59,7 @@ static const struct {
 	unsigned long duration;
 } tpm2_ordinal_duration_map[] = {
 	{TPM2_CC_STARTUP, 750},
-	{TPM2_CC_SELF_TEST, 3000},
+	{TPM2_CC_SELF_TEST, 4000},
 	{TPM2_CC_GET_RANDOM, 2000},
 	{TPM2_CC_SEQUENCE_UPDATE, 750},
 	{TPM2_CC_SEQUENCE_COMPLETE, 750},

base-commit: 003906ddd61cac2b89aefaf001fc19a6cb5d541a

Signature · 1 line
2.47.3
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 30 lines · Surendran Kanagaraj

TPM2_SelfTest duration is currently 3000 ms, following PTP version 1.06. Version 1.07 [1] has since raised the full self-test timeout from 3000 ms to 4000 ms (Table 26, Command Timing). Raise the TPM2_SelfTest duration to 4000 ms to match PTP version 1.07.

[1] https://medias.cdn.trustedcomputinggroup.org/production/PC_Client_Specific_Platform_TPM_Profile_for_TPM_2p0_v1p07_Pub_5643562943.pdf

---
Found while working on the RFC series "tpm: Rework timeout and duration handling":
https://lore.kernel.org/linux-integrity/[email protected]/

 drivers/char/tpm/tpm2-cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm2-cmd.c +1 -1
index 65928ae85b49..d58c306f7d93 100644
@@ -59,7 +59,7 @@ static const struct {
 	unsigned long duration;
 } tpm2_ordinal_duration_map[] = {
 	{TPM2_CC_STARTUP, 750},
-	{TPM2_CC_SELF_TEST, 3000},
+	{TPM2_CC_SELF_TEST, 4000},
 	{TPM2_CC_GET_RANDOM, 2000},
 	{TPM2_CC_SEQUENCE_UPDATE, 750},
 	{TPM2_CC_SEQUENCE_COMPLETE, 750},
Quoted 4 lines

base-commit: 003906ddd61cac2b89aefaf001fc19a6cb5d541a

Signature · 1 line
2.47.3

Thanks.

Br, Jarkko