Re: [tpmdd-devel] [PATCH] TPM: Work around buggy TPMs that blockduring continue self test

From: Kent Yoder
Date: Tue Jan 22 2013 - 18:37:25 EST


Hi Jason,

On Wed, Nov 21, 2012 at 3:15 PM, Jason Gunthorpe
<jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote:
> We've been testing an alternative TPM for our embedded products and
> found random kernel boot failures due to time outs after the continue
> self test command.
>
> This was happening randomly, and has been *very* hard to track down, but it
> looks like with this chip there is some kind of race with the tpm_tis_status()
> check of TPM_STS_COMMAND_READY. If things get there 'too fast' then
> it sees the chip is ready, or tpm_tis_ready() works. Otherwise it takes
> somewhere over 400ms before the chip will return TPM_STS_COMMAND_READY.
>
> Adding some delay after tpm_continue_selftest() makes things reliably
> hit the failure path, otherwise it is a crapshot.

I've staged this patch here, please test:

https://github.com/shpedoikal/linux.git tpmdd-01-22-13

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