Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5591299imm; Tue, 18 Sep 2018 12:02:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaA0jdtujITFW4f8lx4E4CUqbq8Q1ECgBtBkIoCrgrEIzvO7e3cp7p7lwYJbjknJVZJomtt X-Received: by 2002:a17:902:b218:: with SMTP id t24-v6mr30880824plr.235.1537297321245; Tue, 18 Sep 2018 12:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537297321; cv=none; d=google.com; s=arc-20160816; b=YHOnkxWi2Xt0pyMx5GB6yO6d9tSV1H7TmQ02L1sXXPsPr4odt3ImLd/QwGCtplLH5h VLEsexryxc8P2n7TxYK+K8Caj6x79D9lvnTIS7oy8iYUkRAED5LVAC/Kp1PH+ZvwoMbx GOcqQ6Kzy7vjpQDbrj2g3jumjXj+jll/0ubQzuAk6eYsE8vurY2rY/gUoUinUfCkXoTi nvXWcAyH6dbwLOZCWsrBj+HxFx+kLw3tLK8uSPYr2kAYevOIws12gC/2TdoHqkfIQM3L YS4X4mxRTUZrnIYQr+L4ru27lJYgSFzBuJsvsDuoag/HyGwXT0ScJ4Pz7B2MAZc9/HDQ X/0Q== 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; bh=RsfRdBih1RJbCVYhuOrgCORwAo70/lLsu2RUZEMVa+s=; b=K8rzqpc5V8eidjiUReUkVYC/mZXYxNei8lGZQureCs94q7cai/3sn9b4HedbARKJRp qviNpkh2q9QsqdpfR3DRMDpBAVuDjVdl+lKGukMys7EN3UdqvjfHg5tGeqh3yrxfL1iT rzLWiaXd9w3oIKGpQpEHUCY9B9cYk+heWJ3zY8bbsoXDQLbn0L1WjpBGXEf4a97Qk8VY wdqpCAKAkwVu/y7KDSngJnxsmNHAQVABXDRCYwqkHduJ9Ht3wgv9OefvZcE/fD3ExeCr BBA/57X7lrcCimEmPpO9rxFbN4qknksjMX/ozO7CfmtGbqBcrrWeYFEPqHOv00QrV0E9 7edQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t13-v6si18775610pgl.461.2018.09.18.12.01.45; Tue, 18 Sep 2018 12:02:01 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729707AbeISAff (ORCPT + 99 others); Tue, 18 Sep 2018 20:35:35 -0400 Received: from mga18.intel.com ([134.134.136.126]:56520 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727140AbeISAff (ORCPT ); Tue, 18 Sep 2018 20:35:35 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2018 12:01:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,390,1531810800"; d="scan'208";a="84609377" Received: from kcandir-mobl.ger.corp.intel.com (HELO localhost) ([10.252.51.105]) by orsmga003.jf.intel.com with ESMTP; 18 Sep 2018 11:59:54 -0700 Date: Tue, 18 Sep 2018 21:59:52 +0300 From: Jarkko Sakkinen To: Boris Ostrovsky Cc: peterhuewe@gmx.de, jgg@ziepe.ca, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, jgross@suse.com, dunlapg@umich.edu, "Dr. Greg Wettstein" , "Dr . Greg Wettstein" , stable@vger.kernel.org Subject: Re: [PATCH v3] tpm: Restore functionality to xen vtpm driver. Message-ID: <20180918185952.GA26508@linux.intel.com> References: <20180917225333.10426-1-boris.ostrovsky@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180917225333.10426-1-boris.ostrovsky@oracle.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 Mon, Sep 17, 2018 at 06:53:33PM -0400, Boris Ostrovsky wrote: > From: "Dr. Greg Wettstein" > > Functionality of the xen-tpmfront driver was lost secondary to > the introduction of xenbus multi-page support in commit ccc9d90a9a8b > ("xenbus_client: Extend interface to support multi-page ring"). > > In this commit pointer to location of where the shared page address > is stored was being passed to the xenbus_grant_ring() function rather > then the address of the shared page itself. This resulted in a situation > where the driver would attach to the vtpm-stubdom but any attempt > to send a command to the stub domain would timeout. > > A diagnostic finding for this regression is the following error > message being generated when the xen-tpmfront driver probes for a > device: > > <3>vtpm vtpm-0: tpm_transmit: tpm_send: error -62 > > <3>vtpm vtpm-0: A TPM error (-62) occurred attempting to determine > the timeouts > > This fix is relevant to all kernels from 4.1 forward which is the > release in which multi-page xenbus support was introduced. > > Daniel De Graaf formulated the fix by code inspection after the > regression point was located. > > Fixes: ccc9d90a9a8b ("xenbus_client: Extend interface to support multi-page ring") > Signed-off-by: Dr. Greg Wettstein > > [boris: Updated commit message, added Fixes tag] > Signed-off-by: Boris Ostrovsky > Cc: stable@vger.kernel.org # v4.1+ > --- > drivers/char/tpm/xen-tpmfront.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/xen-tpmfront.c b/drivers/char/tpm/xen-tpmfront.c > index 911475d36800..b150f87f38f5 100644 > --- a/drivers/char/tpm/xen-tpmfront.c > +++ b/drivers/char/tpm/xen-tpmfront.c > @@ -264,7 +264,7 @@ static int setup_ring(struct xenbus_device *dev, struct tpm_private *priv) > return -ENOMEM; > } > > - rv = xenbus_grant_ring(dev, &priv->shr, 1, &gref); > + rv = xenbus_grant_ring(dev, priv->shr, 1, &gref); > if (rv < 0) > return rv; > > -- > 2.17.1 > Reviewed-by: Jarkko Sakkinen /Jarkko