linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Stefan Mahnke-Hartmann <stefan.mahnke-hartmann@infineon.com>
Cc: Johannes Holland <johannes.holland@infineon.com>,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
	peterhuewe@gmx.de, jgg@ziepe.ca
Subject: Re: [PATCH] tpm: increase timeout for kselftests
Date: Mon, 23 May 2022 22:59:05 +0300	[thread overview]
Message-ID: <YovniXv6ATJ/vpt6@kernel.org> (raw)
In-Reply-To: <51a14f28-ce94-ade9-6512-a265f7b32dfb@infineon.com>

On Fri, May 20, 2022 at 03:28:42PM +0200, Stefan Mahnke-Hartmann wrote:
> 
> 
> On 11.05.22 17:14, Jarkko Sakkinen wrote:
> > On Tue, May 10, 2022 at 01:16:08PM +0200, Johannes Holland wrote:
> >> Due to CreatePrimary commands which need to create RSA keys of
> >> increasing size, the timeout value need to be raised, as well.
> >> Default is 300s.
> >>
> >> Signed-off-by: Johannes Holland <johannes.holland@infineon.com>
> >> ---
> >> A timeout of anything below 600s still lead to occasional timeouts for
> >> me. Therefore, I propose 600s as a new value. 
> >>
> >>  tools/testing/selftests/tpm2/settings | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>  create mode 100644 tools/testing/selftests/tpm2/settings
> >>
> >> diff --git a/tools/testing/selftests/tpm2/settings b/tools/testing/selftests/tpm2/settings
> >> new file mode 100644
> >> index 000000000000..919bc3803f03
> >> --- /dev/null
> >> +++ b/tools/testing/selftests/tpm2/settings
> >> @@ -0,0 +1,2 @@
> >> +timeout=600
> >> +
> >> -- 
> >> 2.34.1
> >>
> > Could cope but I did not get why it needs to be raised.
> 
> The TPM2 SpaceTest testsuite currently creates 8 primary RSA 2k keys + 1 for
> setup. Generating a RSA2k key can take up to ~1-2 minutes on some of our TPMs.
> => 2x9 = 18 minutes. In the kernel we even define a duration timeout for rsa2k
> keygen of 5 min per key! (TPM2_DURATION_LONG_LONG = 300000) => up to 45 minutes
> would be "acceptable".
> 
> However since the average key generation time is much faster, a value of ~10
> minutes should be fine enough.
> 
> The reason why you did not experience this yet on your test system is either
> because PTT TPMs are faster in that respect and/or some TPMs implement pre-gen
> mechanisms for key generation, (or just plain luck)
> 
> BR, Stefan
> 
> > BR, Jarkko

I think this is ok.


Acked-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko

  reply	other threads:[~2022-05-23 20:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 11:16 [PATCH] tpm: increase timeout for kselftests Johannes Holland
2022-05-10 11:56 ` Paul Menzel
2022-05-11 15:14 ` Jarkko Sakkinen
2022-05-20 13:28   ` Stefan Mahnke-Hartmann
2022-05-23 19:59     ` Jarkko Sakkinen [this message]
2022-06-20 14:45       ` Stefan Mahnke-Hartmann
2022-06-26  6:18         ` 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=YovniXv6ATJ/vpt6@kernel.org \
    --to=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=johannes.holland@infineon.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=stefan.mahnke-hartmann@infineon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).