Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3479456imu; Sun, 11 Nov 2018 16:03:15 -0800 (PST) X-Google-Smtp-Source: AJdET5czJoyMyUDoEWd1Wt9E1OHU85FnyzodcLc/n/U1Qj5FJrjGQw7Pef2TrMZYq8J4sugZ5RMN X-Received: by 2002:a63:344e:: with SMTP id b75mr15082193pga.184.1541980995617; Sun, 11 Nov 2018 16:03:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980995; cv=none; d=google.com; s=arc-20160816; b=0nQHQwXNLQf8MuwA4CdglwOSEBL2Ka8ZsQZU66x+UV/doQ+oXIRESqxjlyh4VNzwRl F/M7jd7yVrEGgmHMg5mBCh1/TLvJWa3hipraVkdk8ofAhWQVb0af3yvlfGQWCgc+YX9j ROnxYAdI+bMBOen+oszwrClnXZq4DDoLbRbHlhc9m+H3sCUoPmW4G0rTrX5V1PslZq2B lpYJe2yMBXpLhNaBUqESI6GT8TUybv4BqK3h5lcPGco63Q+8+8JR98AGLMzONxkB+nWW yTwXPZkrB7WEv1I8lEgdQXVSNO8Bdhse+3hVvbhL8DTUUhUvFdH+5Ef7YsurMzDC8oNB P9yA== 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=tQ0NPf2TjVRKyfkhw07VQPflj9EcGSAhXsDL9y4KVn0=; b=Bz0qbzARaTiciiSqgqteQ0km4d6HGIkBNtFKiMew/dTxznCJitw0aiU4Zq130BvJo6 EAWjaEu6V7rV+v5fEFlKTEiMg4OMIsml6X0menxvxnPJ19ayqnG5JBNSe/PAnhPge3Vz WnGoKiSXll2UghHKK+6+mXAICmCiDreeON7keQf4bQA9eBynZWno/GclZL1a8OAQbPb7 ZX5VP6Iv0y89iHpzh9AH+0g1gmwGKs8BSoKQNuCZSM1sStI1Xea/Ik5ak2Sqo/byIO0V jSaTiJVo7scsORggUbselIWi3uL4BmJIP+wsNDqZSvQGB4338HvYXYO5dJiZYmc+PmZz onWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NoQtaDnw; 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 a123-v6si13821117pgc.219.2018.11.11.16.02.59; Sun, 11 Nov 2018 16:03:15 -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=NoQtaDnw; 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 S1732250AbeKLIR5 (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:35400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732193AbeKLIR4 (ORCPT ); Mon, 12 Nov 2018 03:17:56 -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 B3BDA215EA; Sun, 11 Nov 2018 22:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975280; bh=cXv+kdoIzE5qQ0NQYtApMCDFTFQEfuvvUuUjUmEnz2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NoQtaDnwIEsFfKtAW3In1cdtaP/mLehjh5NrglnBVibBOJTOecrXWB5SFi2w7WIXg tNQV/zKoG4bgareevA34eQvByE88XBji0Eegw76/+SFL6lnxG7E29GAHUkiVzPjQ+d GWp+C9BJeumKMUZvVx7ahIuye3yp8XBbA4b5AkqY= 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.19 200/361] tpm: Restore functionality to xen vtpm driver. Date: Sun, 11 Nov 2018 14:19:07 -0800 Message-Id: <20181111221648.483124926@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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 @@ -264,7 +264,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;