Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2795763pxj; Mon, 10 May 2021 10:54:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaBAqkrWIyFL5zz0Lie3HSfZLhAbTmQYij44Q9z4ISezzo/QVztv8JnFgGf6D7++ZZ2CI8 X-Received: by 2002:a02:8588:: with SMTP id d8mr22525318jai.129.1620669241692; Mon, 10 May 2021 10:54:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620669241; cv=none; d=google.com; s=arc-20160816; b=qeCcb65DfgPzxooH38QxtUUk+TkWVT/spk4RXKWQl3ShUxi2QAqbghaeyP3fra769V /Z6Kwpro+LXsrc5pirr9bD8uS+3vtlMit/2G1HpdeiEppNhLJKuaa30ei68igYDrVF0P +UEDVRbwMmkiRAQ3QNHNsJzm8pculHJvLNtolTCbRlOvhrnhnBjPzwyUdNjOP64FG4Lc qMyr6Wtu3SuEt70qErnDWCGD/+/NB16Op1Rv8RyT0/YaP/EIs6d2YLSqYKGMC2TZxK/1 WeioclKOhEL9s6mZLzPADSoqV+9wDMqA/jlNciO1p2CmdlpTwYGQYa2fHCctt13znRem wFIQ== 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=wP9PlmxBgZVWbWrQuJFYfUFvNBrY3W/NcrczL6FpY+g=; b=rX0ps6A6s10mtXZ7CLjoGabU6lbezL/SD5LsTSa7GTm3dCgRgZWFwwSpWR6egCRvzr SYpnuSws9IBMF1ywdQZST+3N2DYRXMd1kSPf3+zf1OW5tRnytv4kCewnplvKGDNOCY2+ hlo3xIIfIEMTuoaPxOiYcGlFglCXV/b+xVNp5wEnyF6ZB0tG17oq8nlNuXGtKa0pjLfb HrbxnJLjO04TqImYnx0TMemN1nHq6pc+Lt+u3DNICXSPLJFDzouO436mxQu8lS1O6R6Y jCI+ay1Xvx40M/V8NZUriuuyuWfC29+oZ7OtQ0fKODCZ2QkZun1ZZd0Z646D42sMcLHm zWvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tEnSGp0W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si18050004iow.13.2021.05.10.10.53.46; Mon, 10 May 2021 10:54:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tEnSGp0W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S233218AbhEJRw3 (ORCPT + 99 others); Mon, 10 May 2021 13:52:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:35726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbhEJRw1 (ORCPT ); Mon, 10 May 2021 13:52:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B6D78601FA; Mon, 10 May 2021 17:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620669082; bh=+hf11QRJVdEDxS2uQZBcnMSOoYiIW5DRA7C7sdWiZms=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tEnSGp0WxjqIbYc+r7mgkHg3XHDUs1yVcyjlfiAk7SyuHLljHFHirPn/J9Ybt9DTu +9yuBuOYnj3VSFQ0Upxaio+j9av9hf2wPcJCbGkRDr3A5rTIh3zbuWndmLTqYHyUjF 0cbXgzXjL0khBsR3mf65T3ZShw7ouAn5rWxNYpEB6LUACy8tW1fyoiDH3jD/+I/qVb jdYVhaEEtgAHnWV2oSNYIGbSxYqvP8RQky1CL9kqhlBwSHj+aMZanX08QwGkD2KvtH s7j0WaqaPpVFLva6g0Snl4gOZoG+KfpgL48Li00HxA9XGuTeqslEynaRci6mVPikJn iQGl210y0ILrA== Date: Mon, 10 May 2021 20:51:19 +0300 From: Jarkko Sakkinen To: amirmizi6@gmail.com Cc: Eyal.Cohen@nuvoton.com, jarkko.sakkinen@linux.intel.com, peterhuewe@gmx.de, jgg@ziepe.ca, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, Dan.Morav@nuvoton.com, oren.tanami@nuvoton.com, shmulik.hager@nuvoton.com, amir.mizinski@nuvoton.com Subject: Re: [PATCH v1] tpm2: add longer timeout for verify signature command Message-ID: References: <20210510142719.48153-1-amirmizi6@gmail.com> <20210510142719.48153-2-amirmizi6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210510142719.48153-2-amirmizi6@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 05:27:19PM +0300, amirmizi6@gmail.com wrote: > From: Amir Mizinski > > TPM2_CC_VERIFY_SIGNATURE(0x177) Current timeout does not apply to usage with > RSA 3070-bit keys. I don't understand what this sentence means. Better excuse for making the whole change would be to: 1. If possible put a snippet of the klog transcript what happens to you. 2. You probably want rationalize this change for the reason that, since the TPM PC Client specification does not specify any specific number, and you have a corner case to show, it's best to pick the longest timeout, i.e. TPM_LONG_LONG. > Additional time may be required for usage with RSA 3070-bit keys. Therefore, the > timeout of TPM2_CC_VERIFY_SIGNATURE is set to 3 minutes (TPM_LONG_LONG). > > Signed-off-by: Amir Mizinski Please, re-phrase : "Set duration for TPM2_CC_VERIFY_SIGNATUE to TPM_LONG_LONG (3 minutes)". Imperative way to express things is always better, and "timeout" is a concept of its own, separate from "duration" in TPM jargon. > --- > drivers/char/tpm/tpm2-cmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c > index eff1f12..235a454 100644 > --- a/drivers/char/tpm/tpm2-cmd.c > +++ b/drivers/char/tpm/tpm2-cmd.c > @@ -87,7 +87,7 @@ static u8 tpm2_ordinal_duration_index(u32 ordinal) > return TPM_MEDIUM; > > case TPM2_CC_VERIFY_SIGNATURE: /* 177 */ > - return TPM_LONG; > + return TPM_LONG_LONG; > > case TPM2_CC_PCR_EXTEND: /* 182 */ > return TPM_MEDIUM; > -- > 2.7.4 > > The commit message needs rework because now it makes no sense. With the correct rationalization this probably would make sense. /Jarkko