Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2263517ioo; Mon, 23 May 2022 14:14:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7alS84P+rPbl/LY6LVijM+DlvZczZS3FO6iLI1mIh5BtQf0VgYDm7iiWn7A63GnWQCDyo X-Received: by 2002:a05:6a02:106:b0:36c:96dd:8c17 with SMTP id bg6-20020a056a02010600b0036c96dd8c17mr22246513pgb.190.1653340487178; Mon, 23 May 2022 14:14:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653340487; cv=none; d=google.com; s=arc-20160816; b=W1/L20/FWpAjQ2FKk/ERPqem5aCClxYMaNxEMHdc0DFRyHFSME9ZeMe769x9eO/cV1 j/1OSboUj0NguAqg3zo97s1nn+hJi4mT8ta39fowOt0F74TrZEe/W8oSEZTnqpU9iB6A IbqX/NrFbSPPT9Da7LIZEgFLAqjMIDmhzZxXyBtptulcGFuG1UxYYyWICaSVlsjJEqNN iW1f9EEa9zobJG8pgR5Xk+ZDhYIxHGajXMDIVvG8Sh53qwN6A71HTdNR/0UPr9Sxciiy lDinhd6XVR5gVaNGUBC9OlmOpo91HIYvRV/R6uApwr7DDAXHXgZ1oPBLPv2mUNi+fxf3 SYCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uXNwCj4MoEDOhe+UMOO7ZrUykdIID3yldCTW6JQnjbo=; b=yNxZ4lAwziLa/5n463FHaDB0L5nM7J6ReG1+OeMTPHyy67J6MO5BOvMS/JEntqlKLt svDrc6G2YLN9SpuE+ammGtLxR1v5z7bnwxq6ycCIDGrULxfxQ7MQ1D+TckG/QzP1eR1g 0m204euTt02MgZXeJbkcJ5sc9Ny80lZenaW0MBn1oCbqrqQbiBx/6L61DEcMqN/5eg6/ miwpHcDVOWJlPbn9Ts7I1ygGChAdBzmn+f7DCLQf6LMtreyqLXvNThqicn7bskx9/NN3 +uMix7El2Y5bBdMKc22tzyC5QZybAD5lsRIC981IFrV7oWwbdpUHGlLU98FN8xohD3v9 GraQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=njt5pfYU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w1-20020a170902e88100b00161f9f344c3si12511952plg.207.2022.05.23.14.14.35; Mon, 23 May 2022 14:14:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=njt5pfYU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232009AbiEWUAt (ORCPT + 99 others); Mon, 23 May 2022 16:00:49 -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> X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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