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: <23360efd-131d-d696-220e-0cdb388a0201@linux.ibm.com>
Date:   Tue, 12 Nov 2019 10:35:42 -0500
From:   Stefan Berger <stefanb@...ux.ibm.com>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: question about setting TPM_CHIP_FLAG_IRQ in tpm_tis_core_init

On 11/12/19 9:24 AM, Jerry Snitselaar wrote:
> On Tue Nov 12 19, Stefan Berger wrote:
>> On 11/11/19 10:36 PM, Jerry Snitselaar wrote:
>>> Question about 1ea32c83c699 ("tpm_tis_core: Set TPM_CHIP_FLAG_IRQ 
>>> before probing for interrupts").
>>> Doesn't tpm_tis_send set this flag, and setting it here in 
>>> tpm_tis_core_init short circuits what
>>> tpm_tis_send was doing before? There is a bug report of an interrupt 
>>> storm from a tpm on a t490s laptop
>>> with the Fedora 31 kernel (5.3), and I'm wondering if this change 
>>> could cause that. Before they got
>>> the warning about interrupts not working, and using polling instead.
>>>
>> I set this flag for the TIS because it wasn't set anywhere else. 
>> tpm_tis_send() wouldn't set the flag but go via the path:
>>
>> if (!(chip->flags & TPM_CHIP_FLAG_IRQ) || priv->irq_tested)
>>
>>         return tpm_tis_send_main(chip, buf, len);
>>
>> the only other line for the TIS to set the IRQ flag was in the same 
>> function further below, though that wouldn't be reached due to the 
>> above:
>>
>> [...]
>>
>> priv->irq = irq;
>>
>> chip->flags |= TPM_CHIP_FLAG_IRQ;
>>
>>
>>    Stefan
>>
>>
>
> Ugh, you're right I was reading that as ! around both the flag and 
> priv->irq_tested.
>
> Should the flag be cleared if tpm_tis_probe_irq_single fails prior to 
> calling
> tpm_tis_gen_interrupt?
>
The disable_interrupts() should be called to reset the flag if, while 
probing, the interrupt handler wasn't called. Maybe that t490s returns 
either via this path

https://elixir.bootlin.com/linux/latest/source/drivers/char/tpm/tpm_tis_core.c#L631

or this one here

https://elixir.bootlin.com/linux/latest/source/drivers/char/tpm/tpm_tis_core.c#L634

thinking the (shared) interrupt is not for it?! But this would mean 
TPM_INT_STATUS is broken...


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ