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: <20190220172715.GL13075@lunn.ch>
Date:   Wed, 20 Feb 2019 18:27:15 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Russell King <rmk+kernel@...linux.org.uk>,
        Vivien Didelot <vivien.didelot@...il.com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net] net: dsa: fix unintended change of bridge interface
 STP state

On Wed, Feb 20, 2019 at 09:22:30AM -0800, Florian Fainelli wrote:
> On 2/20/19 2:32 AM, Russell King wrote:
> > When a DSA port is added to a bridge and brought up, the resulting STP
> > state programmed into the hardware depends on the order that these
> > operations are performed.  However, the Linux bridge code believes that
> > the port is in disabled mode.
> > 
> > If the DSA port is first added to a bridge and then brought up, it will
> > be in blocking mode.  If it is brought up and then added to the bridge,
> > it will be in disabled mode.
> > 
> > This difference is caused by DSA always setting the STP mode in
> > dsa_port_enable() whether or not this port is part of a bridge.  Since
> > bridge always sets the STP state when the port is added, brought up or
> > taken down, it is unnecessary for us to manipulate the STP state.
> > 
> > Apparently, this code was copied from Rocker, and the very next day a
> > similar fix for Rocker was merged but was not propagated to DSA.  See
> > e47172ab7e41 ("rocker: put port in FORWADING state after leaving bridge")
> > 
> > Fixes: b73adef67765 ("net: dsa: integrate with SWITCHDEV for HW bridging")
> > Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
> 
> Nice example of cargo cult programming, thanks for fixing this!

Maybe now would be a good time to look at other drivers. Does the
Microsemi Ocelot driver have the same issue?

	  Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ