From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Jerry Snitselaar" <jsnitsel@redhat.com>,
<linux-kernel@vger.kernel.org>, <linux-integrity@vger.kernel.org>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
"Jason Gunthorpe" <jgg@ziepe.ca>,
"Peter Huewe" <peterhuewe@gmx.de>, <stable@vger.kernel.org>,
"Linux regressions mailing list" <regressions@lists.linux.dev>,
"Mario Limonciello" <mario.limonciello@amd.com>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
"Sachin Sant" <sachinp@linux.ibm.com>
Subject: Re: [PATCH] tpm: return false from tpm_amd_is_rng_defective on non-x86 platforms
Date: Fri, 30 Jun 2023 13:07:00 +0300 [thread overview]
Message-ID: <CTPWGNGECE0A.7MSU6S60YWDK@suppilovahvero> (raw)
In-Reply-To: <20230629204147.1852823-1-jsnitsel@redhat.com>
On Thu Jun 29, 2023 at 11:41 PM EEST, Jerry Snitselaar wrote:
> tpm_amd_is_rng_defective is for dealing with an issue related to the
> AMD firmware TPM, so on non-x86 architectures just have it inline and
> return false.
>
> Cc: Jarkko Sakkinen <jarkko@kernel.org>
> Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Peter Huewe <peterhuewe@gmx.de>
> Cc: stable@vger.kernel.org
> Cc: Linux regressions mailing list <regressions@lists.linux.dev>
> Cc: Mario Limonciello <mario.limonciello@amd.com>
> Reported-by: Aneesh Kumar K. V <aneesh.kumar@linux.ibm.com>
> Reported-by: Sachin Sant <sachinp@linux.ibm.com>
> Closes: https://lore.kernel.org/lkml/99B81401-DB46-49B9-B321-CF832B50CAC3@linux.ibm.com/
> Fixes: f1324bbc4011 ("tpm: disable hwrng for fTPM on some AMD designs")
> Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
> ---
> drivers/char/tpm/tpm-chip.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
> index cd48033b804a..cf5499e51999 100644
> --- a/drivers/char/tpm/tpm-chip.c
> +++ b/drivers/char/tpm/tpm-chip.c
> @@ -518,6 +518,7 @@ static int tpm_add_legacy_sysfs(struct tpm_chip *chip)
> * 6.x.y.z series: 6.0.18.6 +
> * 3.x.y.z series: 3.57.y.5 +
> */
> +#ifdef CONFIG_X86
> static bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
> {
> u32 val1, val2;
> @@ -566,6 +567,12 @@ static bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
>
> return true;
> }
> +#else
> +static inline bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
> +{
> + return false;
> +}
> +#endif /* CONFIG_X86 */
>
> static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
> {
> --
> 2.38.1
Sanity check, this was the right patch, right?
I'll apply it.
BR, Jarkko
next prev parent reply other threads:[~2023-06-30 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 20:41 Jerry Snitselaar
2023-06-30 10:07 ` Jarkko Sakkinen [this message]
2023-06-30 12:08 ` Limonciello, Mario
2023-07-05 17:04 ` Jerry Snitselaar
2023-07-07 16:07 ` Linux regression tracking (Thorsten Leemhuis)
2023-07-07 20:18 ` Jerry Snitselaar
2023-07-10 13:31 ` 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=CTPWGNGECE0A.7MSU6S60YWDK@suppilovahvero \
--to=jarkko@kernel.org \
--cc=Jason@zx2c4.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=jgg@ziepe.ca \
--cc=jsnitsel@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=peterhuewe@gmx.de \
--cc=regressions@lists.linux.dev \
--cc=sachinp@linux.ibm.com \
--cc=stable@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
all inboxes | Powered by JetHome®