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]
Date:   Mon, 16 May 2022 13:23:46 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Lukas Wunner <lukas@...ner.de>
Cc:     linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Basavaraj Natikar <Basavaraj.Natikar@....com>,
        Hans de Goede <hdegoede@...hat.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Mark Gross <markgross@...nel.org>, Michael Buesch <m@...s.ch>,
        Rafa?? Mi??ecki <zajec5@...il.com>,
        Shyam Sundar S K <Shyam-sundar.S-k@....com>,
        linux-gpio@...r.kernel.org, linux-wireless@...r.kernel.org,
        platform-driver-x86@...r.kernel.org
Subject: Re: [RFC PATCH] genirq: Provide generic_handle_domain_irq_safe().

On 2022-05-16 12:18:14 [+0200], Lukas Wunner wrote:
> On Mon, May 09, 2022 at 04:04:08PM +0200, Sebastian Andrzej Siewior wrote:
> > The problem with generic_handle_domain_irq() is that with `threadirqs'
> > it will trigger "WARN_ON_ONCE(!in_hardirq())".
> 
> Now silenced by:
> https://git.kernel.org/linus/792ea6a074ae
> 
> 
> > +int generic_handle_domain_irq_safe(struct irq_domain *domain, unsigned int hwirq)
> > +{
> > +	unsigned long flags;
> > +	int ret;
> > +
> > +	local_irq_save(flags);
> > +	ret = handle_irq_desc(irq_resolve_mapping(domain, hwirq));
> > +	local_irq_restore(flags);
> > +	return ret;
> > +}
> > +EXPORT_SYMBOL_GPL(generic_handle_domain_irq_safe);
> 
> AFAICS you don't need to disable hardirqs at least for the "threadirqs"
> case because irq_forced_thread_fn() already does that.

PREEMPT_RT does not disable interrupts. Also completions in softirq
won't disable interrupts.

> 
> >  drivers/bcma/driver_gpio.c                 |  2 +-
> >  drivers/gpio/gpio-mlxbf2.c                 |  6 ++----
> >  drivers/pinctrl/pinctrl-amd.c              |  2 +-
> >  drivers/platform/x86/intel/int0002_vgpio.c |  3 +--
> >  drivers/ssb/driver_gpio.c                  |  6 ++++--
> 
> From a quick look, the proper solution for all of those drivers is
> probably to just add IRQF_NO_THREAD and be done with it.

I think I mentioned that part in the commit description: IRQF_NO_THREAD
must be specified by all handlers of a shared interrupt. It is an option
for the handler that owns an interrupt exclusive.

> Thanks,
> 
> Lukas

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ