Attention is currently required from: Michał Żygowski, Christian Walter, Krystian Hebel, Sergii Dmytruk.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68989 )
Change subject: security/tpm: remove public tis_close() ......................................................................
Patch Set 1:
(1 comment)
File src/drivers/pc80/tpm/tis.c:
https://review.coreboot.org/c/coreboot/+/68989/comment/9c9445e0_09db623d PS1, Line 742: if (!has_access && tis_close() < 0) Oh, I completely missed that it's used down here too.
I find this isolated use of tis_open() and tis_close() down here pretty weird. How does it guarantee that tis_probe() has been called before getting here? Is the probe not needed before open in this case, or is it just relying on random boot order coincidence that something else would have taken care of that beforehand?
This seems to be pretty old code that was probably written before we had some of the other things in place... I think it would probably be cleaner nowadays if this just called tlcl_lib_init() so it can be sure to go through the same TPM init path in the same order as everything else (and then not do the close again afterwards).