From: Jonathan McDowell <noodles@earth.li>
To: Jarkko Sakkinen <jarkko@kernel.org>
Cc: "Michal Suchánek" <msuchanek@suse.de>, linux-integrity@vger.kernel.org
Subject: Re: TPM operation times out (very rarely)
Date: Mon, 10 Feb 2025 16:18:28 +0000 [thread overview]
Message-ID: <Z6om1DIcDW3b0fAh@earth.li> (raw)
In-Reply-To: <Z6e-w2YT6hFOyFiP@kernel.org>
On Sat, Feb 08, 2025 at 10:29:55PM +0200, Jarkko Sakkinen wrote:
> On Fri, Feb 07, 2025 at 09:26:16AM +0000, Jonathan McDowell wrote:
> > > The whole arithmetic with timeout_a/b/c is mostly gibberish and could
> > > be replaced with a single "max" constant without issues (just set it
> > > large enough).
> > >
> > > They could be all be replaced with let's say 3s timeout in a constant.
> >
> > This appears to have come up before:
> >
> > https://lore.kernel.org/linux-integrity/358e89ed2b766d51b5f57abf31ab7a925ac63379.1552348123.git.calvinowens@fb.com/
> >
> > That patch was deemed overly complex and it was suggested to split it
> > up; I can't find any indication that was ever done which I guess is why
> > the discussion died off.
>
> Looking back I suggest splitting timeouts and durations into separate
> patches:
>
> https://lore.kernel.org/linux-integrity/20190312145553.GB6682@linux.intel.com/
Yup, that seems to be where it all died out from what I could find.
> > So just to clarify, this more recent patch is working around a situation
> > where the status register gets stuck and needs a complete retry of the
> > command send - it's an Infineon errata, not something that would be
> > fixed with a longer timeout.
>
> Hmm... please shout if I ignore something but if we could -ERESTARTSYS
> semantics here that should ignite completely new transmit flow, wouldn't
> it?
Who then handles the ERESTARTSYS though? Part of the issues we've seen
is the failure happens in a context save or load, which is all within
the kernel rather than directly under the control of userspace. I'm
guessing the HMAC changes are likely to hit similar problems. I think
some level of timeout improvement in tpm_transmit is appropriate, if we
can work out what it should be.
Likewise for the Infineon errata I think an internal retry makes sense,
because it could happen for a number of internally generated kernel
reasons as well as a userspace sent command.
J.
--
How I wish, how I wish you were here.
next prev parent reply other threads:[~2025-02-10 16:18 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 15:27 TPM operation times out (very rarely) Michal Suchánek
2025-01-29 16:02 ` Jonathan McDowell
2025-01-29 16:20 ` Michal Suchánek
2025-01-29 17:14 ` Jonathan McDowell
2025-01-29 17:25 ` Michal Suchánek
2025-01-30 23:31 ` Jarkko Sakkinen
2025-01-31 8:35 ` Michal Suchánek
2025-01-31 10:25 ` Jarkko Sakkinen
2025-01-31 13:02 ` Michal Suchánek
2025-01-31 17:12 ` Jarkko Sakkinen
2025-01-31 17:28 ` Michal Suchánek
2025-01-31 19:31 ` Jarkko Sakkinen
2025-02-05 13:26 ` Michal Suchánek
2025-02-05 13:45 ` Michal Suchánek
2025-02-05 14:29 ` Jonathan McDowell
2025-02-05 15:29 ` Michal Suchánek
2025-02-06 20:35 ` Jarkko Sakkinen
2025-02-07 9:26 ` Jonathan McDowell
2025-02-07 9:40 ` Michal Suchánek
2025-02-07 9:47 ` Jonathan McDowell
2025-02-07 9:58 ` Michal Suchánek
2025-02-10 16:13 ` Jonathan McDowell
2025-02-10 17:30 ` Jarkko Sakkinen
2025-02-08 20:29 ` Jarkko Sakkinen
2025-02-10 16:18 ` Jonathan McDowell [this message]
2025-02-10 17:32 ` Jarkko Sakkinen
2025-02-24 13:04 ` Michal Suchánek
2025-03-01 2:13 ` Jarkko Sakkinen
2025-03-05 12:20 ` Michal Suchánek
2025-03-06 22:29 ` Jarkko Sakkinen
2025-03-27 12:57 ` Michal Suchánek
2025-03-27 13:15 ` Jarkko Sakkinen
2025-02-19 22:29 ` Jonathan McDowell
2025-02-20 8:42 ` Michal Suchánek
2025-02-21 12:44 ` Jonathan McDowell
2025-02-24 12:21 ` Michal Suchánek
2025-02-24 12:56 ` Michal Suchánek
2025-03-01 2:03 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z6om1DIcDW3b0fAh@earth.li \
--to=noodles@earth.li \
--cc=jarkko@kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=msuchanek@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.