Thread (6 messages) flat view 6 messages, 3 authors, 2015-01-27

Re: [tpmdd-devel] [PATCH] tpm: fix suspend/resume paths for TPM 2.0

From: Jarkko Sakkinen <hidden>
Date: 2015-01-27 17:33:32
Also in: lkml

On Tue, 2015-01-27 at 19:23 +0200, Jarkko Sakkinen wrote:
On Tue, 2015-01-27 at 10:03 -0700, Jason Gunthorpe wrote:
quoted
On Tue, Jan 27, 2015 at 06:57:22PM +0200, Jarkko Sakkinen wrote:
quoted
quoted
quoted
+	/* TPM 1.2 requires self-test on resume. */
+	if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) {
+		ret = tpm_do_selftest(chip);
+		if (ret < 0)
+			return ret;
Just to note, the return value from tpm_do_selftest() on TPM 1.2 chips was 
previously ignored. Mine does return 0.
Right. I can update the patch to ignore return value if the majority
wants that.
What happens to the system when pnp_driver.resume() returns failure?

Should tpm ever report failure on resume to the rest of the kernel?

Shouldn't this stuff be in tpm_pm_resume common code anyhow?
I think it should but not in the scope of this bug fix IMHO.
This may sound stupid but maybe I should not handle the return value of
tpm_do_selftest() with the same reasoning (not in the scope of this fix)
because it modifies semantics and my fix only fixes TPM 2.0 stuff.

I could leave a comment there that this return value is not handle as a
remainder.
quoted
Jason
/Jarkko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help