public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tpm: Don't make vendor check required for probe
@ 2023-08-18 18:15 Mario Limonciello
  2023-08-18 22:07 ` Jarkko Sakkinen
  2023-08-28 15:47 ` Dusty Mabe
  0 siblings, 2 replies; 9+ messages in thread
From: Mario Limonciello @ 2023-08-18 18:15 UTC (permalink / raw)
  To: jarkko
  Cc: linux-integrity, linux-kernel, Thorsten Leemhuis,
	charles.d.prestopine, rafael.j.wysocki, len.brown,
	Mario Limonciello, stable, Todd Brandt

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


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

end of thread, other threads:[~2023-09-04 18:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 18:15 [PATCH] tpm: Don't make vendor check required for probe Mario Limonciello
2023-08-18 22:07 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox