lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a94b44d-1b51-2656-786e-07bf97063c3f@linux.intel.com>
Date:   Tue, 23 May 2023 12:35:09 +0300
From:   Péter Ujfalusi <peter.ujfalusi@...ux.intel.com>
To:     Lukas Wunner <lukas@...ner.de>
Cc:     Lino Sanfilippo <LinoSanfilippo@....de>, peterhuewe@....de,
        jarkko@...nel.org, jgg@...pe.ca, jsnitsel@...hat.com,
        hdegoede@...hat.com, oe-lkp@...ts.linux.dev, lkp@...el.com,
        peterz@...radead.org, linux@...ewoehner.de,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
        l.sanfilippo@...bus.com, p.rosenberger@...bus.com
Subject: Re: [PATCH 1/2] tpm, tpm_tis: Handle interrupt storm

Hi,

sorry for the unwrapped lines...

On 23/05/2023 12:14, Péter Ujfalusi wrote:
> 
> 
> On 23/05/2023 10:44, Lukas Wunner wrote:
>> On Tue, May 23, 2023 at 09:48:23AM +0300, Péter Ujfalusi wrote:
>>> On 22/05/2023 17:31, Lino Sanfilippo wrote:
>> [...]
>>> This looked promising, however it looks like the UPX-i11 needs the DMI
>>> quirk.
>>
>> Why is that?  Is there a fundamental problem with the patch or is it
>> a specific issue with that device?
> 
> The flood is not detected (if there is a flood at all), interrupt stops
> working after about 200 interrupts - in the latest boot at 118th.
> I can check this later, likely tomorrow.

With the patches and this diff:

diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index 8f4f2cb5520f..6a910d3277d5 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -795,6 +795,7 @@ static void tpm_tis_process_unhandled_interrupt(struct tpm_chip *chip)
 
 	priv->last_unhandled_irq = jiffies;
 
+	pr_warn("[PETER] %s: unhandled_irqs: %d\n", __func__, priv->unhandled_irqs);
 	if (priv->unhandled_irqs > MAX_UNHANDLED_IRQS)
 		tpm_tis_handle_irq_storm(chip);
 }


In some boot I don't get a print at all and reboot takes
2 minutes (tpm timeout), or as it happened now:

# dmesg | grep tpm
[    4.306999] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0x1B, rev-id 22)
[    4.325868] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 1
[    4.325908] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 2
...
[    4.329579] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 91
[    5.129056] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 1
...
[    5.129561] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 10

# cat /proc/interrupts | grep tpm
  28:          0          0          0        133  IR-IO-APIC   28-fasteoi   tpm0

Reboot takes in all cases 2 minutes to pass the timeout for the TPM2_CC_SHUTDOWN

-- 
Péter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ