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: <b46427d8-2b8c-4b26-b53a-6dcc3d0ea27f@lunn.ch>
Date: Mon, 10 Jun 2024 14:46:07 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Vineeth Karumanchi <vineeth.karumanchi@....com>
Cc: nicolas.ferre@...rochip.com, claudiu.beznea@...on.dev,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, robh+dt@...nel.org,
	krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
	linux@...linux.org.uk, vadim.fedorenko@...ux.dev,
	netdev@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, git@....com
Subject: Re: [PATCH net-next v4 3/4] net: macb: Add ARP support to WOL

> @@ -3294,22 +3292,15 @@ static int macb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
>  
>  	/* Pass the order to phylink layer */
>  	ret = phylink_ethtool_set_wol(bp->phylink, wol);
> -	/* Don't manage WoL on MAC if handled by the PHY
> -	 * or if there's a failure in talking to the PHY
> -	 */
> -	if (!ret || ret != -EOPNOTSUPP)
> +	/* Don't manage WoL on MAC if there's a failure in talking to the PHY */
> +	if (!!ret && ret != -EOPNOTSUPP)
>  		return ret;

The comment is wrong. You could be happily talking to the PHY, it just
does not support what you asked it to do.

> @@ -5257,6 +5247,12 @@ static int __maybe_unused macb_suspend(struct device *dev)
>  		return 0;
>  
>  	if (bp->wol & MACB_WOL_ENABLED) {
> +		/* Check for IP address in WOL ARP mode */
> +		ifa = rcu_dereference(__in_dev_get_rcu(bp->dev)->ifa_list);
> +		if ((bp->wolopts & WAKE_ARP) && !ifa) {
> +			netdev_err(netdev, "IP address not assigned\n");

"IP address not assigned" on its own does not give a user whos suspend
fails a very good idea why.  "IP address not assigned as required by
WoL walk ARP" would be better.


    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ