On Mon Feb 19, 2024 at 7:17 PM UTC, Daniel P. Smith wrote: > On 2/1/24 17:33, Jarkko Sakkinen wrote: > > On Wed Jan 31, 2024 at 7:08 PM EET, Daniel P. Smith wrote: > >> When tis core initializes, it assumes all localities are closed. There > > ~~~~~~~~ > > tpm_tis_core > > > >> are cases when this may not be the case. This commit addresses this by > >> ensuring all localities are closed before initializing begins. > > > > Remove the last sentence and replace with this paragraph: > > > > "Address this by ensuring all the localities are closed in the beginning > > of tpm_tis_core_init(). There are environments, like Intel TXT, which > > may leave a locality open. Close all localities to start from a known > > state." > > okay. > > > BTW, why we should motivated to take this patch anyway? > > Without this change, in this scenario the driver is unnecessarily > thrashing the TPM with locality requests/relinquishes pairs for which > will never take effect and that the TPM must do state change tracking. > While I am confident that TPM chips are resilient to such abuse, I do > not think it would be good form to knowingly allow such behavior to occur. This would a factor better motivation part for the commit. I can buy this argument instead the one right now, thanks :-) BR, Jarkko