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: <255a49c7-d763-50d9-87e0-da22f4a9b053@nbd.name>
Date:   Wed, 15 Sep 2021 11:48:55 +0200
From:   Felix Fietkau <nbd@....name>
To:     Linus Lüssing <linus.luessing@...3.blue>,
        Kalle Valo <kvalo@...eaurora.org>,
        Sujith Manoharan <c_manoha@....qualcomm.com>,
        ath9k-devel@....qualcomm.com
Cc:     linux-wireless@...r.kernel.org,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        "John W . Linville" <linville@...driver.com>,
        Felix Fietkau <nbd@...nwrt.org>,
        Simon Wunderlich <sw@...onwunderlich.de>,
        Sven Eckelmann <sven@...fation.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Linus Lüssing <ll@...onwunderlich.de>
Subject: Re: [PATCH 3/3] ath9k: Fix potential hw interrupt resume during reset


On 2021-09-14 21:25, Linus Lüssing wrote:
> From: Linus Lüssing <ll@...onwunderlich.de>
> 
> There is a small risk of the ath9k hw interrupts being reenabled in the
> following way:
> 
> 1) ath_reset_internal()
>    ...
>    -> disable_irq()
>       ...
>       <- returns
> 
>                       2) ath9k_tasklet()
>                          ...
>                          -> ath9k_hw_resume_interrupts()
>                          ...
> 
> 1) ath_reset_internal() continued:
>    -> tasklet_disable(&sc->intr_tq); (= ath9k_tasklet() off)
> 
> By first disabling the ath9k interrupt there is a small window
> afterwards which allows ath9k hw interrupts being reenabled through
> the ath9k_tasklet() before we disable this tasklet in
> ath_reset_internal(). Leading to having the ath9k hw interrupts enabled
> during the reset, which we should avoid.
I don't see a way in which interrupts can be re-enabled through the
tasklet. disable_irq disables the entire PCI IRQ (not through ath9k hw
registers), and they will only be re-enabled by the corresponding
enable_irq call.

- Felix

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ