From: Jerry Snitselaar <jsnitsel@redhat.com>
To: linux-integrity@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Subject: [PATCH 2/2] tpm: don't print error message in tpm_transmit_cmd when tpm still testing
Date: Wed, 30 Jan 2019 15:43:33 -0700 [thread overview]
Message-ID: <20190130224333.20373-2-jsnitsel@redhat.com> (raw)
In-Reply-To: <20190130224333.20373-1-jsnitsel@redhat.com>
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.
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
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
next prev parent reply other threads:[~2019-01-30 23:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 22:43 [PATCH 1/2] tpm: don't return bool from update_timeouts Jerry Snitselaar
2019-01-30 22:43 ` Jerry Snitselaar [this message]
2019-01-31 16:08 ` [PATCH 2/2] tpm: don't print error message in tpm_transmit_cmd when tpm still testing Jarkko Sakkinen
-- strict thread matches above, loose matches on Subject: below --
2019-01-30 22:06 [PATCH 1/2] tpm: don't return bool from update_timeouts Jerry Snitselaar
2019-01-30 22:06 ` [PATCH 2/2] tpm: don't print error message in tpm_transmit_cmd when tpm still testing Jerry Snitselaar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190130224333.20373-2-jsnitsel@redhat.com \
--to=jsnitsel@redhat.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).