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
| ||
|
Date: Mon, 21 Feb 2022 16:55:40 +0200 From: Vladimir Oltean <olteanv@...il.com> To: "Russell King (Oracle)" <linux@...linux.org.uk> Cc: Ansuel Smith <ansuelsmth@...il.com>, Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>, Florian Fainelli <f.fainelli@...il.com>, Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org, Vivien Didelot <vivien.didelot@...il.com> Subject: Re: [PATCH net-next v2 1/6] net: dsa: add support for phylink mac_select_pcs() On Mon, Feb 21, 2022 at 02:44:34PM +0000, Russell King (Oracle) wrote: > On Mon, Feb 21, 2022 at 04:32:54PM +0200, Vladimir Oltean wrote: > > Alternatively, phylink_create() gets the initial PHY interface mode > > passed to it, I wonder, couldn't we call mac_select_pcs() with that in > > order to determine whether the function is a stub or not? > > That would be rather prone to odd behaviour depending on how > phylink_create() is called, depending on the initial interface mode. > If the initial interface mode causes mac_select_pcs() to return NULL > but it actually needed to return a PCS for a different interface mode, > then we fail. I agree. I just wanted to make it clear that if you have a better idea than a pointer-encoded -EOPNOTSUPP, I'm not bent on going with -EOPNOTSUPP. > > *and as I haven't considered, to be honest. When phylink_major_config() > > gets called after a SGMII to 10GBaseR switchover, and mac_select_pcs is > > called and returns NULL, the current behavior is to keep working with > > the PCS for SGMII. Is that intended? > > It was not originally intended, but as a result of the discussion > around this patch which didn't go anywhere useful, I dropped it as > a means to a path of least resistance. > > https://patchwork.kernel.org/project/linux-arm-kernel/patch/E1mpSba-00BXp6-9e@rmk-PC.armlinux.org.uk/ Oh, but that patch didn't close exactly this condition that we're talking about here, did it? It allows phylink_set_pcs() to be called with NULL, but phylink_major_config() still has the non-NULL check, which prevents it from having any effect in this scenario: /* If we have a new PCS, switch to the new PCS after preparing the MAC * for the change. */ if (pcs) phylink_set_pcs(pl, pcs); I re-read the conversation and I still don't see this argument being given, otherwise I wouldn't have opposed...
Powered by blists - more mailing lists