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: <786c7e37-f8d0-45ca-9a8f-c1468318ac2a@microchip.com>
Date: Mon, 25 Aug 2025 16:10:29 +0200
From: Nicolas Ferre <nicolas.ferre@...rochip.com>
To: Edgar Bonet <bonet@...noble.cnrs.fr>, Geert Uytterhoeven
	<geert@...ux-m68k.org>, Thomas Gleixner <tglx@...utronix.de>
CC: Alexandre Belloni <alexandre.belloni@...tlin.com>, Claudiu Beznea
	<claudiu.beznea@...on.dev>, <linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>, Huacai Chen <chenhuacai@...nel.org>,
	Jiaxun Yang <jiaxun.yang@...goat.com>
Subject: Re: [ISSUE + PATCH] Interrupts were enabled early by spinlock guard

On 25/08/2025 at 14:35, Nicolas Ferre wrote:
> On 14/08/2025 at 17:28, Edgar Bonet wrote:
>> Hello Geert, and thanks for you prompt review!
> 
> Yep, Geert, many thanks!
> 
>>> I think the conversions in
>>> drivers/irqchip/irq-atmel-aic.c:aic_irq_domain_xlate() and
>>> drivers/irqchip/irq-loongson-liointc.c:liointc_set_type()
>>> are also wrong, and need a similar change.
>>
>> The one in irq-atmel-aic.c looks indeed strikingly similar. The one in
>> irq-loongson-liointc.c is slightly different though. Instead of:
>>
>>       irq_gc_lock_irqsave() -> guard(raw_spinlock_irq)
>>
>> it does:
>>
>>       irq_gc_lock_irqsave() -> guard(raw_spinlock)
>>
>> I don't know what the implications are though.
>>
>>> Unfortunately I have no hardware to verify.
>>
>> Neither do I.
> 
> I'm on it. Expect feedback later today...

Answering to myself: tested working okay on at91sam9x35ek board (with 
IRQ controller matching compatible string "atmel,at91rm9200-aic" 
(handled by file irq-atmel-aic.c) and your modification:

--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -188,7 +188,7 @@ static int aic_irq_domain_xlate(struct irq_domain *d,

         gc = dgc->gc[idx];

-       guard(raw_spinlock_irq)(&gc->lock);
+       guard(raw_spinlock_irqsave)(&gc->lock);
         smr = irq_reg_readl(gc, AT91_AIC_SMR(*out_hwirq));
         aic_common_set_priority(intspec[2], &smr);
         irq_reg_writel(gc, smr, AT91_AIC_SMR(*out_hwirq));

Thanks, best regards,
   Nicolas



> Thanks so much for the heads-up.
> 
> Best regards,
>     Nicolas
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ