On Fri, Apr 04, 2025 at 11:10:12AM +0300, Jarkko Sakkinen wrote:
On Fri, Apr 04, 2025 at 09:51:29AM +0200, Michal Suchánek wrote:
On Thu, Apr 03, 2025 at 09:43:19PM +0100, Jonathan McDowell wrote:
> On Thu, Apr 03, 2025 at 09:45:21PM +0300, Jarkko Sakkinen wrote:
> > On Wed, Apr 02, 2025 at 06:45:40PM +0100, Jonathan McDowell wrote:
> > > On Wed, Apr 02, 2025 at 07:21:30PM +0200, Michal Suchanek wrote:
> > > > With some Infineon chips the timeouts in tpm_tis_send_data (both B and
> > > > C) can reach up to about 2250 ms.
> > > >
> > > > Extend the timeout duration to accommodate this.
> > >
> > > The problem here is the bump of timeout_c is going to interact poorly with
> > > the Infineon errata workaround, as now we'll wait 4s instead of 200ms to
> > > detect the stuck status change.
> > >
> > > (Also shouldn't timeout_c already end up as 750ms, as it's
> > > max(TIS_SHORT_TIMEOUT, TPM2_TIMEOUT_C), and TIS_SHORT_TIMEOUT is 750 vs
200
> > > for TPM2_TIMEOUT_C? That doesn't seem to be borne out by your logs, nor my
> > > results.)
> >
> > Just noticed that the commit did not end up having fixes etc. tags:
> >
> >
https://web.git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/commit/?id=de9e33df7762abbfc2a1568291f2c3a3154c6a9d
> >
> > Should we forward to stable?
>
> It's a TPM bug rather than a kernel issue, so I don't think there's a valid
> Fixes: for it, but it's certainly stable material in my mind.
In the more general sense of Fixes: indicating where the fix is
applicable it would be any kernel that supports TPM2.
I tried applying the patch on 6.1-stable:
~/work/kernel.org/stable/linux tags/v6.1.132
$ git am -3 ~/Downloads/infineon.patch
Applying: tpm, tpm_tis: Workaround failed command reception on Infineon devices
Using index info to reconstruct a base tree...
M drivers/char/tpm/tpm_tis_core.c
M drivers/char/tpm/tpm_tis_core.h
M include/linux/tpm.h
Falling back to patching base and 3-way merge...
Auto-merging include/linux/tpm.h
Auto-merging drivers/char/tpm/tpm_tis_core.h
Auto-merging drivers/char/tpm/tpm_tis_core.c
If no counter-opinions, I'd add:
sta...@vger.kernel.org # v6.1+
I based this on Bookworm kernel.
It looks like Sasha has already autoselected it for 6.1, 6.6, 6.12, 6.13
+ 6.14.
J.
--
How does it work? I don't know but it does!
This .sig brought to you by the letter R and the number 21
Product of the Republic of HuggieTag