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: <20250917145642.Z0Q6pRfE@linutronix.de>
Date: Wed, 17 Sep 2025 16:56:42 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Lukas Wunner <lukas@...ner.de>
Cc: Thomas Gleixner <tglx@...utronix.de>, Crystal Wood <crwood@...hat.com>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Clark Williams <clrkwllms@...nel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Valentin Schneider <vschneid@...hat.com>,
	linux-kernel@...r.kernel.org, Attila Fazekas <afazekas@...hat.com>,
	linux-pci@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
	Bjorn Helgaas <helgaas@...nel.org>,
	Mahesh J Salgaonkar <mahesh@...ux.ibm.com>,
	Oliver OHalloran <oohall@...il.com>
Subject: Re: [PATCH] genirq/manage: Reduce priority of forced secondary IRQ
 handler

On 2025-09-08 18:08:31 [+0200], Lukas Wunner wrote:
> Crystal reports the PCIe Advanced Error Reporting driver getting stuck
> in an infinite loop on PREEMPT_RT:  Both the primary IRQ handler
> aer_irq() as well as the secondary handler aer_isr() are forced into
> threads with identical priority.
> 
> Crystal writes that on the ARM system in question, the primary IRQ
> handler has to clear an error in the Root Error Status register...
> 
>    "before the next error happens, or else the hardware will set the
>     Multiple ERR_COR Received bit.  If that bit is set, then aer_isr()
>     can't rely on the Error Source Identification register, so it scans
>     through all devices looking for errors -- and for some reason, on
>     this system, accessing the AER registers (or any Config Space above
>     0x400, even though there are capabilities located there) generates
>     an Unsupported Request Error (but returns valid data).  Since this
>     happens more than once, without aer_irq() preempting, it causes
>     another multi error and we get stuck in a loop."
> 
> The issue does not show on non-PREEMPT_RT since the primary IRQ handler
> runs in hardirq context and thus clears the Root Error Status register
> before waking the secondary IRQ handler's thread.
> 
> Simulate the same behavior on PREEMPT_RT by assigning a lower default
> priority to forced secondary IRQ handlers.
> 
> Reported-by: Crystal Wood <crwood@...hat.com>
> Tested-by: Crystal Wood <crwood@...hat.com>
> Closes: https://lore.kernel.org/r/20250902224441.368483-1-crwood@redhat.com/
> Signed-off-by: Lukas Wunner <lukas@...ner.de>
> Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---

Reviewed-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>

> Crystal provided a Tested-by off-list.  I've used Crystal's suggestion
> for the code comment, but if anyone prefers Sebastian's or some other
> wording, I don't mind either respinning myself or a maintainer amending
> this or any other aspect of the patch when applying.  Thanks!

Crystal's wording ist fine.

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ