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]
Date:   Sun, 15 Nov 2020 01:02:41 +0000
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Andreas Färber <afaerber@...e.de>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Uwe Kleine-König <uwe@...ine-koenig.org>,
        Michal Hrusecki <Michal.Hrusecky@....cz>,
        Tomas Hlavacek <tomas.hlavacek@....cz>,
        Bedřicha Košatu <bedrich.kosata@....cz>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Marek Behún <kabel@...nel.org>,
        Andrew Lunn <andrew@...n.ch>,
        Jason Cooper <jason@...edaemon.net>,
        Gregory CLEMENT <gregory.clement@...tlin.com>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: mvneta: Fix validation of 2.5G HSGMII
 without comphy

On Sun, Nov 15, 2020 at 01:41:51AM +0100, Andreas Färber wrote:
> Commit 1a642ca7f38992b086101fe204a1ae3c90ed8016 (net: ethernet: mvneta:
> Add 2500BaseX support for SoCs without comphy) added support for 2500BaseX.
> 
> In case a comphy is not provided, mvneta_validate()'s check
>   state->interface == PHY_INTERFACE_MODE_2500BASEX
> could never be true (it would've returned with empty bitmask before),
> so that 2500baseT_Full and 2500baseX_Full do net get added to the mask.

This makes me nervous. It was intentional that if there is no comphy
configured in DT for SoCs such as Armada 388, then there is no support
to switch between 1G and 2.5G speed. Unfortunately, the configuration
of the comphy is up to the board to do, not the SoC .dtsi, so we can't
rely on there being a comphy on Armada 388 systems.

So, one of the side effects of this patch is it incorrectly opens up
the possibility of allowing 2.5G support on Armada 388 without a comphy
configured.

We really need a better way to solve this; just relying on the lack of
comphy and poking at a register that has no effect on Armada 388 to
select 2.5G speed while allowing 1G and 2.5G to be arbitarily chosen
doesn't sound like a good idea to me.

Clearly there are differences in mvneta hardware in different SoCs.
Maybe they should have used different compatibles, so the driver can
know which variant of the hardware it is dealing with, rather than
relying on presence/lack of comphy.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ