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: <20230911160501.5vc4nttz6fnww56h@skbuf>
Date:   Mon, 11 Sep 2023 19:05:01 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Lukasz Majewski <lukma@...x.de>
Cc:     Tristram.Ha@...rochip.com, Eric Dumazet <edumazet@...gle.com>,
        Andrew Lunn <andrew@...n.ch>, davem@...emloft.net,
        Woojung Huh <woojung.huh@...rochip.com>,
        Oleksij Rempel <o.rempel@...gutronix.de>,
        Florian Fainelli <f.fainelli@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, UNGLinuxDriver@...rochip.com,
        Oleksij Rempel <linux@...pel-privat.de>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [[RFC PATCH v4 net-next] 0/2] net: dsa: hsr: Enable HSR HW
 offloading for KSZ9477

On Mon, Sep 11, 2023 at 04:58:48PM +0200, Lukasz Majewski wrote:
> Dear Community,
> 
> Are there any comments regarding this new revision of the HSR support
> for KSZ9477 switch?
> 
> Best regards,
> 
> Lukasz Majewski

Yeah, the integration with the DSA master's MAC address is not quite
what I was expecting to see.

See, both the DSA master's MAC address, as well as the HSR device's MAC
address, can be changed at runtime with:

ip link set eth0 address AA:BB:CC:DD:EE:FF # DSA master
ip link set lan1 address AA:BB:CC:DD:EE:FF # indirectly changes the HSR's address too

which is problematic because the hardware does not get updated in that
case, but the address change is not refused either.

Actually, the reason why I haven't yet said anything is because it made
me realize that there is a pre-existing bug in net/dsa/slave.c where we
have this pattern:

	if (!ether_addr_equal(dev->dev_addr, master->dev_addr))
		dev_uc_add(master, dev->dev_addr);

but there is no replay of the dev_uc_add() call when the master->dev_addr
changes. This really results in RX packet loss, as I have tested. I don't
know what is the best way to solve it.

Anyway, programming the MAC address of the DSA master or of the HSR
device to hardware seems to require tracking the NETDEV_CHANGEADDR and
NETDEV_PRE_CHANGEADDR events, even if only to reject those changes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ