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]
Message-ID: <18107.1215803534@turing-police.cc.vt.edu>
Date:	Fri, 11 Jul 2008 15:12:14 -0400
From:	Valdis.Kletnieks@...edu
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Marcin Obara <marcin_obara@...rs.sourceforge.net>,
	Marcel Selhorst <tpm@...horst.net>,
	Kylene Jo Hall <kjhall@...ibm.com>
Cc:	linux-kernel@...r.kernel.org
Subject: patch tpm-correct-tpm-timeouts-to-jiffies-conversion.patch breaks stuff

With tpm-correct-tpm-timeouts-to-jiffies-conversion.patch reverted, I
get -ETIME errors from libtpm2.0/utils/tpm_demo:

With the patch in place, the first read dies horribly, as reported by
strace -T -r utils/tpm_demo:

0.000969 open("/dev/tpm0", O_RDWR) = 3 <0.000080>
0.000237 write(3, "\0\301\0\0\0\22\0\0\0e\0\0\0\6\0\0\0\0", 18) = 18 <0.012652>
0.012814 read(3, 0x7fffd26cd430, 4096) = -1 ETIME (Timer expired) <0.000068>
0.000168 close(3)                  = 0 <0.000041>
0.000132 exit_group(-1)            = ?

Note that the write() call took 0.012 seconds, but the read() was hit with
a -ETIME after only 0.000068 seconds, so it's obviously too short.  With
the patch reverted, the timings look like:

0.000237 open("/dev/tpm0", O_RDWR) = 3 <0.000044>
0.000195 write(3, "\0\301\0\0\0\22\0\0\0e\0\0\0\6\0\0\0\0", 18) = 18 <0.012048>
0.012221 read(3, "\0\304\0\0\0\22\0\0\0\0\0\0\0\4\1\1\0\0", 4096) = 18 <0.000049>
0.000172 close(3)                  = 0 <0.000029>

and things continue merrily along...

Dumping the raw values in the 'data + TPM_GET_CAP_mumble' I see:

[ 2170.060661] timeout 1 = 750000
[ 2170.060866] timeout 2 = 2000000
[ 2170.060994] timeout 3 = 750000
[ 2170.061119] timeout 4 = 750000
[ 2170.072437] raw durations are 1000 2000000 120000000

(all values are before application of foo_to_jiffies)

So is the spec wrong, or is my chipset on drugs, or?

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ