Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp811200ybn; Wed, 2 Oct 2019 06:36:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/VMhTEH8+XPD17AuPHy6fdDiw5rfO/s5Cxwldg1NdUPV0vOPXhLR3RwPzEi/u4zazCrhi X-Received: by 2002:a17:906:5c07:: with SMTP id e7mr3087327ejq.127.1570023386975; Wed, 02 Oct 2019 06:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570023386; cv=none; d=google.com; s=arc-20160816; b=uAWIzrJ5nJO9oXpUUUUZBxV5gDuIjeaipA7jxlhUbhI2PfnjJYUxBvGksUrQZSsaRw jdNL3f6W0MOzf8igx7o1AQ77P02TRR0YVH4mVUN1DHntiYvLG0y9lWUEoxvQqnAfmlLx H4dpE3u/5k7xFKiemAqSu0ReMZvGFNlVXMwGlhj7wMzWECvrxhbkU1HxFGNixn4gWdg9 +z09Cb9+LEgFTjH7cPHCkCDX4nWS2oxITHsnUayF/GSJfUBhOcC4ARSJA4cXkN5D1WvQ +2/8KASbEPyKe/Y/gtcJ6onAAYHJ9eFziKi8OQK1s137JFZ4NYLMx8syOfP0MHdKti7N 8+qg== 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 :message-id:date:subject:cc:to:from; bh=hqCBOKWemU/Cea918u9KTcmFtWd7fhqil3VUlupdsKU=; b=Eat6tfP09hWy7790CHBW3UM42j243ybsa6BV8NmnQXQnaSUVDmHalxUaAdcTmiGqRB O1NaVUvbbfBolItII9CdMMRJofGG9g0KSRZFWorXQBcuZLvbr/qqVm4ZBD1oY9xHUJmW Jcgi3SMTsxdzvHn/KAR8TGQmVLzjMxb+/PYzXj6lrFIGtkSDYpjUbwDu4OzuZj2z1mNa WZerATtD3Gds7/efoiJ0gxpss/EHPzyeGkojvIln+WVhVHv1pIg82haauVgH2i8l/7o/ 1MBQUbj1kd5looDBQdOydwSjUC7YPUFfdTyVD77ThWj2YxPAOODmcBC3Eikq8RQxwIYG uruQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nj7si10755579ejb.262.2019.10.02.06.36.02; Wed, 02 Oct 2019 06:36:26 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727378AbfJBNOx (ORCPT + 99 others); Wed, 2 Oct 2019 09:14:53 -0400 Received: from mga11.intel.com ([192.55.52.93]:24909 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727134AbfJBNOw (ORCPT ); Wed, 2 Oct 2019 09:14:52 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Oct 2019 06:14:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,574,1559545200"; d="scan'208";a="191798092" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.158]) by fmsmga007.fm.intel.com with ESMTP; 02 Oct 2019 06:14:50 -0700 From: Jarkko Sakkinen To: linux-stabley@vger.kernel.org Cc: Jarkko Sakkinen , Jason Gunthorpe , linux-integrity@vger.kernel.org (open list:TPM DEVICE DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 0/3] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations Date: Wed, 2 Oct 2019 16:14:41 +0300 Message-Id: <20191002131445.7793-1-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 upstream This backport is for v4.14 and v4.19 The backport requires non-racy behaviour from TPM 1.x sysfs code. Thus, the dependecies for that are included. NOTE: 1/3 is only needed for v4.14. v2: * Something happened when merging 3/3 that write lock was taken twice. Fixed in this version. Did also sanity check test with TPM2: echo devices > /sys/power/pm_test && echo mem > /sys/power/state Jarkko Sakkinen (2): tpm: migrate pubek_show to struct tpm_buf tpm: use tpm_try_get_ops() in tpm-sysfs.c. Vadim Sukhomlinov (1): tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations drivers/char/tpm/tpm-chip.c | 5 +- drivers/char/tpm/tpm-sysfs.c | 201 +++++++++++++++++++++-------------- drivers/char/tpm/tpm.h | 13 --- 3 files changed, 124 insertions(+), 95 deletions(-) -- 2.20.1