linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm: allow TCPA log area to be empty
@ 2018-03-10 16:16 Jarkko Sakkinen
  2018-03-12 11:09 ` Jarkko Sakkinen
  2018-03-12 15:02 ` Jason Gunthorpe
  0 siblings, 2 replies; 11+ messages in thread
From: Jarkko Sakkinen @ 2018-03-10 16:16 UTC (permalink / raw)
  To: linux-integrity
  Cc: linux-security-module, Sahil Rihan, Alexei Starovoitov,
	Jarkko Sakkinen, stable, Peter Huewe, Jason Gunthorpe,
	Arnd Bergmann, Greg Kroah-Hartman, open list

TCPA log are can be empty when the TPM is disabled. This commit changes the
behavior of tpm_read_log_acpi() to return successfully in this case.

Cc: stable@vger.kernel.org
Fixes: 55a82ab3181b ("[PATCH] tpm: add bios measurement log")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
---
 drivers/char/tpm/tpm_eventlog_acpi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/tpm/tpm_eventlog_acpi.c b/drivers/char/tpm/tpm_eventlog_acpi.c
index 66f19e93c216..f5f66dcd6f30 100644
--- a/drivers/char/tpm/tpm_eventlog_acpi.c
+++ b/drivers/char/tpm/tpm_eventlog_acpi.c
@@ -84,8 +84,8 @@ int tpm_read_log_acpi(struct tpm_chip *chip)
 		break;
 	}
 	if (!len) {
-		dev_warn(&chip->dev, "%s: TCPA log area empty\n", __func__);
-		return -EIO;
+		dev_info(&chip->dev, "TCPA log area is empty\n");
+		return 0;
 	}
 
 	/* malloc EventLog space */
-- 
2.15.1

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

end of thread, other threads:[~2018-03-27 15:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-10 16:16 [PATCH] tpm: allow TCPA log area to be empty Jarkko Sakkinen
2018-03-12 11:09 ` Jarkko Sakkinen
2018-03-12 15:02 ` Jason Gunthorpe
2018-03-16 12:55   ` Jarkko Sakkinen
2018-03-19  2:13     ` Jason Gunthorpe
2018-03-19 21:24       ` Jarkko Sakkinen
2018-03-20 22:29         ` Sahil Rihan
2018-03-22 14:20           ` Jarkko Sakkinen
2018-03-27  0:07             ` Sahil Rihan
2018-03-27  8:05               ` Jarkko Sakkinen
2018-03-27 15:37                 ` Sahil Rihan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).