lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  4 Dec 2020 18:43:36 -0700
From:   Jerry Snitselaar <>
        Thomas Gleixner <>,
        Jani Nikula <>,
        Rodrigo Vivi <>,
        David Airlie <>,
        Daniel Vetter <>,
        Jarkko Sakkinen <>,
        Jason Gunthorpe <>,
        Peter Huewe <>,
        James Bottomley <>,
        Matthew Garrett <>,
        Hans de Goede <>
Subject: [PATCH v3 0/4] tpm_tis: Detect interrupt storms

This patchset is an attempt to try and catch tpm_tis devices that have
interrupt storm issues, disable the interrupt, and use polling. In
2016 the tpm_tis interrupt code was accidently disabled, and polling
was just being used. When we initially tried to enable interrupts
again there were some reports of systems being hit with interrupt
storms. It turned out that the ThinkPad T490s had misconfigured a gpio
pin being used for the interrupt.  The problem is more widespread
though, with interrupt storms also being seen on other platforms and
different TPM vendors. With the L490 the system hangs at tpm_tis
initialization even with the detection code, so change the earlier
detection code that used dmi to look for the T490s to instead look for
the L490 and disable interrupts.

Since kstat_irqs needs to be exported to allow building of tpm_tis
as a module, I've included a patch to change the i915_pmu code to
use kstat_irqs where before it was using its own version. If this
isn't desired it can be dropped.

I've been testing this on top of James' proposed patchset which
re-enables interrupts for tpm_tis. With the patchsets applied
it detects the problem on the T490s and on the Ice Lake development
system where I found the issue. I have Lenovo verifying that the
dmi detection code will now detect the L490 and avoid the hang
it experiences. I'm also working on getting access to an L490
to see if I can figure out what the underlying issue is.

Changes from v2:
	- Export kstat_irqs to allow building tpm_tis as a module.
    	- Change i915_pmu.c to use kstat_irqs instead of it's own
      	  version count_interrupts.
    	- Change include from linux/kernel_stat.h to linux/irq.h.
    	- Change dmi checking code to now look for L490 instead of

Changes from v1:
	- drop tpm_tis specific workqueue and use just system_w.

Jerry Snitselaar (4):
  irq: export kstat_irqs
  drm/i915/pmu: Use kstat_irqs to get interrupt count
  tpm_tis: Disable interrupts if interrupt storm detected
  tpm_tis: Disable Interrupts on the ThinkPad L490

Cc: Thomas Gleixner <>
Cc: Jani Nikula <>
Cc: Rodrigo Vivi <>
Cc: David Airlie <>
Cc: Daniel Vetter <>
Cc: Jarkko Sakkinen <>
Cc: Jason Gunthorpe <>
Cc: Peter Huewe <>
Cc: James Bottomley <>
Cc: Matthew Garrett <>
Cc: Hans de Goede <>

 drivers/char/tpm/tpm_tis.c      |  4 ++--
 drivers/char/tpm/tpm_tis_core.c | 27 +++++++++++++++++++++++++++
 drivers/char/tpm/tpm_tis_core.h |  2 ++
 drivers/gpu/drm/i915/i915_pmu.c | 18 +-----------------
 include/linux/irqdesc.h         |  1 +
 kernel/irq/irqdesc.c            |  1 +
 6 files changed, 34 insertions(+), 19 deletions(-)


Powered by blists - more mailing lists