linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm: don't print error message in tpm_transmit_cmd when tpm still testing
@ 2019-01-29 18:59 Jerry Snitselaar
  2019-01-30 21:22 ` Jarkko Sakkinen
  0 siblings, 1 reply; 2+ messages in thread
From: Jerry Snitselaar @ 2019-01-29 18:59 UTC (permalink / raw)
  To: linux-integrity
  Cc: linux-kernel, Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe

Currently tpm_transmit_cmd will print an error message if the tpm
returns something other than TPM2_RC_SUCCESS. This means that if the
tpm returns that it is testing an error message will be printed, and
this can cause confusion for the end user. So avoid printing the error
message if TPM2_RC_TESTING is the return code.

Cc: Peter Huewe <peterhuewe@gmx.de>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
 drivers/char/tpm/tpm-interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index d9439f9abe78..6339a2e289ae 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -397,7 +397,7 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_space *space,
 
 	err = be32_to_cpu(header->return_code);
 	if (err != 0 && err != TPM_ERR_DISABLED && err != TPM_ERR_DEACTIVATED
-	    && desc)
+	    && err != TPM2_RC_TESTING && desc)
 		dev_err(&chip->dev, "A TPM error (%d) occurred %s\n", err,
 			desc);
 	if (err)
-- 
2.20.1.98.gecbdaf0899


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

* Re: [PATCH] tpm: don't print error message in tpm_transmit_cmd when tpm still testing
  2019-01-29 18:59 [PATCH] tpm: don't print error message in tpm_transmit_cmd when tpm still testing Jerry Snitselaar
@ 2019-01-30 21:22 ` Jarkko Sakkinen
  0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2019-01-30 21:22 UTC (permalink / raw)
  To: Jerry Snitselaar
  Cc: linux-integrity, linux-kernel, Peter Huewe, Jason Gunthorpe

On Tue, Jan 29, 2019 at 11:59:11AM -0700, Jerry Snitselaar wrote:
> Currently tpm_transmit_cmd will print an error message if the tpm
> returns something other than TPM2_RC_SUCCESS. This means that if the
> tpm returns that it is testing an error message will be printed, and
> this can cause confusion for the end user. So avoid printing the error
> message if TPM2_RC_TESTING is the return code.
> 
> Cc: Peter Huewe <peterhuewe@gmx.de>
> Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

And applied. Thanks.

/Jarkko

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

end of thread, other threads:[~2019-01-30 21:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-29 18:59 [PATCH] tpm: don't print error message in tpm_transmit_cmd when tpm still testing Jerry Snitselaar
2019-01-30 21:22 ` Jarkko Sakkinen

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