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]
Date:   Fri,  9 Jun 2017 17:58:08 +0200
From:   Nicolas Dichtel <nicolas.dichtel@...nd.com>
To:     andrew@...n.ch
Cc:     netdev@...r.kernel.org, davem@...emloft.net, j.vosburgh@...il.com,
        vfalico@...il.com, andy@...yhouse.net, thibaut.collet@...nd.com,
        linville@...driver.com, Nicolas Dichtel <nicolas.dichtel@...nd.com>
Subject: [PATCH net-next v2] bonding: warn user when 802.3ad speed is unknown

Goal is to advertise the user when ethtool speeds and 802.3ad speeds are
desynchronized.
When this case happens, the kernel needs to be patched.

Suggested-by: Andrew Lunn <andrew@...n.ch>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
---

Here is another proposal. Comments are welcome.

v2: use pr_warn_once()
    warn only when speed != SPEED_UNKNOWN

 drivers/net/bonding/bond_3ad.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index b44a6aeb346d..165a8009c640 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -322,6 +322,11 @@ static u16 __get_link_speed(struct port *port)
 
 		default:
 			/* unknown speed value from ethtool. shouldn't happen */
+			if (slave->speed != SPEED_UNKNOWN)
+				pr_warn_once("%s: unknown ethtool speed (%d) for port %d (set it to 0)\n",
+					     slave->bond->dev->name,
+					     slave->speed,
+					     port->actor_port_number);
 			speed = 0;
 			break;
 		}
-- 
2.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ