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] [day] [month] [year] [list]
Date:   Mon, 16 May 2022 12:04:43 +0200
From:   Lukas Wunner <lukas@...ner.de>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Marc Zyngier <maz@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Jakub Kicinski <kuba@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        linux-gpio@...r.kernel.org,
        Octavian Purdila <octavian.purdila@....com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] genirq: Deduplicate WARN_ON_ONCE() in
 generic_handle_domain_irq()

On Mon, May 16, 2022 at 08:29:50AM +0200, Sebastian Andrzej Siewior wrote:
> From looking at gpio-dln2
> this is called from USB URB's callback which is softirq. In the end
> dln2_gpio_event() is invoked while dln2_dev::event_cb_lock is acquired.
> That lock is acquired by disabling interrupts which is what gets the
> locking right for generic_handle_domain_irq(). If that lock lifted to
> spin_lock_bh() (because it is always in urb's calback context and all
> HCDs complete in one context unlike now) then this breaks.

I think you want WARN_ON(!irqs_disabled) to catch that,
not WARN_ON_ONCE(!in_hardirq()).


> and sadly I missed dln2. Please let me know if you have more users
> similar to dln2. I will add those to my list once upstream buys that
> interface.

There's another USB GPIO irqchip queued up for 5.19 now:
https://git.kernel.org/netdev/net-next/c/1ce8b37241ed

And there's one more in drivers/hid/hid-cp2112.c, but that calls
handle_nested_irq(), which disables hardirqs.

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ