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: <1364a268-7173-7253-543e-792ff2104e98@gmx.de>
Date:   Wed, 5 May 2021 00:54:37 +0200
From:   Lino Sanfilippo <LinoSanfilippo@....de>
To:     Jarkko Sakkinen <jarkko@...nel.org>
Cc:     peterhuewe@....de, jgg@...pe.ca, stefanb@...ux.vnet.ibm.com,
        James.Bottomley@...senpartnership.com, keescook@...omium.org,
        jsnitsel@...hat.com, ml.linux@...oe.vision,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
        Stefan Berger <stefanb@...ux.ibm.com>
Subject: Re: [PATCH v3 1/4] tpm: Use a threaded interrupt handler


Hi,


On 03.05.21 at 17:14, Jarkko Sakkinen wrote:
> On Sat, May 01, 2021 at 03:57:24PM +0200, Lino Sanfilippo wrote:
>> The interrupt handler uses tpm_tis_read32() and tpm_tis_write32() to access
>> the interrupt status register. In case of SPI those accesses are done with
>> the spi_bus_lock mutex held. This means that the status register cannot
>> be read or written in interrupt context.
>>
>> For this reason request a threaded interrupt handler so that the required
>> accesses can be done in process context.
>>
>> Reviewed-by: Stefan Berger <stefanb@...ux.ibm.com>
>> Signed-off-by: Lino Sanfilippo <LinoSanfilippo@....de>
>
> No fixes tag.
>
> The short summary scopes now the whole TPM subsystem ("tpm:"), but the fix
> is targetted *only* for tpm_tis_spi. How about "tpm, tpm_tis_spi: Allow to
> sleep in the interrupt handler"?
>
> This also changes the semantics tpm_tis_*, not just tpm_tis_spi, which is
> not acceptable. We cannot backport a fix like this.
>
> Probably you should just add a parameter to tpm_tis_core_init() to hint
> that threaded IRQ is required, and then only conditionally do so.
>

Sure, this is doable although to be honest I dont see the issue with also the
non-SPI code running in the threaded interrupt handler. The functionality should
not change (especially since interrupts are not even working right now) and it would
save us a special treatment of the SPI case.


Regards,
Lino

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ