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: <ZHha9tmg2ZfsKCYT@corigine.com>
Date: Thu, 1 Jun 2023 10:46:46 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Tristram.Ha@...rochip.com
Cc: davem@...emloft.net, andrew@...n.ch, f.fainelli@...il.com,
	netdev@...r.kernel.org, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH net-next] net: phy: smsc: add WoL support to
 LAN8740/LAN8742 PHYs.

On Wed, May 31, 2023 at 10:52:22PM +0000, Tristram.Ha@...rochip.com wrote:
> > > +     if (wol->wolopts & WAKE_ARP) {
> > > +             const u8 *ip_addr =
> > > +                     ((const u8 *)&((ndev->ip_ptr)->ifa_list)->ifa_address);
> > 
> > Hi Tristram,
> > 
> > Sparse seems unhappy about this:
> > 
> > .../smsc.c:449:27: warning: cast removes address space '__rcu' of expression
> > 
> 
> This will be fixed with in_dev_get() and rcu_dereference().
> 
> > > +             /* Try to match IPv6 Neighbor Solicitation. */
> > > +             if (ndev->ip6_ptr) {
> > > +                     struct list_head *addr_list =
> > > +                             &ndev->ip6_ptr->addr_list;
> > 
> > And this:
> > 
> > .../smsc.c:485:38: warning: incorrect type in initializer (different address spaces)
> > .../smsc.c:485:38:    expected struct list_head *addr_list
> > .../smsc.c:485:38:    got struct list_head [noderef] __rcu *
> > .../smsc.c:449:45: warning: dereference of noderef expression
> > 
> > Please make sure that patches don't intoduce new warnings with W=1 C=1 builds.
> 
> This will be fixed with in6_dev_get().
> 
> > > +#define MII_LAN874X_PHY_PME1_SET             (2<<13)
> > > +#define MII_LAN874X_PHY_PME2_SET             (2<<11)
> > 
> > nit: Maybe GENMASK is appropriate here.
> >      If not, please consider spaces around '<<'
> 
> Will update.

Thanks, much appreciated.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ