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: <aBSv1pJ1mulT78gn@ishi>
Date: Fri, 2 May 2025 20:43:18 +0900
From: William Breathitt Gray <wbg@...nel.org>
To: "Sverdlin, Alexander" <alexander.sverdlin@...mens.com>
Cc: "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	"o.rempel@...gutronix.de" <o.rempel@...gutronix.de>,
	"kernel@...gutronix.de" <kernel@...gutronix.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] counter: interrupt-cnt: Protect enable/disable OPs with
 mutex

On Fri, May 02, 2025 at 09:24:20AM +0000, Sverdlin, Alexander wrote:
> Dear maintainers,
> 
> On Mon, 2025-03-31 at 18:36 +0200, A. Sverdlin wrote:
> > From: Alexander Sverdlin <alexander.sverdlin@...mens.com>
> >
> > Enable/disable seems to be racy on SMP, consider the following scenario:
> >
> > CPU0					CPU1
> >
> > interrupt_cnt_enable_write(true)
> > {
> > 	if (priv->enabled == enable)
> > 		return 0;
> >
> > 	if (enable) {
> > 		priv->enabled = true;
> > 					interrupt_cnt_enable_write(false)
> > 					{
> > 						if (priv->enabled == enable)
> > 							return 0;
> >
> > 						if (enable) {
> > 							priv->enabled = true;
> > 							enable_irq(priv->irq);
> > 						} else {
> > 							disable_irq(priv->irq)
> > 							priv->enabled = false;
> > 						}
> > 		enable_irq(priv->irq);
> > 	} else {
> > 		disable_irq(priv->irq);
> > 		priv->enabled = false;
> > 	}
> >
> > The above would result in priv->enabled == false, but IRQ left enabled.
> > Protect both write (above race) and read (to propagate the value on SMP)
> > callbacks with a mutex.
> >
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@...mens.com>
> 
> I've noticed that the patch has been marked as "Changes Requested" in
> the patchwork, could it be a mistake? Because I never received any
> change request.

Hi Alexander,

I can't comment on the patchwork status because I don't use that
service, but I apologize nonetheless for the delay in responding to your
patch submission. I'm hoping for an Ack from Oleksij, but this is a
pretty straight-forward fix that I'll be happy to pick it up regardless.

Would you provide a Fixes line so the stable trees can pick this up for
the necessary kernel versions?

Thanks,

William Breathitt Gray

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ