Re: [PATCH v3 0/2] tpm_tis: fix retry exhaustion and add logging

Axel Rasmussen <[email protected]>
Newsgroups org.kernel.vger.linux-integrity,org.kernel.vger.linux-kernel
Message-ID <CAJHvVcgnsh-PeSsemRd6crAUP85sqzMSZ1mcS08ATJr7cAvAaA@mail.gmail.com>
On Wed, Apr 15, 2026 at 9:00 AM Jacqueline Wong <[email protected]> wrote:
>
> The Fix:
> - Patch 1: Adds error logs to identify the specific hardware status mismatch.
> - Patch 2: Stops execution immediately when retries are exhausted.
>
> v3 changes:
> - Improved code alignment to pass checkpatch --strict.

Thanks for sending the v3 Jacqueline!
I suspect this may have slipped under folks' radar by not CC'ing +linux-kernel@.

>
> v2 changes:
> - Split logging and logic into separate patches.
> - Added retry count to the error message.
> - Included dmesg traces below.
>
> Testing:
> Dmesg traces obtained using error injection to simulate status register mismatches.
>
> Before:
> [  130.288751] tpm tpm0: Operation Timed out
> [  250.306070] tpm tpm0: Operation Timed out
> [  250.310173] tpm tpm0: A TPM error (-62) occurred attempting to determine the timeouts
>
> After:
> [   10.271547] tpm tpm0: TPM_STS_DATA_EXPECT should be unset. sts = 0x00000080
> ...
> [   10.646283] tpm tpm0: TPM_STS_DATA_EXPECT should be unset. sts = 0x00000080
> [   10.653461] tpm tpm0: Exhausted 50 tpm_tis_send_data retries
> [   10.659304] tpm tpm0: tpm_try_transmit: send(): error -5
> [   10.665435] tpm tpm0: TPM_STS_DATA_EXPECT should be unset. sts = 0x00000080
> ...
> [   11.037198] tpm tpm0: TPM_STS_DATA_EXPECT should be unset. sts = 0x00000080
> [   11.044441] tpm tpm0: Exhausted 50 tpm_tis_send_data retries
> [   11.050288] tpm tpm0: tpm_try_transmit: send(): error -5
> [   11.055723] tpm tpm0: A TPM error (-5) occurred attempting to determine the timeouts
>
> Jacqueline Wong (2):
>   tpm: tpm_tis: add error logging for data transfer
>   tpm: tpm_tis: stop transmit if retries are exhausted
>
>  drivers/char/tpm/tpm_tis_core.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> --
> 2.54.0.rc0.605.g598a273b03-goog
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.