Attention is currently required from: Michał Żygowski, Maciej Pijanowski, Christian Walter, Krystian Hebel, Sergii Dmytruk.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68748 )
Change subject: security/tpm: add TPM log format as per 2.0 spec ......................................................................
Patch Set 10: Code-Review+2
(3 comments)
File src/security/tpm/tpm2_log_serialized.h:
https://review.coreboot.org/c/coreboot/+/68748/comment/a9c3ffef_beb2cf3f PS10, Line 59: } __packed; nit: I'd consider adding a reserved uint8_t in here and shuffling things around a little so that they can remain naturally aligned when taking the parent structure into account (where this starts one uint8_t off from a 4-byte boundary): ``` uint8_t reserved; uint8_t version_major; uint8_t version_minor; uint32_t magic; uint16_t max_entries; uint16_t num_entries; uint32_t entry_size; ``` (Alternatively, maybe a 1-byte magic would be good enough?)
File src/security/tpm/tpm2_log_serialized.h:
https://review.coreboot.org/c/coreboot/+/68748/comment/303823c4_641ed7c2 PS5, Line 38: struct tpm_2_log_entry {
As was mentioned in another comment earlier, presence of the `CONFIG()` macro makes contents of this […]
And I guess cbmem couldn't use this style of structure anyway because cbmem doesn't know at compile time which hash length the TPM log it will be reading is going to use? Okay, makes sense.
File src/security/tpm/tspi/log-tpm2.c:
https://review.coreboot.org/c/coreboot/+/68748/comment/7d203e6d_d75ed66b PS10, Line 200: external nit: "internal"?