Received: by 10.213.65.68 with SMTP id h4csp3840454imn; Tue, 10 Apr 2018 05:36:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx48rs2BU0qIsCN0sWBxyDxYld8fSg/05wnObL0dcCBkmXQdIcXjrfcNegCbD2qsi3PgB4P3U X-Received: by 10.101.93.137 with SMTP id f9mr187653pgt.148.1523363797460; Tue, 10 Apr 2018 05:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523363797; cv=none; d=google.com; s=arc-20160816; b=NHNIH71o2luA4QDOrN0h7QkiJF7HbyfiTMApg/1IfItXJvj5hmWyGgbDiiGDFOYrfV RUdhc4hRQASsGybT+u0knzxd8N+mgsmI+wjvFXSc++9BFKGBF7zhWV655spNWi1iSjUp hXsUq4+nPHokDtM5pOSoRXd+HaUlw8eq+V52VzRkMzzht9jYwkp15hhuzFtOwK4uJpqa J6CEJEY3dbeK8G8rZVas9q8TQLFQ+S7AybIqE+HP1BTPk0NKyDjGk+c/sKan0P5p1e6W HGHc/tcfeo0xRTFDO3b4Dg6833HAqxID2Q80bCMIq2nXT6otP9Nhd7l0rcaChnDp9Vc1 sryQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=UrzAyfbcx0QbjHS5lKLs52NK0uIl/EwyEp3KvXd1Lng=; b=jUcNSUtDyodNKBJ9XRCgMvTAAR4U0HRVAThGTnwb+WznhdGQnHKWPJQ1tqR2CCauvd GE/Q4MSGMXDJXRKJPu8ggUs4mVqziOueSVEvNiqlRzPj07y/nN8LKfGOvFoqu9AmJIe1 bAd0EsSwHzE9F8KpBwiJ7P4qZVshZpMhcU8uNE6b6fV3ZzFNzNpH15Z93jAvjTiv6SGg Uw/9jf+nu5fYNe1WBVZOTF7+6o2zs6x4YIZkERkHonVdOhBKAtlRVJj1B1rC0K48zdWG eDO3lEJbZa9AvuWWz+umcmo/epTZyAmzrZNRpIR3JQlr6mKRsgJXMkMOHtGEqP1Qgzfx 72yA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j62si1795997pgc.175.2018.04.10.05.36.00; Tue, 10 Apr 2018 05:36:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753126AbeDJMbR (ORCPT + 99 others); Tue, 10 Apr 2018 08:31:17 -0400 Received: from mga11.intel.com ([192.55.52.93]:15795 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbeDJMbQ (ORCPT ); Tue, 10 Apr 2018 08:31:16 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2018 05:31:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,432,1517904000"; d="scan'208";a="32243827" Received: from rthanimx-mobl3.gar.corp.intel.com ([10.249.254.57]) by orsmga007.jf.intel.com with ESMTP; 10 Apr 2018 05:31:11 -0700 Message-ID: Subject: Re: [PATCH] tpm: moves the delay_msec increment after sleep in tpm_transmit() From: Jarkko Sakkinen To: Mimi Zohar , Nayna Jain Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, tpmdd@selhorst.net, jgunthorpe@obsidianresearch.com Date: Tue, 10 Apr 2018 15:31:09 +0300 In-Reply-To: <1523284198.16421.196.camel@linux.vnet.ibm.com> References: <20180402162006.5030-1-nayna@linux.vnet.ibm.com> <20180405101210.GA21636@linux.intel.com> <95af65a1-e618-5cdf-fb81-56434f1aa973@linux.vnet.ibm.com> <20180407103610.GA22542@linux.intel.com> <1523284198.16421.196.camel@linux.vnet.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.0-4 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-04-09 at 10:29 -0400, Mimi Zohar wrote: > On Sat, 2018-04-07 at 13:36 +0300, Jarkko Sakkinen wrote: > > On Fri, Apr 06, 2018 at 02:03:37PM +0530, Nayna Jain wrote: > > > On 04/05/2018 03:42 PM, Jarkko Sakkinen wrote: > > > > On Mon, Apr 02, 2018 at 09:50:06PM +0530, Nayna Jain wrote: > > > > > Commit e2fb992d82c6 ("tpm: add retry logic") introduced a new loop to > > > > > handle the TPM2_RC_RETRY error. The loop retries the command after > > > > > sleeping for the specified time, which is incremented exponentially in > > > > > every iteration. This patch fixes the initial sleep to be the default > > > > > sleep time. > > > > > > > > I think I understand the code change but do not understand what the > > > > long description. > > > > > > It tells that the first sleep is delay_msec * 2 and not delay_msec. > > > > So the problem is that the loop doubles the time before sleeping > > for the first time. This is missing from the description. Please > > refine it in some way. > > Sure, how about replacing the last line of the patch description with: > Unfortunately, the loop doubles the time before sleeping, causing the > initial sleep to be doubled. This patch fixes the initial sleep time. > > If this change is acceptable, do you want to make the change or should Nayna > repost the patch? No need. I'll move on to testing. /Jarkko