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: <20240924082612.GF4029621@kernel.org>
Date: Tue, 24 Sep 2024 09:26:12 +0100
From: Simon Horman <horms@...nel.org>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Kyle Swenson <kyle.swenson@....tech>,
	thomas.petazzoni@...tlin.com,
	Oleksij Rempel <o.rempel@...gutronix.de>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net] net: pse-pd: tps23881: Fix boolean evaluation for
 bitmask checks

On Tue, Sep 24, 2024 at 10:15:29AM +0200, Kory Maincent wrote:
> On Tue, 24 Sep 2024 08:18:39 +0100
> Simon Horman <horms@...nel.org> wrote:
> 
> > On Mon, Sep 23, 2024 at 05:34:26PM +0200, Kory Maincent wrote:
> >  [...]  
> > 
> > Thanks Kory,
> > 
> > I agree that these changes are correct.
> > But are they fixes; can this manifest in a bug?
> 
> I didn't face it but I think yes.
> In case of a 4 pairs PoE ports without the fix:
> 
>         chan = priv->port[id].chan[0];                                          
>         if (chan < 4) {                                                         
>                 enabled = ret & BIT(chan);                                  
>                 delivering = ret & BIT(chan + 4);                           
> 	...                          
>         }                                                                       
>                                                                                 
>         if (priv->port[id].is_4p) {                                             
>                 chan = priv->port[id].chan[1];                                  
>                 if (chan < 4) {
>                         enabled &= !!(ret & BIT(chan));                         
>                         delivering &= !!(ret & BIT(chan + 4));
> 
> If enabled = 0x2 here, enabled would be assigned to 0 instead of 1.
> ...
> 
> 		} 
> 	}  
> 
> I have an issue using 4pairs PoE port with my board so I can't test it.
> 
> 
> > (If so, I suspect the Kernel is riddled with such bugs.)
> 
> Don't know about it but if I can remove it from my driver it would be nice. :)

Right, no question from my side that this change is a good one.
I'm just wondering if it is best for net or net-next.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ