Received: by 10.213.65.68 with SMTP id h4csp504666imn; Sat, 7 Apr 2018 03:40:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx488rOuhklZxCLFIED0/SmNn3y+AJlawsjX9My2OZHhVzAa89naoQWXjUdVsSa+DyaL1tSsk X-Received: by 2002:a17:902:7582:: with SMTP id j2-v6mr24868689pll.46.1523097631269; Sat, 07 Apr 2018 03:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523097631; cv=none; d=google.com; s=arc-20160816; b=AyehEdiRw5FPmyMMDTrrmM1fCJtcQZ9KkXdjvIeM61eL+NmAtRUHWhCL3LJOTXq4+k XqO0lNKSO8GiEhr3z9y3No9bu4Rr31pckXVboOlwGKENYI/fgVOKZotkxQHN64n+NhQK esa2odtNaCIAR9daBV82vS4rMn9WltXPZ/BmXSaG6Hq3pRDb6UY0pynUf4o0i6yQkIOB FfLmltOWx3ID2+NuY0tIKXDs7juYc/YvelN569x1/3DQEKfJUTbl/s1igc/DFUnDhCTA U19SB0Hy3Kbkzjslh8PFK2RN2yPsePixapBQ8/dK1ETb9In4U348JLzRET3W7ZyEP1Hw DKEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=FvVS5mNPMvXFQDHEE3Gc/VEGyrE/U45ynDeOQP7HRFI=; b=Bj4jkfIi5EDe03RDnRbtZ/g5Lv6tnNYVUrclPriNTpFjvOSJ66cz/Qx5s0LTPX7Hrp jdVys8QqRujZ5GAPLAjCah9BFp2HfRR6h27AzjNcTXPVGt6lyJdEpV2r16TxTqkMdDmr FwbphbGzEW5qujdIY4NhYtIlncqXyLaSikQM24ThD8hTOybXqxgA+4MiO5fOQxalkZxG fWF71TDEhljS3dz8GBqlqTDr8c7lfQY4KjfIHsq6aCLtgrqTVRJZyiSDiEuCjh+t52e8 zJUWhNXceLvE+XaG4vNbyVDVKyZWXeNzMz5fs/QrAMi5z6rLm+IKXH4tqbf3ds9grez5 WxXg== 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 x14-v6si10063390pln.728.2018.04.07.03.39.40; Sat, 07 Apr 2018 03:40:31 -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 S1751446AbeDGKgU (ORCPT + 99 others); Sat, 7 Apr 2018 06:36:20 -0400 Received: from mga18.intel.com ([134.134.136.126]:5840 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334AbeDGKgT (ORCPT ); Sat, 7 Apr 2018 06:36:19 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2018 03:36:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,418,1517904000"; d="scan'208";a="218374847" Received: from rthanimx-mobl3.gar.corp.intel.com (HELO localhost) ([10.249.254.57]) by fmsmga006.fm.intel.com with ESMTP; 07 Apr 2018 03:36:12 -0700 Date: Sat, 7 Apr 2018 13:36:10 +0300 From: Jarkko Sakkinen To: Nayna Jain Cc: linux-integrity@vger.kernel.org, zohar@linux.vnet.ibm.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, tpmdd@selhorst.net, jgunthorpe@obsidianresearch.com Subject: Re: [PATCH] tpm: moves the delay_msec increment after sleep in tpm_transmit() Message-ID: <20180407103610.GA22542@linux.intel.com> References: <20180402162006.5030-1-nayna@linux.vnet.ibm.com> <20180405101210.GA21636@linux.intel.com> <95af65a1-e618-5cdf-fb81-56434f1aa973@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95af65a1-e618-5cdf-fb81-56434f1aa973@linux.vnet.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. /Jarkko