Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4455543imm; Mon, 17 Sep 2018 14:21:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY+qFRPA/1Nkd9u2crsBK1P4QGvWpgmupu/YXbGvnvNLo1rT7UwyUWPDxd3kIm4xecf8MfO X-Received: by 2002:a65:6086:: with SMTP id t6-v6mr25117308pgu.424.1537219277888; Mon, 17 Sep 2018 14:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537219277; cv=none; d=google.com; s=arc-20160816; b=W9Jbp/FyCqBgEIMeanSwBjn0T1ArpoAW26stGPzTjfLxvShv+FCHGlJ/yMAiIM6RkJ p1H4xTAdCHlUIRWPdnpvPYrmAsAtQ4dTiOTqNgpDLakHH653Low0gQsBSAGtX9WThCbk INsUYFuDyy6+fWUPo2Q22M4winQdOW3gRJ2qOc5RIi95U+oICh1SwBiNHHRoY7cyHN+0 f+Bfpz0c0+81ezAaPS4JSkFOkd++7tKJC7EAclWKb0CTIDHdmwwLanBgj36Mw52sQKWD sleYS5X1s1NOstygtQAEg9R1Wb1aQJ7xKp/00X+9JJzQlo//l3Bx5oBl2eYxYfQXzDT5 Y/pw== 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=mAnvAom6B9/SZenVh0BWsl03JnUmSJ5jgMjhLriETPY=; b=V+dTAyZcOw7jl74qMtuxWNrRLTKbgoyA+DFlBXU6T41J6lTLgW1Qj+kok0PA0g7OkN Z2aNwa7r/Q1uhv9SS82/NSTVB3ACWSiI+Cc2+55rxQtqaxBOgQbHcuop8RyqUoDMBPBn ocZ8p5asomOreA7ZUAhTlKGbcM0xx/ddkjfwa67Z/CQJxHNd9/EyX9XBYD7bZqmR3au8 pZJ3SpMl6qOGcaQ8XCUrnXLiM93sgwqPjZX+/nkvFatuXqMR8q0N5iZzgvIaxVIuDAIa OV1it67q2d9lSFd9qCotyZe8w89Ws3gXp49HCtAB4Je4/AJMRrKDL2eZwW5r8fMS4AQ1 WPeA== 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 o3-v6si16287457pld.281.2018.09.17.14.21.01; Mon, 17 Sep 2018 14:21:17 -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 S1728602AbeIRCsW (ORCPT + 99 others); Mon, 17 Sep 2018 22:48:22 -0400 Received: from mga12.intel.com ([192.55.52.136]:37683 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726844AbeIRCsW (ORCPT ); Mon, 17 Sep 2018 22:48:22 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2018 14:19:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,386,1531810800"; d="scan'208";a="92550334" Received: from maclarck-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.39.44]) by orsmga002.jf.intel.com with ESMTP; 17 Sep 2018 14:19:01 -0700 Date: Tue, 18 Sep 2018 00:19:00 +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 v2] tpm: Restore functionality to xen vtpm driver. Message-ID: <20180917211900.GD6716@linux.intel.com> References: <20180913212551.2435-1-boris.ostrovsky@oracle.com> <20180916192510.GF7473@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 09:54:37AM -0400, Boris Ostrovsky wrote: > On 9/16/18 3:25 PM, Jarkko Sakkinen wrote: > > On Thu, Sep 13, 2018 at 05:25:51PM -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 a pointer to the shared page address was being > >> passed to the xenbus_grant_ring() function rather then the > >> address of the shared page itself. This resulted in a situation > > I'm sorry but I'm far from being expert with Xen and this sentence > > confuses me so maybe could open it up a bit. > > > > For me "shared page address" and "address of the shared page" are > > the same thing. What am I missing? I mean just different forms in > > english to describe the exact same thing... > > xenbus_grant_ring() takes as an argument address of the ring shared > between two guests. What Greg was trying to describe was the fact that > existing code instead passes address of location where this address is > stored (i.e. somewhat similar to difference between pointer and pointer > to a pointer). Just to understand this bug better why did not the wrong version cause any undefined behavior? Sounds like a fatal bug. Does this cause crashes? > Would this be better: > > "In this commit pointer to location of the 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." Yes, definitely! > Or please suggest a better alternative, I'll be happy to amend the > commit message. Thank you. > Thanks. > -boris /Jarkko