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: <ac8e1c9e-5df2-0af7-2ab4-26f78d5839e3@gmail.com>
Date:   Tue, 7 Sep 2021 08:47:35 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        Vladimir Oltean <olteanv@...il.com>
Cc:     Leon Romanovsky <leon@...nel.org>,
        Vladimir Oltean <vladimir.oltean@....com>,
        netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>
Subject: Re: [RFC PATCH net] net: dsa: tear down devlink port regions when
 tearing down the devlink port on error



On 9/7/2021 8:44 AM, Jakub Kicinski wrote:
> On Sun, 5 Sep 2021 14:07:35 +0300 Vladimir Oltean wrote:
>> Again, fallback but not during devlink port register. The devlink port
>> was registered just fine, but our plans changed midway. If you want to
>> create a net device with an associated devlink port, first you need to
>> create the devlink port and then the net device, then you need to link
>> the two using devlink_port_type_eth_set, at least according to my
>> understanding.
>>
>> So the failure is during the creation of the **net device**, we now have a
>> devlink port which was originally intended to be of the Ethernet type
>> and have a physical flavour, but it will not be backed by any net device,
>> because the creation of that just failed. So the question is simply what
>> to do with that devlink port.
> 
> Is the failure you're referring to discovered inside the
> register_netdevice() call?

It is before, at the time we attempt to connect to the PHY device, prior 
to registering the netdev, we may fail that PHY connection, tearing down 
the entire switch because of that is highly undesirable.

Maybe we should re-order things a little bit and try to register devlink 
ports only after we successfully registered with the PHY/SFP and prior 
to registering the netdev?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ