Re: [Regression] Commit "tpm: Introduce function to poll for resultof self test" breaks suspend

From: Stefan Berger
Date: Sun Jan 15 2012 - 21:27:39 EST


On 01/15/2012 06:22 PM, Rafael J. Wysocki wrote:
Hi Stefan,

Hi Rafael,
Unfortunately, the following commit from you:

commit 68d6e6713fcb2ea6278661aaaf5f1c9c821b3751
Author: Stefan Berger<stefanb@xxxxxxxxxxxxxxxxxx>
Date: Fri Nov 11 12:57:04 2011 -0500

tpm: Introduce function to poll for result of self test

This patch introduces a function that runs the TPM_ContinueSelfTest()
function and then polls the TPM to check whether it finished the selftest
and can receive new commands.

Signed-off-by: Stefan Berger<stefanb@xxxxxxxxxxxxxxxxxx>

broke suspend on my Toshiba Portege R500. It causes the tpm driver to
return an error code from .suspend() on every attempt to suspend the system.


Can you show what the error output is?
Strange enough this function is not called during a suspend but during boot and again during resume. Can you try the following after a boot

cd /sys/devices
find -name pcrs | xargs cat

and see whether this displays 24 PCRs. This sends a couple of commands to the TPM. Then try a suspend. Did this help anything? If yes, can you run above commands again?

FYI: TPM_ContinueSelfTest is the only TPM function that triggers an asynchronous action of the TPM, here the continuation of its self test. To prevent subsequent commands sent to the TPM from failing due to the ongoing self test, we are now waiting for this command to finish. None of the machines that I tested it with had a TPM that actually did anything during the TPM_ContinueSelfTest() but must have fully completed their selftest during TPM_SelfTest() sent to it by the BIOS.

Revertig this commit on top of the current Linus' tree fixes the problem for me.

If necessary, I'll collect more information about this problem tomorrow.

The output of 'caps' would be interesting in the same dir as pcrs:

cd /sys/devices
find -name caps | xargs cat

Stefan

--
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/