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:   Wed, 22 Jun 2022 17:42:13 +0200
From:   Paolo Abeni <pabeni@...hat.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Ong Boon Leong <boon.leong.ong@...el.com>
Subject: Re: [PATCH net-next] net: pcs: xpcs: depends on PHYLINK in Kconfig

On Wed, 2022-06-22 at 08:35 -0700, Jakub Kicinski wrote:
> On Wed, 22 Jun 2022 15:15:46 +0100 Russell King (Oracle) wrote:
> > > We can't use depends with PHYLINK, AFAIU, because PHYLINK is not 
> > > a user-visible knob. Its always "select"ed and does not show up
> > > in {x,n,menu}config.  
> > 
> > I'm not sure I understand the point you're making. You seem to be
> > saying we can't use "depend on PHYLINK" for this PCS driver, but
> > then you sent a patch doing exactly that.
> 
> Nuh uh, I sent a patch which does _select_ PHYLINK.
> 
> My concern is that since PHYLINK is not visible user will not be able
> to see PCS_XPCS unless something else already enabled PHYLINK.
> 
> I may well be missing some higher level relations here, on the surface
> "depending" on a symbol which is not user-visible seems.. unusual.
> 
> > As these PCS drivers are only usable if PHYLINK is already enabled,
> > there is a clear dependency between them and phylink. The drivers
> > that make use of xpcs are:
> > 
> > stmmac, which selects both PCS_XPCS and PHYLINK.
> > sja1105 (dsa driver), which selects PCS_XPCS. All DSA drivers depend
> > on NET_DSA, and NET_DSA selects PHYLINK.
> > 
> > So, for PCS_XPCS, PHYLINK will be enabled whenever PCS_XPCS is
> > selected. No other drivers in drivers/net appear to make use of
> > the XPCS driver (I couldn't find any other references to
> > xpcs_create()) so using "depends on PHYLINK" for it should be safe.
> > 
> > Moreover, the user-visible nature of PCS_XPCS doesn't add anything
> > to the kernel - two drivers require PCS_XPCS due to code references
> > to the xpcs code, these two select that symbol. Offering it to the
> > user just gives the user an extra knob to twiddle with no useful
> > result (other than more files to be built.)
> > 
> > It could be argued that it helps compile coverage, which I think is
> > the only reason to make PCS_XPCS visible... but then we get compile
> > coverage when stmmac or sja1105 are enabled.
> 
> Interesting, hiding PCS_XPCS sounds good then. PCS_LYNX is not visible.
> 
> diff --git a/drivers/net/pcs/Kconfig b/drivers/net/pcs/Kconfig
> index 22ba7b0b476d..9eb32220efea 100644
> --- a/drivers/net/pcs/Kconfig
> +++ b/drivers/net/pcs/Kconfig
> @@ -6,7 +6,7 @@
>  menu "PCS device drivers"
>  
>  config PCS_XPCS
> -	tristate "Synopsys DesignWare XPCS controller"
> +	tristate
>  	depends on MDIO_DEVICE && MDIO_BUS
>  	help
>  	  This module provides helper functions for Synopsys DesignWare XPCS
> 
@Jakub: please let me know if you prefer to go ahead yourself, or me
sending a v3 with 'depends PHYLINK' + the above (or any other option ;)

Thanks!

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ