linux-stable/drivers/char/tpm
Jarkko Sakkinen ce5b4e1742 tpm: Enable hwrng only for Pluton on AMD CPUs
commit 8f7f35e5aa upstream.

The vendor check introduced by commit 554b841d47 ("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 on Lenovo Legion Y540 laptop.

Since only Microsoft Pluton is the only known combination of AMD CPU and
fTPM from other vendor, disable hwrng otherwise. In order to make sysadmin
aware of this, print also info message to the klog.

Cc: stable@vger.kernel.org
Fixes: 554b841d47 ("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
Reported-by: Patrick Steinhardt <ps@pks.im>
Reported-by: Raymond Jay Golo <rjgolo@gmail.com>
Reported-by: Ronan Pigott <ronan@rjp.ie>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Cc: Thorsten Leemhuis <regressions@leemhuis.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:47:56 +02:00
..
eventlog tpm: remove unnecessary (void*) conversions 2023-04-24 16:15:52 +03:00
st33zp24 tpm: st33zp24: Mark ACPI and OF related data as maybe unused 2023-04-24 16:15:53 +03:00
Kconfig tpm: Add tpm_tis_i2c backend for tpm_tis_core 2022-08-03 23:56:20 +03:00
Makefile tpm: Add tpm_tis_i2c backend for tpm_tis_core 2022-08-03 23:56:20 +03:00
tpm-chip.c tpm: Add a helper for checking hwrng enabled 2023-08-16 18:32:16 +02:00
tpm-dev-common.c timers: Get rid of del_singleshot_timer_sync() 2022-11-24 15:09:10 +01:00
tpm-dev.c
tpm-dev.h
tpm-interface.c tpm: Prevent hwrng from activating during resume 2023-05-16 02:43:12 +03:00
tpm-sysfs.c tpm: Add Upgrade/Reduced mode support for TPM2 modules 2022-01-09 00:18:47 +02:00
tpm.h This PR fixes a critical bug in my first pull request. I fixed the 2023-05-01 10:37:37 -07:00
tpm1-cmd.c tpm: Add upgrade/reduced mode support for TPM1.2 modules 2022-08-03 23:56:19 +03:00
tpm2-cmd.c tpm: add vendor flag to command code validation 2023-02-13 10:11:20 +02:00
tpm2-space.c tpm: use try_get_ops() in tpm-space.c 2022-03-10 01:47:25 +02:00
tpm_atmel.c
tpm_atmel.h tpm: atmel: Add explicit include for of.h 2023-04-06 20:36:27 +02:00
tpm_crb.c tpm: Enable hwrng only for Pluton on AMD CPUs 2023-09-13 09:47:56 +02:00
tpm_ftpm_tee.c tpm/tpm_ftpm_tee: Convert to platform remove callback returning void 2023-04-24 16:15:53 +03:00
tpm_ftpm_tee.h
tpm_i2c_atmel.c tpm: tpm_i2c_atmel: Convert to i2c's .probe_new() 2023-02-13 10:11:20 +02:00
tpm_i2c_infineon.c tpm: tpm_i2c_infineon: Convert to i2c's .probe_new() 2023-02-13 10:11:20 +02:00
tpm_i2c_nuvoton.c tpm: tpm_i2c_nuvoton: Convert to i2c's .probe_new() 2023-02-13 10:11:20 +02:00
tpm_ibmvtpm.c tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe() 2022-05-23 18:47:49 +03:00
tpm_ibmvtpm.h tpm: ibmvtpm: Avoid error message when process gets signal while waiting 2021-08-23 19:55:42 +03:00
tpm_infineon.c
tpm_nsc.c
tpm_ppi.c char: move from strlcpy with unused retval to strscpy 2022-10-05 00:25:56 +03:00
tpm_tis.c tpm_tis: Opt-in interrupts 2023-08-16 18:32:19 +02:00
tpm_tis_core.c tpm_tis: Explicitly check for error code 2023-08-03 10:26:08 +02:00
tpm_tis_core.h tpm,tpm_tis: Disable interrupts after 1000 unhandled IRQs 2023-07-23 13:53:53 +02:00
tpm_tis_i2c.c tpm: tis_i2c: Limit write bursts to I2C_SMBUS_BLOCK_MAX (32) bytes 2023-07-23 13:53:53 +02:00
tpm_tis_i2c_cr50.c tpm: cr50: i2c: use jiffies to wait for tpm ready irq 2023-04-24 16:15:52 +03:00
tpm_tis_spi.h tpm: Remove read16/read32/write32 calls from tpm_tis_phy_ops 2022-05-23 18:47:49 +03:00
tpm_tis_spi_cr50.c tpm: Remove read16/read32/write32 calls from tpm_tis_phy_ops 2022-05-23 18:47:49 +03:00
tpm_tis_spi_main.c tpm: tpm_tis_spi: Mark ACPI and OF related data as maybe unused 2023-04-24 16:15:53 +03:00
tpm_tis_synquacer.c tpm/tpm_tis_synquacer: Convert to platform remove callback returning void 2023-04-24 16:15:53 +03:00
tpm_vtpm_proxy.c tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation 2023-07-23 13:53:52 +02:00
tpmrm-dev.c
xen-tpmfront.c xen: make remove callback of xen driver void returned 2022-12-15 16:06:10 +01:00