All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: <jarkko@kernel.org>
Cc: <linux-integrity@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Thorsten Leemhuis <regressions@leemhuis.info>,
	<charles.d.prestopine@intel.com>, <rafael.j.wysocki@intel.com>,
	<len.brown@intel.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	<stable@vger.kernel.org>, Todd Brandt <todd.e.brandt@intel.com>
Subject: [PATCH] tpm: Don't make vendor check required for probe
Date: Fri, 18 Aug 2023 13:15:16 -0500	[thread overview]
Message-ID: <20230818181516.19167-1-mario.limonciello@amd.com> (raw)

The vendor check introduced by commit 554b841d4703 ("tpm: Disable RNG for
all AMD fTPMs") doesn't work properly on Intel fTPM.  The TPM doesn't reply
at bootup and returns back the command code.

As this isn't crucial for anything but AMD fTPM and AMD fTPM works, throw
away the error code to let Intel fTPM continue to work.

Cc: stable@vger.kernel.org
Fixes: 554b841d4703 ("tpm: Disable RNG for all AMD fTPMs")
Reported-by: Todd Brandt <todd.e.brandt@intel.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217804
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/char/tpm/tpm_crb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index 9eb1a18590123..b0e9931fe436c 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -472,8 +472,7 @@ static int crb_check_flags(struct tpm_chip *chip)
 	if (ret)
 		return ret;
 
-	ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, &val, NULL);
-	if (ret)
+	if (tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, &val, NULL))
 		goto release;
 
 	if (val == 0x414D4400U /* AMD */)
-- 
2.34.1


             reply	other threads:[~2023-08-18 18:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18 18:15 Mario Limonciello [this message]
2023-08-18 22:07 ` [PATCH] tpm: Don't make vendor check required for probe Jarkko Sakkinen
2023-08-18 22:38   ` Limonciello, Mario
2023-08-18 23:44     ` Jarkko Sakkinen
2023-08-18 23:57       ` Limonciello, Mario
2023-08-19 13:35         ` Patrick Steinhardt
2023-08-22 11:25         ` Jarkko Sakkinen
2023-08-28 15:47 ` Dusty Mabe
2023-09-04 18:15   ` Jarkko Sakkinen

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=20230818181516.19167-1-mario.limonciello@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=charles.d.prestopine@intel.com \
    --cc=jarkko@kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=regressions@leemhuis.info \
    --cc=stable@vger.kernel.org \
    --cc=todd.e.brandt@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.