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: <20201119084005.GC6507@pengutronix.de>
Date:   Thu, 19 Nov 2020 09:40:05 +0100
From:   Michael Grzeschik <mgr@...gutronix.de>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, f.fainelli@...il.com, davem@...emloft.net,
        kernel@...gutronix.de, matthias.schiffer@...tq-group.com,
        woojung.huh@...rochip.com, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt
 where possible

On Thu, Nov 19, 2020 at 01:29:15AM +0100, Andrew Lunn wrote:
>>  	case BR_STATE_DISABLED:
>>  		data |= PORT_LEARN_DISABLE;
>> -		if (port < SWITCH_PORT_NUM)
>> +		if (port < dev->phy_port_cnt)
>>  			member = 0;
>>  		break;
>
>So this, unlike all the other patches so far, is not obviously
>correct. What exactly does phy_port_cnt mean? Can there be ports
>without PHYs? What if the PHYs are external? You still need to be able
>to change the STP state of such ports.

The variable phy_port_cnt is referring to all external physical
available ports, that are not connected internally to the cpu.

That means that the previous code path was already broken, when stp
handling should include the cpu_port.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ