Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3433704imu; Sun, 11 Nov 2018 15:01:25 -0800 (PST) X-Google-Smtp-Source: AJdET5c297OpaarbmLrJREhv4Aos+FXvCLWYjCqQKSVMTM2h+3BeTp7uTHyhhdMtg2Xey81WFmAq X-Received: by 2002:a63:7a5b:: with SMTP id j27mr15565709pgn.112.1541977285745; Sun, 11 Nov 2018 15:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977285; cv=none; d=google.com; s=arc-20160816; b=NdLJkkpajA8qq2ItrlCyLBe9w3bJBRTpJ3DFwljYErBg+D81VNPRacAiTMlDu4rCy8 OUXB3sEIAdLsR9d7+3u9T2WsOyQGy/JqAQX6umCKVSm2jJ/rBb8hvxpO25Tfd9+0hWP8 cpAvaLikMeBQO++3uPjCHhB6FhaEuGMToGNJKkjV24bNm9hr0qHg4eK+8kT5AfXxlgeQ OysvUY1F1qlcWN7cCHR6RJTBAcHKci504cYVHYPLjvWChnBt5g09k1mJuO640wiW4uQK rtsS6IgouIwdDIp40j7eIC/ng8XA5fwl2k3yDdt3Yky5udEjUMzFf4wnqa7efBM/Dyq+ JmEA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3NTo+eFE7caMSCtaCouK8GekqmqpbWmn0VlgP5lnTdA=; b=Crnl2HdBb5usbXjtyHVril5X5moU0tZufHwHR822St4omhzKfUAZaF/cARS8tbXcRG fhgPhKuvvBtw5lIFd2loHBJsnV93KtWvq3Pw7RXKpvPtJoCYF8DLUNlSF6b3F6KvYafv QsSs+mYK0LUkLfzvXUKvdwM14u9Klw2zkx2QRtRVywZMBs8m0l2afbjLNoAK+pSa0JAV dxmDgfefnTyTlFlqXw/7IfKyApSu7pZG/K2I8G+LgJNIo+0A+vQ/hM6Mdf46gobEt0eo vKnzsrA9LErAmiWvtIJ1wLtsbPbWiT6YGF5LlUGzBxGVh5or7fkz7myJ/ZYS+OlNI9Cq 1WlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xXTm1PjN; 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 193si14734662pgc.220.2018.11.11.15.01.10; Sun, 11 Nov 2018 15:01:25 -0800 (PST) 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=@kernel.org header.s=default header.b=xXTm1PjN; 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 S2390783AbeKLIWh (ORCPT + 99 others); Mon, 12 Nov 2018 03:22:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:53650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390708AbeKLIWg (ORCPT ); Mon, 12 Nov 2018 03:22:36 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 036CD223C6; Sun, 11 Nov 2018 22:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975559; bh=N7b2qu9dQsclSlsQXY+aYpIMB+uH5q4owG5i1mPTW9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xXTm1PjN+mVlCEiYkGHhPTPV8lzff78FGxLtpVw3WFjlo+499FoA8AsI1RJtkb0Wr vLFIPMQ6GWHLzr5eBmEZrFXObmCklJ4isojAfslQa2CwYlLitaxkunPnVrBCMnTyWs vVJJnwMCyO3GK0C0Cbo3aNm4LtqWLXKqq5L1Qvvw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Dr. Greg Wettstein" , Boris Ostrovsky , Jarkko Sakkinen Subject: [PATCH 4.14 117/222] tpm: Restore functionality to xen vtpm driver. Date: Sun, 11 Nov 2018 14:23:34 -0800 Message-Id: <20181111221658.218216842@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dr. Greg Wettstein commit e487a0f52301293152a6f8c4e217f2a11dd808e3 upstream. 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 Signed-off-by: Greg Kroah-Hartman [boris: Updated commit message, added Fixes tag] Signed-off-by: Boris Ostrovsky Cc: stable@vger.kernel.org # v4.1+ Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/xen-tpmfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/char/tpm/xen-tpmfront.c +++ b/drivers/char/tpm/xen-tpmfront.c @@ -203,7 +203,7 @@ static int setup_ring(struct xenbus_devi 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;