lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Oct 2011 13:17:02 -0300
From:	Rajiv Andrade <srajiv@...ux.vnet.ibm.com>
To:	James Morris <jmorris@...ei.org>
CC:	Stefan Berger <stefanb@...ux.vnet.ibm.com>, a.miskiewicz@...il.com,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [GIT PULL] TPM suspend regression fix

Hi James,

Please pull the change since commit e00fb3f7af111d1b3252f7d622213d2e22be65f5 in
your next branch:

   TOMOYO: Fix domain transition failure warning. (2011-09-28 11:53:15 +1000)

that is available in the git repository at:
   git://github.com/srajiv/tpm.git for-james

Stefan Berger (1):
       TPM: Refuse activation of tpm_tis driver if TPM is not working correctly

  drivers/char/tpm/tpm_tis.c |   13 +++++++++++++
  1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 3f4051a..2369e78 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -549,6 +549,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
  	u32 vendor, intfcaps, intmask;
  	int rc, i, irq_s, irq_e;
  	struct tpm_chip *chip;
+	u8 digest[TPM_DIGEST_SIZE];

  	if (!(chip = tpm_register_hardware(dev,&tpm_tis)))
  		return -ENODEV;
@@ -616,6 +617,18 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
  	/* get the timeouts before testing for irqs */
  	tpm_get_timeouts(chip);

+	/* test for correctly working TPM; refuse driver if not working
+	   to prevent suspend/resume problems */
+	rc = tpm_pcr_read(chip->dev_num, 0, digest);
+	if (rc != 0) {
+		dev_err(dev, "Could not read PCR 0. "
+			"TPM is not working correctly.\n");
+		dev_err(dev, "Was machine previously suspended without TPM "
+			"driver present?\n");
+		rc = -ENODEV;
+		goto out_err;
+	}
+
  	/* INTERRUPT Setup */
  	init_waitqueue_head(&chip->vendor.read_queue);
  	init_waitqueue_head(&chip->vendor.int_queue);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ