From: Raymond Jay Golo <rjgolo@gmail.com>
To: ronan@rjp.ie
Cc: jarkko@kernel.org, linux-integrity@vger.kernel.org,
linux-kernel@vger.kernel.org, mario.limonciello@amd.com,
ps@pks.im, rjgolo@gmail.com, stable@vger.kernel.org,
todd.e.brandt@intel.com
Subject: Re: [PATCH v2] tpm: Don't make vendor check required for probe
Date: Tue, 22 Aug 2023 19:50:49 +0800 [thread overview]
Message-ID: <20230822115049.6276-1-rjgolo@gmail.com> (raw)
In-Reply-To: <5c5de3dee5e5fcc4fbdf80226f0697f6269c585f@rjp.ie>
> The vendor check introduced by commit 554b841d4703 ("tpm: Disable RNG for
> all AMD fTPMs") doesn't work properly on a number of Intel fTPMs. On the
> reported systems the TPM doesn't reply at bootup and returns back the
> command code. This makes the TPM fail probe.
>
> As this isn't crucial for anything but AMD fTPM and AMD fTPM works, check
> the chip vendor and if it's not AMD don't run the checks.
>
> Cc: stable@vger.kernel.org
> Fixes: 554b841d4703 ("tpm: Disable RNG for all AMD fTPMs")
> Reported-by: Todd Brandt <todd.e.brandt@intel.com>
> Reported-by: Patrick Steinhardt <ps@pks.im>
> Reported-by: Ronan Pigott <ronan@rjp.ie>
> Reported-by: Raymond Jay Golo <rjgolo@gmail.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217804
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> v1->v2:
> * Check x86 vendor for AMD
> ---
> drivers/char/tpm/tpm_crb.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
> index 9eb1a18590123..7faf670201ccc 100644
> --- a/drivers/char/tpm/tpm_crb.c
> +++ b/drivers/char/tpm/tpm_crb.c
> @@ -465,8 +465,12 @@ static bool crb_req_canceled(struct tpm_chip *chip, u8 status)
>
> static int crb_check_flags(struct tpm_chip *chip)
> {
> + int ret = 0;
> +#ifdef CONFIG_X86
> u32 val;
> - int ret;
> +
> + if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
> + return ret;
>
> ret = crb_request_locality(chip, 0);
> if (ret)
> @@ -481,6 +485,7 @@ static int crb_check_flags(struct tpm_chip *chip)
>
> release:
> crb_relinquish_locality(chip, 0);
> +#endif
>
> return ret;
> }
> --
> 2.34.1
Fixes problem on my machine.
Tested-by: Raymond Jay Golo <rjgolo@gmail.com>
next prev parent reply other threads:[~2023-08-22 11:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-21 14:02 [PATCH v2] tpm: Don't make vendor check required for probe Mario Limonciello
2023-08-22 3:33 ` Ronan Pigott
2023-08-22 11:50 ` Raymond Jay Golo [this message]
2023-08-22 13:22 ` Jarkko Sakkinen
2023-08-22 14:05 ` Mario Limonciello
2023-08-22 14:56 ` Jarkko Sakkinen
2023-08-22 19:50 ` Jerry Snitselaar
2023-08-22 20:29 ` Jarkko Sakkinen
2023-08-22 20:32 ` Jarkko Sakkinen
2023-08-22 20:39 ` 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=20230822115049.6276-1-rjgolo@gmail.com \
--to=rjgolo@gmail.com \
--cc=jarkko@kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=ps@pks.im \
--cc=ronan@rjp.ie \
--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.