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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <15114.1217045033@turing-police.cc.vt.edu>
Date:	Sat, 26 Jul 2008 00:03:53 -0400
From:	Valdis.Kletnieks@...edu
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Marcin Obara <marcin_obara@...rs.sourceforge.net>
Cc:	linux-kernel@...r.kernel.org, Marcel Selhorst <tpm@...horst.net>,
	Kylene Jo Hall <kjhall@...ibm.com>,
	tpmdd-devel@...ts.sourceforge.net
Subject: [PATCH] 2.6.26-mmotm tpm-correct-tpm-timeouts-to-jiffies-conversion-d820-fix.patch

Patch tpm-correct-tpm-timeouts-to-jiffies-conversion reveals a bug in the
Broadcom BCM0102 TPM chipset used in the Dell Latitude D820 - although most of
the timeouts are returned in usecs as per the spec, one is apparently returned
in msecs, which results in a timeout when the code treats it as usecs.  To
prevent a regression, we check for the known too-short value and adjust it to a
value that makes things work.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@...edu>
cc: Marcin Obara <marcin_obara@...rs.sourceforge.net>

--- linux-2.6.26-mmotm-0724/drivers/char/tpm/tpm.c.broadcom	2008-07-25 22:13:47.000000000 -0400
+++ linux-2.6.26-mmotm-0724/drivers/char/tpm/tpm.c	2008-07-25 23:30:38.000000000 -0400
@@ -557,6 +557,13 @@ duration:
 	    usecs_to_jiffies(be32_to_cpu
 			     (*((__be32 *) (data +
 					    TPM_GET_CAP_RET_UINT32_1_IDX))));
+	/* The Broadcom BCM0102 chipset in a Dell Latitude D820 gets the above
+	 * value wrong and apparently reports msecs rather than usecs. Test
+	 * for the specific buggy value and adjust it to prevent a regression.
+	 */
+	if (chip->vendor.duration[TPM_SHORT] == 1)
+		chip->vendor.duration[TPM_SHORT] *= 1000;
+
 	chip->vendor.duration[TPM_MEDIUM] =
 	    usecs_to_jiffies(be32_to_cpu
 			     (*((__be32 *) (data +


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ