Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1145164imm; Thu, 13 Sep 2018 13:28:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbZ/4bVYQm2Bwa8DRo6IK9I31NAEvUYfmDp9RB0AC2X38Q2ah9SZZS6zZTzO5O4326vGUMf X-Received: by 2002:aa7:83cd:: with SMTP id j13-v6mr8938909pfn.236.1536870537975; Thu, 13 Sep 2018 13:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536870537; cv=none; d=google.com; s=arc-20160816; b=PqBvN2XaMnXtfXmNHmydUdk09FcHJU+NzCATxX/+JPQ6Xa+eGVMOHxR7eC4/E+pnHT BQKwNe8rekZm40alSPleUiiIrl5UlUP4BJ5YP9tOIozMUlUQA3HDRKLVn6Xt9VfH4GrS xj7CjVEvxw075MLxQoQSLAbGK014tcwcXGR7s/pwza+0GtedllNINf8QK1+SsVA0GuED ux94mbzKAt5bY88h/CbqmcAAcwYX0SeaZe4DBfl1r0bCuue8UY2sVGYTKfDyh9B3i6gC RNEBCefqVvgbHCwMCACo/U3ydG2R4qnQ3sj+tqVSnYtGGPcGljf6LNnL6nQNjZqn0hkP nyZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CDDSUKz9NtNvHaoyexLzc+koabhzRYXuUDJ1jOIoVyQ=; b=b6Ry9Im4wErOE+98v3fpt2yBYJ9tCADBnh/Jm2gKQMF82D2yvlT/Ow4rDsdX9lvuy3 jQ0aWrufkGObZjrQwff+wcSGmaK8rLQe5j0T1zDPCejfycNYKI0sxe4/87kC2oLAU5iG LSFOynP0L7HECeEeLrqFsiqODLcIUJBJixAIZ5Q1nfYlGjBnDUZz4RxhTAW4Y5zyvr0T qz6bFdMYVz1F0aSylrpB3EKjlYB2wtd3r+/ZtrB0Ds0/FcOPVqfFeZWA0Ns9UI14XRPh aYM/pZTEgLhYASGAAAQwf2Jidf6D0Ss1ujMH6nh7TbSigo1AcROpVYDyHLJPo1iB4Ff7 KXPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="aecOU2/H"; 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 m11-v6si4853299pgk.468.2018.09.13.13.28.42; Thu, 13 Sep 2018 13:28:57 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b="aecOU2/H"; 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 S1728071AbeINBb0 (ORCPT + 99 others); Thu, 13 Sep 2018 21:31:26 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:38217 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728038AbeINBb0 (ORCPT ); Thu, 13 Sep 2018 21:31:26 -0400 Received: by mail-pl1-f193.google.com with SMTP id u11-v6so3105217plq.5 for ; Thu, 13 Sep 2018 13:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CDDSUKz9NtNvHaoyexLzc+koabhzRYXuUDJ1jOIoVyQ=; b=aecOU2/HD16ahGO5kxNviohY2SmqTveCvEFppZ+3uPPgjUnp4DRqIiAYtI9zYKUOSZ Im+feYEmJg9kvZvCMJP2NzuXwCBfamd6G1ai7u5AlSxhiP6F7x+JCBCesG9AkZqiruNd GqlTEmIDtcb2DWxWO/bHMf+wfveeAn/IFxl4s6F6q+TBpjTLgJr/Rf0lSp7NFCFnfMW1 RxcB+nStLXKdvxjFuyugDO9wCFZdSlGeTj++tt8joBcuLJ5pxupR34vCCHbgmC447jhO yXV+JQiCPaIz9zkvsB8y5K/06V/NyogyMVun9phUuslGB1kDweHcyVN4C2O7e7YOSWLk DAsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CDDSUKz9NtNvHaoyexLzc+koabhzRYXuUDJ1jOIoVyQ=; b=oWKWcsX9+QGnFBtUt5tR+1g51fmSlMKmvL4yx5OtHIrWB+gTiIJmPYj4Wi2Oz98zmz eLvAgA2xYa337CRKvO6w7xDXS58MGBHSgAmI8wKO9L1HdEq5Tn8igRs50Bh4+oPpUp0N VWItn+6BF3ADSaFvkVXokQ5vBTz5Ii84743KKyBZi0BPh4tlw9cB2/AO+MCuvumgzX8R lJHc/aMyE9sDOW993bxo6PFhBCAOcnC5S7gXMbjKSTUC66+jcHYXsI9vApBWM32klYi3 obxdM+2Vs56TKLkl8x4ddFniH56UuTzIFX4549rIL1gY9XQ2tOB5G+GaU+TkV91FMpyI fxbg== X-Gm-Message-State: APzg51AKI/H/q1zze7hQiGrv2mCYfi+ffzYamgkPIsiqN8WK2P108duC Bj4A1qdqsShkUr7uk0qqgGxxpA== X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr8677271plb.223.1536870023016; Thu, 13 Sep 2018 13:20:23 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id v22-v6sm8301533pfi.60.2018.09.13.13.20.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Sep 2018 13:20:22 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1g0Y69-00040f-74; Thu, 13 Sep 2018 14:20:21 -0600 Date: Thu, 13 Sep 2018 14:20:21 -0600 From: Jason Gunthorpe To: Boris Ostrovsky Cc: peterhuewe@gmx.de, jarkko.sakkinen@linux.intel.com, 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 RESEND] tpm: Restore functionality to xen vtpm driver. Message-ID: <20180913202021.GD31953@ziepe.ca> References: <20180913194749.32178-1-boris.ostrovsky@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180913194749.32178-1-boris.ostrovsky@oracle.com> 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 Thu, Sep 13, 2018 at 03:47:49PM -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"). This should be in a Fixes: line.. > 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 > 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. > > Signed-off-by: Dr. Greg Wettstein > > [boris: fixed commit message formatting] > Signed-off-by: Boris Ostrovsky > Cc: stable@vger.kernel.org # v4.1+ > We've lost this patch a couple of years ago, re-submitting. > > > 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 > +++ 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; >