From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C884C31E41 for ; Thu, 11 Jul 2019 17:04:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6653E21019 for ; Thu, 11 Jul 2019 17:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562864682; bh=ZtQbjTKSuG5miBFoKtVBUh9w0F5SVtSPWCsiPg1i9Fo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=HvIEG+TzkOt/EDkrZE/H0D0fsegVlDJOfAM1ugkdPvY2yLSXe309d9FY6713K2r5w RsLrAV3BmVWirwa2E2rnCd/Gj97lI5yqAwcohgcxmL9gXWYwRy7GvSpHM98Nj+BcMI kusWaotf75+fZ0a1c9geodG6ZFXZT22tXJMNHkR4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728748AbfGKREl (ORCPT ); Thu, 11 Jul 2019 13:04:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:53960 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbfGKREl (ORCPT ); Thu, 11 Jul 2019 13:04:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 A67932084B; Thu, 11 Jul 2019 17:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562864680; bh=ZtQbjTKSuG5miBFoKtVBUh9w0F5SVtSPWCsiPg1i9Fo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GeFU5ITLxBKdmriot8FGzOsfEBIvdDqkmvEqLn63s1pW2FnpQGlQ0qEnhSPcurbc7 cFUwxVR8BFQ+AQBjr3ZTITnWKw3bNnoWsZ2xJUxOsmg//p7SOder5U6hq7WC2D6zlU IIPMtd5MzVGC+UPI+46EJrH/6armNOEcFbsj84v0= Date: Thu, 11 Jul 2019 19:04:37 +0200 From: Greg KH To: Jason Gunthorpe Cc: Douglas Anderson , stable@vger.kernel.org, groeck@chromium.org, sukhomlinov@google.com, jarkko.sakkinen@linux.intel.com, Arnd Bergmann , Peter Huewe , linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org Subject: Re: [PATCH] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations Message-ID: <20190711170437.GA7544@kroah.com> References: <20190711162919.23813-1-dianders@chromium.org> <20190711163915.GD25807@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190711163915.GD25807@ziepe.ca> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 11, 2019 at 01:39:15PM -0300, Jason Gunthorpe wrote: > On Thu, Jul 11, 2019 at 09:29:19AM -0700, Douglas Anderson wrote: > > From: Vadim Sukhomlinov > > > > commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 upstream. > > > > TPM 2.0 Shutdown involve sending TPM2_Shutdown to TPM chip and disabling > > future TPM operations. TPM 1.2 behavior was different, future TPM > > operations weren't disabled, causing rare issues. This patch ensures > > that future TPM operations are disabled. > > > > Fixes: d1bd4a792d39 ("tpm: Issue a TPM2_Shutdown for TPM2 devices.") > > Cc: stable@vger.kernel.org > > Signed-off-by: Vadim Sukhomlinov > > [dianders: resolved merge conflicts with mainline] > > Signed-off-by: Douglas Anderson > > Reviewed-by: Jarkko Sakkinen > > Signed-off-by: Jarkko Sakkinen > > This is the backport of the patch referenced above to 4.19 as was done > > in Chrome OS. See for details. It > > presumably applies to some older kernels. NOTE that the problem > > itself has existed for a long time, but continuing to backport this > > exact solution to super old kernels is out of scope for me. For those > > truly interested feel free to reference the past discussion [1]. > > > > Reason for backport: mainline has commit a3fbfae82b4c ("tpm: take TPM > > chip power gating out of tpm_transmit()") and commit 719b7d81f204 > > ("tpm: introduce tpm_chip_start() and tpm_chip_stop()") and it didn't > > seem like a good idea to backport 17 patches to avoid the conflict. > > Careful with this, you can't backport this to any kernels that don't > have the sysfs ops locking changes or they will crash in sysfs code. And what commit added that? thanks, greg k-h