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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240904102711.1accc8ce@fedora.home>
Date: Wed, 4 Sep 2024 10:27:11 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: davem@...emloft.net, Pantelis Antoniou <pantelis.antoniou@...il.com>,
 Jakub Kicinski <kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, Paolo
 Abeni <pabeni@...hat.com>, Russell King <linux@...linux.org.uk>, Christophe
 Leroy <christophe.leroy@...roup.eu>, Florian Fainelli
 <f.fainelli@...il.com>, Heiner Kallweit <hkallweit1@...il.com>,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 thomas.petazzoni@...tlin.com, Herve Codina <herve.codina@...tlin.com>,
 Simon Horman <horms@...nel.org>, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH net-next v2 3/7] net: ethernet: fs_enet: drop the
 .adjust_link custom fs_ops

Hi Andrew,

On Fri, 30 Aug 2024 23:06:08 +0200
Andrew Lunn <andrew@...n.ch> wrote:

> > --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> > +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> > @@ -649,12 +649,7 @@ static void fs_adjust_link(struct net_device *dev)
> >  	unsigned long flags;
> >  
> >  	spin_lock_irqsave(&fep->lock, flags);
> > -
> > -	if (fep->ops->adjust_link)
> > -		fep->ops->adjust_link(dev);
> > -	else
> > -		generic_adjust_link(dev);
> > -
> > +	generic_adjust_link(dev);
> >  	spin_unlock_irqrestore(&fep->lock, flags);  
> 
> Holding a spinlock is pretty unusual. We are in thread context, and
> the phydev mutex is held. Looking at generic_adjust_link, do any of
> the fep->foo variables actually need protecting, particularly from
> changes in interrupts context?

Yes there are, the interrupt mask/event registers are being accessed
from the interrupt handler and the ->restart() hook. I can try to
rework this a bit for a cleaner interrupt handling, but I don't have
means to test this on all mac flavors (fec/fcc/scc) :(

Thanks for reviewing this,

Maxime


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ