Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2984467imu; Mon, 19 Nov 2018 09:00:00 -0800 (PST) X-Google-Smtp-Source: AJdET5fYiCRpWMhfEFhtJEbx9d6sVCAhBc2k7RGlk3zLeDvfQzX1bBxrw7u01dL8u1zeEu81f1gj X-Received: by 2002:a63:a401:: with SMTP id c1mr20878207pgf.403.1542646799970; Mon, 19 Nov 2018 08:59:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542646799; cv=none; d=google.com; s=arc-20160816; b=KH4ToeeHITYs1DeuCgWeQzxrd0l+PedQdUhahJ1gr8g99SgrrhksFNwkmX6TT/+rkQ ILhOAdUy/TN+KyB/bObWwDhohcqWoBr8bIIVSLhgvqwnBd6VBwnBioXfvolLx3hYZmk6 ZQaw/GCgsNANOys9ezNHrCdLM8tUifXJRu1qpxf6HUzukqkhlf4nhWip6BUfxhFOpcfX Du5/ET+iFBDsn4GsmPoLxOZVvHcCtSdle/oq43fRpuJCwYTd7Mj1P+JsrQxpsKpNlv3N mamqY6KVsaDCqC0tKwdDlx0VhM2coVLMSkLFS77nZV3jjlvhp69eI2hrvV0fABxHohT0 yoRg== 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=OalqrAFM1LXodiWNIEB/2HCsZnwFW0V+q5i4k/6KU5A=; b=a3hbyvBJSq+53P6INi3QQd0KIVxyItuBsb5LV62z9u8ZU5TJ4Ezxg8i8lOnLimwwWX B7At224Tpt11IFO8ssSiew7NEREkg2yb+E52ZarOL8kiSNMSHeuz2+Na1bZUE4TsHIsA 9s/4hPBCKQSiKb2C80HwwtYgMFFygDNSa8hxo8gATo0+PufWEgKClP9llJNmQeLlGEs3 wFNRKJN3ONUShVoI/lq3WX2o09Yg0tQ13/TqoiAhSdZgzoaBuX98B0TwB3ansYvbI4KR +dx4QF/sfEMZKjUJmJ9B1qJ4GJF7mnqJ/9Vz7g3q7twn/ZnlIfaSqerXYpuqj8dtAbc6 sC2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X0PYjE8w; 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 w1-v6si44596530plk.317.2018.11.19.08.59.45; Mon, 19 Nov 2018 08:59:59 -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=X0PYjE8w; 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 S2404647AbeKTDWF (ORCPT + 99 others); Mon, 19 Nov 2018 22:22:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:33636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403956AbeKTDWF (ORCPT ); Mon, 19 Nov 2018 22:22:05 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 3DE1721104; Mon, 19 Nov 2018 16:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542646669; bh=kbsx10bazWOhqOdhiTaHSx9F41RUywtFdjILJhXJ7ls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X0PYjE8wT0JkGgXFeiMnV2o3nZfPInujRHhrG8xAk1BTqfY5A3whSbKLC5JddidP4 fYiv2nRuscQYNGgLhR28HxVAUuj1tCmdOa1vtCr3h2SJWyMD5XDfIuJvhpAfSGyUc5 QKUxEiVXqJRGDmS1GCCC1we6fDlbmmHDq8FbY4RE= 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.4 045/160] tpm: Restore functionality to xen vtpm driver. Date: Mon, 19 Nov 2018 17:28:04 +0100 Message-Id: <20181119162635.854046743@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162630.031306128@linuxfoundation.org> References: <20181119162630.031306128@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.4-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 @@ -201,7 +201,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;