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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVs_ODx3eByHkU03vopUuLuY7=uRnfTKuai65jNr+xMhA@mail.gmail.com>
Date: Thu, 22 Jan 2026 17:31:42 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Marek Vasut <marek.vasut+renesas@...lbox.org>, linux-input@...r.kernel.org, 
	"Peter Zijlstra (Intel)" <peterz@...radead.org>, Cheng-Yang Chou <yphbchou0911@...il.com>, 
	Dmitry Torokhov <dmitry.torokhov@...il.com>, Frank Li <Frank.Li@....com>, 
	Geert Uytterhoeven <geert+renesas@...der.be>, Jinjie Ruan <ruanjinjie@...wei.com>, 
	Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>, Marc Zyngier <maz@...nel.org>, 
	Thomas Gleixner <tglx@...nel.org>, linux-kernel@...r.kernel.org, 
	linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH 1/2] linux/interrupt.h: allow "guard" notation to disable
 and reenable IRQ with valid IRQ check

Hi Sebastian,

On Thu, 22 Jan 2026 at 17:22, Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
> On 2026-01-22 00:23:47 [+0100], Marek Vasut wrote:
> > @@ -242,6 +242,21 @@ extern void irq_wake_thread(unsigned int irq, void *dev_id);
> >  DEFINE_LOCK_GUARD_1(disable_irq, int,
> >                   disable_irq(*_T->lock), enable_irq(*_T->lock))
> >
> > +static inline void disable_valid_irq(unsigned int irq)
> > +{
> > +     if (irq > 0)
> > +             disable_irq(irq);
> > +}
>
> | $ grep " 0:" /proc/interrupts
> |    0:         43          0          IO-APIC  2-edge      timer
>
> in other words, interrupt 0 is valid.

AFAIK, the x86 legacy timer interrupt is the sole remaining valid user
of interrupt number zero.
Nowadays lots of code assumes valid interrupt numbers are non-zero
positive numbers.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ