All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Graf (AWS), Alexander" <graf@amazon.de>
To: Jonathan McDowell <noodles@earth.li>,
	"Kanagaraj, Surendran" <surenkj@amazon.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>,
	Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Breno Leitao <leitao@debian.org>,
	"nh-open-source@amazon.com" <nh-open-source@amazon.com>,
	"Kudrjavets, Gunnar" <gunnarku@amazon.com>,
	"Levinson, Josh" <joshlev@amazon.com>
Subject: Re: [PATCH v2 2/2] tpm_crb: Raise durations for Amazon NitroTPM
Date: Fri, 16 Oct 2026 16:38:56 +0000	[thread overview]
Message-ID: <56bd8d2f-bf22-4a56-a845-674377b086fa@amazon.de> (raw)
In-Reply-To: <atJQgXYkFjcQROb6@earth.li>


On 16.10.26 18:27, Jonathan McDowell wrote:
> On Fri, Oct 16, 2026 at 04:37:33AM +0000, Surendran Kanagaraj wrote:
>> TPM commands need to complete within the command duration defined in
>> the TPM2 spec or keep answering TPM2_RC_RETRY for at most
>> TPM2_DURATION_LONG (2s).
>>
>> In rare scenarios NitroTPM can enter a mode where it either sends
>> TPM2_RC_RETRY for more than 2s or delays command completion. When
>> this happens during auth session start, the driver disables the chip
>> and every subsequent request fails:
>>
>>      tpm tpm0: in retry loop
>>      tpm tpm0: tpm2_load_context: failed with a TPM error 0x0922
>>
>> Add support for vendor duration overrides to the CRB driver, based on
>> the vendor ID read from the interface ID register. For NitroTPM, raise
>> TPM_SHORT, TPM_MEDIUM and TPM_LONG to 30s which covers the longest
>> unavailability time along with some headroom.
> Bumping all of these to 30s seems excessive. Is it really the case that
> all commands can potentially take this long? Is that because of
> non-TPM-related operations Nitro might be doing behind the scenes?


We won't reach the 30s, which is exactly why it's a safe default for the 
safety net that these timeouts are :).


Alex

  reply	other threads:[~2026-10-16 16:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  4:37 [PATCH v2 0/2] tpm: Handle transient NitroTPM unavailability Surendran Kanagaraj
2026-10-16  4:37 ` [PATCH v2 1/2] tpm: Add support for updating TPM2 durations Surendran Kanagaraj
2026-10-17  0:12   ` Jarkko Sakkinen
2026-10-17  0:19     ` Jarkko Sakkinen
2026-10-16  4:37 ` [PATCH v2 2/2] tpm_crb: Raise durations for Amazon NitroTPM Surendran Kanagaraj
2026-10-16 16:27   ` Jonathan McDowell
2026-10-16 16:38     ` Graf (AWS), Alexander [this message]
2026-10-17  0:28       ` Jarkko Sakkinen
2026-10-17  0:31   ` Jarkko Sakkinen
2026-10-17  0:40     ` 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=56bd8d2f-bf22-4a56-a845-674377b086fa@amazon.de \
    --to=graf@amazon.de \
    --cc=gunnarku@amazon.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=joshlev@amazon.com \
    --cc=leitao@debian.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nh-open-source@amazon.com \
    --cc=noodles@earth.li \
    --cc=peterhuewe@gmx.de \
    --cc=surenkj@amazon.com \
    /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.