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]
Message-ID: <87h5sca9dh.ffs@tglx>
Date: Fri, 23 Jan 2026 11:52:58 +0100
From: Thomas Gleixner <tglx@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Marek Vasut
 <marek.vasut+renesas@...lbox.org>
Cc: 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>,
 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

On Thu, Jan 22 2026 at 17:22, Sebastian Andrzej Siewior 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.

No. It's not really.

Interrupt number zero is a historic leftover and a mistake which is only
relevant to some oddball archaic architectures like x86 and others which
tried to mimic that.

The general agreement is that interrupt 0 is a legacy oddity and only
supported in very special cases. Everything else treats 0 as invalid.

Thanks,

        tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ