mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* patch tpm-correct-tpm-timeouts-to-jiffies-conversion.patch breaks stuff
@ 2008-07-11 19:12 Valdis.Kletnieks
  2008-07-11 19:39 ` Marcin Obara
  2008-07-11 22:08 ` Marcin Obara
  0 siblings, 2 replies; 4+ messages in thread
From: Valdis.Kletnieks @ 2008-07-11 19:12 UTC (permalink / raw)
  To: Andrew Morton, Marcin Obara, Marcel Selhorst, Kylene Jo Hall; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]

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?

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-11 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-11 19:12 patch tpm-correct-tpm-timeouts-to-jiffies-conversion.patch breaks stuff Valdis.Kletnieks
2008-07-11 19:39 ` Marcin Obara
2008-07-11 20:18   ` Valdis.Kletnieks
2008-07-11 22:08 ` Marcin Obara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®