From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 267C7C433EF for ; Mon, 23 May 2022 20:00:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232012AbiEWUAv (ORCPT ); Mon, 23 May 2022 16:00:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231989AbiEWUAs (ORCPT ); Mon, 23 May 2022 16:00:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 358967939B; Mon, 23 May 2022 13:00:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C41CE60C1D; Mon, 23 May 2022 20:00:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2E5DC385A9; Mon, 23 May 2022 20:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653336046; bh=JY+z+d7cAHPQ6gNjtI2yZLh/aTovUuF16/aRcdgnfMI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=njt5pfYUeH14X3vXFRh/Vsi1gvaB8qQ7qi8Kb4toIE+vVIqRr6SxMGCq9sqJoCSZn S2fej/8xTP2c54TlTIIsOkrVxxbkr3VMVeYUZmGXHmqHtD8XTSqiObzI5mGHlcKSTC ZI2k3LGZmIcRL5McG/4QTlEVeV+qrxRXCCCr2z0DSeJ9BBxNyeGzqiTYT8vnzvxX0o K/4gh+oFXDol0+nkuNMuJFs/6tZJCTduS59A3A3L2n/OaxDjD+JY9mCTVB52lqgIlp HM9H0kv8vaP3AXRGOui+JeC5U2O5ia3fXAaNIH0fOtAtFjx31SMLpmZ5zVfYRjPQLV UZE3NEBeFhCjA== Date: Mon, 23 May 2022 22:59:05 +0300 From: Jarkko Sakkinen To: Stefan Mahnke-Hartmann Cc: Johannes Holland , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, jgg@ziepe.ca Subject: Re: [PATCH] tpm: increase timeout for kselftests Message-ID: References: <20220510111607.22984-1-johannes.holland@infineon.com> <51a14f28-ce94-ade9-6512-a265f7b32dfb@infineon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51a14f28-ce94-ade9-6512-a265f7b32dfb@infineon.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >> --- > >> 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 BR, Jarkko