Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'tpmdd-next-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd

Pull tpm fixes from Jarkko Sakkinen:
"Two critical tpm driver bug fixes"

* tag 'tpmdd-next-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
tpm: efi: Don't create binary_bios_measurements file for an empty log
tpm_tis: Disable interrupts on ThinkPad T490s

+32 -2
+5
drivers/char/tpm/eventlog/efi.c
··· 41 41 log_size = log_tbl->size; 42 42 memunmap(log_tbl); 43 43 44 + if (!log_size) { 45 + pr_warn("UEFI TPM log area empty\n"); 46 + return -EIO; 47 + } 48 + 44 49 log_tbl = memremap(efi.tpm_log, sizeof(*log_tbl) + log_size, 45 50 MEMREMAP_WB); 46 51 if (!log_tbl) {
+27 -2
drivers/char/tpm/tpm_tis.c
··· 27 27 #include <linux/of.h> 28 28 #include <linux/of_device.h> 29 29 #include <linux/kernel.h> 30 + #include <linux/dmi.h> 30 31 #include "tpm.h" 31 32 #include "tpm_tis_core.h" 32 33 ··· 50 49 return container_of(data, struct tpm_tis_tcg_phy, priv); 51 50 } 52 51 53 - static bool interrupts = true; 54 - module_param(interrupts, bool, 0444); 52 + static int interrupts = -1; 53 + module_param(interrupts, int, 0444); 55 54 MODULE_PARM_DESC(interrupts, "Enable interrupts"); 56 55 57 56 static bool itpm; ··· 63 62 module_param(force, bool, 0444); 64 63 MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry"); 65 64 #endif 65 + 66 + static int tpm_tis_disable_irq(const struct dmi_system_id *d) 67 + { 68 + if (interrupts == -1) { 69 + pr_notice("tpm_tis: %s detected: disabling interrupts.\n", d->ident); 70 + interrupts = 0; 71 + } 72 + 73 + return 0; 74 + } 75 + 76 + static const struct dmi_system_id tpm_tis_dmi_table[] = { 77 + { 78 + .callback = tpm_tis_disable_irq, 79 + .ident = "ThinkPad T490s", 80 + .matches = { 81 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 82 + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T490s"), 83 + }, 84 + }, 85 + {} 86 + }; 66 87 67 88 #if defined(CONFIG_PNP) && defined(CONFIG_ACPI) 68 89 static int has_hid(struct acpi_device *dev, const char *hid) ··· 214 191 struct tpm_tis_tcg_phy *phy; 215 192 int irq = -1; 216 193 int rc; 194 + 195 + dmi_check_system(tpm_tis_dmi_table); 217 196 218 197 rc = check_acpi_tpm2(dev); 219 198 if (rc)