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] [day] [month] [year] [list]
Message-ID: <aCT6I5dhx5-xluOo@google.com>
Date: Wed, 14 May 2025 13:16:35 -0700
From: Brian Norris <briannorris@...omium.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Douglas Anderson <dianders@...omium.org>,
	Tsai Sung-Fu <danielsftsai@...gle.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] genirq: Retain disable depth across irq
 shutdown/startup

Hi Thomas,

On Wed, May 14, 2025 at 09:35:49AM +0200, Thomas Gleixner wrote:
> On Tue, May 13 2025 at 15:42, Brian Norris wrote:
> > @@ -272,7 +272,9 @@ int irq_startup(struct irq_desc *desc, bool resend, bool force)
> >  	const struct cpumask *aff = irq_data_get_affinity_mask(d);
> >  	int ret = 0;
> >  
> > -	desc->depth = 0;
> > +	desc->depth--;
> > +	if (desc->depth)
> > +		return 0;
> 
> This breaks a
> 
>      request_irq()
>      disable_irq()
>      free_irq()
>      request_irq()
> 
> sequence.

Ah, thanks for the callout. I factored that into another unit test in
v2.

> So the only case where the disable depth needs to be preserved is for
> managed interrupts in the hotunplug -> shutdown -> hotplug -> startup
> scenario. Making that explicit avoids chasing all other places and
> sprinkle desc->depth = 1 into them. Something like the uncompiled below
> should do the trick.

Seems reasonable, and it works for me. I've incorporated that in v2,
although I'm not sure how the attribution should work there.

Thanks,
Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ