commit: 71132679abcc54524dac8235d816499d3badd881 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> AuthorDate: Wed Sep 13 11:19:11 2023 +0000 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> CommitDate: Wed Sep 13 11:19:11 2023 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=71132679
Remove redundant patch Removed: 2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> 0000_README | 4 - 2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch | 90 ---------------------- 2 files changed, 94 deletions(-) diff --git a/0000_README b/0000_README index d7316905..053298cf 100644 --- a/0000_README +++ b/0000_README @@ -283,10 +283,6 @@ Patch: 2920_sign-file-patch-for-libressl.patch From: https://bugs.gentoo.org/717166 Desc: sign-file: full functionality with modern LibreSSL -Patch: 2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch -From: https://lore.kernel.org/all/20230822231510.2263255-1-jar...@kernel.org/ -Desc: tpm: Enable hwrng only for Pluton on AMD CPUs - Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch b/2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch deleted file mode 100644 index 932e82ed..00000000 --- a/2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch +++ /dev/null @@ -1,90 +0,0 @@ -From: Jarkko Sakkinen <jar...@kernel.org> -To: linux-integr...@vger.kernel.org -Cc: Jerry Snitselaar <jsnit...@redhat.com>, - Jarkko Sakkinen <jar...@kernel.org>, - sta...@vger.kernel.org, Todd Brandt <todd.e.bra...@intel.com>, - Peter Huewe <peterhu...@gmx.de>, Jason Gunthorpe <j...@ziepe.ca>, - Mario Limonciello <mario.limoncie...@amd.com>, - linux-ker...@vger.kernel.org -Subject: [PATCH v3] tpm: Enable hwrng only for Pluton on AMD CPUs -Date: Wed, 23 Aug 2023 02:15:10 +0300 [thread overview] -Message-ID: <20230822231510.2263255-1-jar...@kernel.org> (raw) - -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. - -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: sta...@vger.kernel.org -Fixes: 554b841d4703 ("tpm: Disable RNG for all AMD fTPMs") -Reported-by: Todd Brandt <todd.e.bra...@intel.com> -Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217804 -Signed-off-by: Jarkko Sakkinen <jar...@kernel.org> ---- -v3: -* Forgot to amend config flags. -v2: -* CONFIG_X86 -* Removed "Reviewed-by: Jarkko Sakkinen <jar...@kernel.org>" -* Removed "Signed-off-by: Mario Limonciello <mario.limoncie...@amd.com>" ---- - drivers/char/tpm/tpm_crb.c | 33 ++++++++------------------------- - 1 file changed, 8 insertions(+), 25 deletions(-) - -diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c -index 65ff4d2fbe8d..ea085b14ab7c 100644 ---- a/drivers/char/tpm/tpm_crb.c -+++ b/drivers/char/tpm/tpm_crb.c -@@ -463,28 +463,6 @@ static bool crb_req_canceled(struct tpm_chip *chip, u8 status) - return (cancel & CRB_CANCEL_INVOKE) == CRB_CANCEL_INVOKE; - } - --static int crb_check_flags(struct tpm_chip *chip) --{ -- u32 val; -- int ret; -- -- ret = crb_request_locality(chip, 0); -- if (ret) -- return ret; -- -- ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, &val, NULL); -- if (ret) -- goto release; -- -- if (val == 0x414D4400U /* AMD */) -- chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED; -- --release: -- crb_relinquish_locality(chip, 0); -- -- return ret; --} -- - static const struct tpm_class_ops tpm_crb = { - .flags = TPM_OPS_AUTO_STARTUP, - .status = crb_status, -@@ -827,9 +805,14 @@ static int crb_acpi_add(struct acpi_device *device) - if (rc) - goto out; - -- rc = crb_check_flags(chip); -- if (rc) -- goto out; -+#ifdef CONFIG_X86 -+ /* A quirk for https://www.amd.com/en/support/kb/faq/pa-410 */ -+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && -+ priv->sm != ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON) { -+ dev_info(dev, "Disabling hwrng\n"); -+ chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED; -+ } -+#endif /* CONFIG_X86 */ - - rc = tpm_chip_register(chip); - --- -2.39.2