This is a note to let you know that I've just added the patch titled tpm: return false from tpm_amd_is_rng_defective on non-x86 platforms to the 6.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tpm-return-false-from-tpm_amd_is_rng_defective-on-non-x86-platforms.patch and it can be found in the queue-6.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From ecff6813d2bcf0c670881a9ba3f51cb032dd405a Mon Sep 17 00:00:00 2001 From: Jerry Snitselaar <jsnitsel@xxxxxxxxxx> Date: Thu, 29 Jun 2023 13:41:47 -0700 Subject: tpm: return false from tpm_amd_is_rng_defective on non-x86 platforms From: Jerry Snitselaar <jsnitsel@xxxxxxxxxx> commit ecff6813d2bcf0c670881a9ba3f51cb032dd405a upstream. 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: stable@xxxxxxxxxxxxxxx # v6.3+ Reported-by: Sachin Sant <sachinp@xxxxxxxxxxxxx> Reported-by: Aneesh Kumar K. V <aneesh.kumar@xxxxxxxxxxxxx> Closes: https://lore.kernel.org/lkml/99B81401-DB46-49B9-B321-CF832B50CAC3@xxxxxxxxxxxxx/ Fixes: f1324bbc4011 ("tpm: disable hwrng for fTPM on some AMD designs") Signed-off-by: Jerry Snitselaar <jsnitsel@xxxxxxxxxx> Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx> Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/char/tpm/tpm-chip.c | 7 +++++++ 1 file changed, 7 insertions(+) --- 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 t * 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 @@ release: 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) { Patches currently in stable-queue which might be from jsnitsel@xxxxxxxxxx are queue-6.4/tpm-tpm_tis-disable-interrupts-for-lenovo-l590-devices.patch queue-6.4/tpm-tis_i2c-limit-read-bursts-to-i2c_smbus_block_max-32-bytes.patch queue-6.4/tpm-tis_i2c-limit-write-bursts-to-i2c_smbus_block_max-32-bytes.patch queue-6.4/tpm-return-false-from-tpm_amd_is_rng_defective-on-non-x86-platforms.patch