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: <7aeb3ce2-b0b9-ec15-1062-955a0eca4d98@ysoft.com>
Date:   Fri, 25 Oct 2019 12:50:13 +0200
From:   Michal Vokáč <michal.vokac@...ft.com>
To:     Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>
Cc:     Vivien Didelot <vivien.didelot@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: dsa: qca8k: Initialize the switch with
 correct number of ports

On 24. 10. 19 18:33, Florian Fainelli wrote:
> On 10/24/19 7:12 AM, Andrew Lunn wrote:
>> On Thu, Oct 24, 2019 at 03:46:58PM +0200, Michal Vokáč wrote:
>>> Since commit 0394a63acfe2 ("net: dsa: enable and disable all ports")
>>> the dsa core disables all unused ports of a switch. In this case
>>> disabling ports with numbers higher than QCA8K_NUM_PORTS causes that
>>> some switch registers are overwritten with incorrect content.
>>
>> Humm.
>>
>> The same problem might exist in other drivers:
>>
>> linux/drivers/net/dsa$ grep -r "ds->num_ports = DSA_MAX_PORTS"
>> qca8k.c:	priv->ds->num_ports = DSA_MAX_PORTS;
>> b53/b53_common.c:	ds->num_ports = DSA_MAX_PORTS;
> 
> Not for b53 because this later gets clamped with dev->num_ports in
> b53_setup().

I quickly checked the code and I think there is still an issue
in the b53_enable_port and b53_disable_port functions which are
called from the dsa_port_setup().

>> mt7530.c:	priv->ds->num_ports = DSA_MAX_PORTS;
>> microchip/ksz_common.c:	ds->num_ports = DSA_MAX_PORTS;

At first glance it looks like mt7530 and microchip has the same problem.

>> dsa_loop.c:	ds->num_ports = DSA_MAX_PORTS;
>>
>> dsa_loop.c looks O.K, it does support DSA_MAX_PORTS ports.
>>
>> But the others?
>>
>>      Andrew

I can respin and fix those drivers as well. Or a separate patch
for each one?

Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ