Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1643660ioo; Sun, 22 May 2022 22:45:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUE+b3SktCgxb2pn+FE5MOjM4skII649D7k0diDoKBBSlLXW8JI6tSzcuE4JSmssx+Ek9j X-Received: by 2002:a05:6a00:2408:b0:4f7:a8cb:9b63 with SMTP id z8-20020a056a00240800b004f7a8cb9b63mr22324544pfh.33.1653284743683; Sun, 22 May 2022 22:45:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653284743; cv=none; d=google.com; s=arc-20160816; b=Xjrp5T56mjjkP7QA/vyPLMeh/wAjUNJ6aZMxQR+TKRHVs7XJoJt/MBQrFpDEz7Jpaq LWJ2/HymGiNAlZsdiLKyaVKS+PlMmtEHG4XWQDDxBOXGylrfwv5jiOtjLClul0HePT4x pir4vpKvX1RN//QsF/OmmLiZz7R9G/dPjyQO+XTm50OGCoDjLw3TI21nxJTaaRxJE3J1 QGvcqaN/1T5+90bYCnTWvOfbAFUhfieG7EpnAocRfKGPhe9Cmm+bZiBtAeL+rVvlHuCV HO+h0xyWNezje8xhAvx8gJQbBxQIz6Eoj5EMZm8U/5IuEaSWpMMkZKt71xkWy4iJT+AZ 7WDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :reply-to:user-agent:mime-version:date:message-id:dkim-signature; bh=M2am0o2rp9Bv4ajRkHfZXbnDlteZc6RNLvpFapCg6Ik=; b=T1pSHLsijitA3Jqrb+OcITOQqM4Zy1Us2bGb0gRHpDGYXbvM9ClxCoPbjSfyW7/fKR 4+82a6JuyAvWVh+x5WC4ZNqUYBuA1N4lPBiXUwuEl0KKCv02DpCpDMJYcg6GYLzf7lqR TncXpjoPW7YJ3q8q2eZl6TwiNIf2h2kUHy4vph+Daoao6mECcVg1guqZ5qJk8X4AUK8W NtUTpLjCOqUl7pGkN3X6PdqTKDyO1DHyQJdWzXMz9WJUpYOtGDyH1YrIEWB1Wg9GOr3J 1qCcZsci36Qr1IR8nwA9D4M1atT//Zgnw2RHjKMKSMHOCIVIgQthT29k+tcJVeP492PH Mv+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=S8qVyzZb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b7-20020a056a000a8700b0050e0a5aa240si14600077pfl.6.2022.05.22.22.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 22:45:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=S8qVyzZb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F35B26136; Sun, 22 May 2022 22:45:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343559AbiETNZk (ORCPT + 99 others); Fri, 20 May 2022 09:25:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233476AbiETNZi (ORCPT ); Fri, 20 May 2022 09:25:38 -0400 Received: from smtp2.infineon.com (smtp2.infineon.com [IPv6:2a00:18f0:1e00:4::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01C76149D87; Fri, 20 May 2022 06:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1653053136; x=1684589136; h=message-id:date:mime-version:reply-to:subject:to:cc: references:from:in-reply-to:content-transfer-encoding; bh=ueeMunmKCP4jhgg4Syz+6Dr4CSdM4dVyt+HIIQmajf0=; b=S8qVyzZb/73BfxTMjRyBc7CpPnxZnTses1oQ+3OQL5RYzmwxCxDQSpmt pA4CgnwUeN1y5R934KPSSgZ6d87lQum3VEG/EzjoSGw2qkFF9GJIQQDtb bdH9wsS9a1r+aX62IqHplhdUqt2+2HD0LeRPoIBAxuEyRLqStxOWK6oWE Q=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="179009252" X-IronPort-AV: E=Sophos;i="5.91,239,1647298800"; d="scan'208";a="179009252" Received: from unknown (HELO mucxv001.muc.infineon.com) ([172.23.11.16]) by smtp2.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 15:25:34 +0200 Received: from MUCSE805.infineon.com (MUCSE805.infineon.com [172.23.29.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv001.muc.infineon.com (Postfix) with ESMTPS; Fri, 20 May 2022 15:25:34 +0200 (CEST) Received: from MUCSE818.infineon.com (172.23.29.44) by MUCSE805.infineon.com (172.23.29.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 20 May 2022 15:25:34 +0200 Received: from [10.165.68.46] (10.165.68.46) by MUCSE818.infineon.com (172.23.29.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 20 May 2022 15:25:33 +0200 Message-ID: <51a14f28-ce94-ade9-6512-a265f7b32dfb@infineon.com> Date: Fri, 20 May 2022 15:28:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Reply-To: Subject: Re: [PATCH] tpm: increase timeout for kselftests Content-Language: en-US To: Jarkko Sakkinen , Johannes Holland CC: , , , , References: <20220510111607.22984-1-johannes.holland@infineon.com> From: Stefan Mahnke-Hartmann Organization: Infineon Technologies AG In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.165.68.46] X-ClientProxiedBy: MUCSE820.infineon.com (172.23.29.46) To MUCSE818.infineon.com (172.23.29.44) X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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