Attention is currently required from: Michał Żygowski, Maciej Pijanowski, Christian Walter, Julius Werner, Krystian Hebel.
Sergii Dmytruk has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68747 )
Change subject: security/tpm: add TPM log format as per 1.2 spec ......................................................................
Patch Set 5:
(4 comments)
File src/security/tpm/Kconfig:
https://review.coreboot.org/c/coreboot/+/68747/comment/a74b5473_3705374b PS4, Line 105: config USE_TPM_LOG_TPM12
I don't get the point of these USE_xxx options, and it doesn't seem like you're adding any code that […]
The point was to force the choice for backward compatibility. But if Google boards don't need it and potentially no boards need it, these can be removed.
File src/security/tpm/tpm12_log_serialized.h:
https://review.coreboot.org/c/coreboot/+/68747/comment/f4180a9a_a92e4598 PS2, Line 22: char name[TCPA_PCR_HASH_NAME];
I know, but if don't do agile log right, why would this be implemented correctly? It's done like cor […]
Latest revision uses `uint8_t data` and `data_length`. It's casted to `char` on print, which should be fine here as we know it's only used for strings (coreboot is the sole author of the log).
File src/security/tpm/tspi.h:
https://review.coreboot.org/c/coreboot/+/68747/comment/a2aa30b1_51bdfd81 PS4, Line 13: #include "tpm12_log_serialized.h"
I think conditional inclusion of different headers is generally a bad pattern that we should try to […]
Done
File src/security/tpm/tspi/log-tpm12.c:
https://review.coreboot.org/c/coreboot/+/68747/comment/34e185b6_e507d58c PS4, Line 59: struct tcpa_table *tcpa_log_init(void)
We should avoid duplicating so much code between log implementations. […]
`tcpa_cbmem_init()` just have similar control flow, don't see much to deduplicate there. Updated others.