tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm: invalid self test error message
@ 2016-09-02  5:56 Jarkko Sakkinen
       [not found] ` <1472795790-15131-1-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  2016-09-02 17:07 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2016-09-02  5:56 UTC (permalink / raw)
  To: Peter Huewe
  Cc: linux-security-module, Jarkko Sakkinen, Marcel Selhorst,
	Jason Gunthorpe, moderated list:TPM DEVICE DRIVER, open list

The driver emits invalid self test error message even though the init
succeeds.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Fixes: cae8b441fc20 ("tpm: Factor out common startup code")
---
 drivers/char/tpm/tpm2-cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index 955fd26..906c285 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -966,7 +966,7 @@ int tpm2_auto_startup(struct tpm_chip *chip)
 		goto out;
 
 	rc = tpm2_do_selftest(chip);
-	if (rc != TPM2_RC_INITIALIZE) {
+	if (rc != 0 && rc != TPM2_RC_INITIALIZE) {
 		dev_err(&chip->dev, "TPM self test failed\n");
 		goto out;
 	}
@@ -983,7 +983,6 @@ int tpm2_auto_startup(struct tpm_chip *chip)
 		}
 	}
 
-	return rc;
 out:
 	if (rc > 0)
 		rc = -ENODEV;
-- 
2.7.4


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

* Re: [PATCH] tpm: invalid self test error message
       [not found] ` <1472795790-15131-1-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2016-09-02  6:50   ` James Morris
  0 siblings, 0 replies; 3+ messages in thread
From: James Morris @ 2016-09-02  6:50 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: open list, linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	moderated list:TPM DEVICE DRIVER

On Fri, 2 Sep 2016, Jarkko Sakkinen wrote:

> The driver emits invalid self test error message even though the init
> succeeds.
> 
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>


Reviewed-by: James Morris <james.l.morris-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>


-- 
James Morris
<jmorris-gx6/JNMH7DfYtjvyW6yDsg@public.gmane.org>


------------------------------------------------------------------------------

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

* Re: [PATCH] tpm: invalid self test error message
  2016-09-02  5:56 [PATCH] tpm: invalid self test error message Jarkko Sakkinen
       [not found] ` <1472795790-15131-1-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2016-09-02 17:07 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2016-09-02 17:07 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Peter Huewe, linux-security-module, Marcel Selhorst,
	moderated list:TPM DEVICE DRIVER, open list

On Fri, Sep 02, 2016 at 08:56:29AM +0300, Jarkko Sakkinen wrote:
> The driver emits invalid self test error message even though the init
> succeeds.
> 
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Fixes: cae8b441fc20 ("tpm: Factor out common startup code")

Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reported-by: Petr Vandrovec <petr@vmware.com>

Jason

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

end of thread, other threads:[~2016-09-02 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-02  5:56 [PATCH] tpm: invalid self test error message Jarkko Sakkinen
     [not found] ` <1472795790-15131-1-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-09-02  6:50   ` James Morris
2016-09-02 17:07 ` Jason Gunthorpe

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).