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:
 <PAXPR04MB85104C607BF23FFFD6663ABB886CA@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Wed, 4 Jun 2025 02:44:30 +0000
From: Wei Fang <wei.fang@....com>
To: Vladimir Oltean <vladimir.oltean@....com>
CC: Claudiu Manoil <claudiu.manoil@....com>, Clark Wang
	<xiaoning.wang@....com>, "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>,
	"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"arnd@...nel.org" <arnd@...nel.org>
Subject: RE: [PATCH net] net: enetc: fix the netc-lib driver build dependency

> Ok, so to summarize, you want nxp-netc-lib.ko to be separate from
> fsl-enetc-core.ko, because when you upstream the switch driver (also a
> consumer of ntmp.o), you want it to depend just on nxp-netc-lib.ko but
> not on the full fsl-enetc-core.ko.
> If the only reverse dependency of NXP_NETC_LIB, NXP_ENETC4, becomes m,
> then NXP_NETC_LIB also becomes m, but in reality, FSL_ENETC_CORE, via
> cbdr.o, still depends on symbols from NXP_NETC_LIB.
> 
> So you influence NXP_NETC_LIB to not become m when its only selecter is m,
> instead stay y.
> 
> Won't this need to change, and become even more complicated when
> NXP_NETC_LIB gains another selecter, the switch driver?

The dependency needs to be updated as follows when switch driver is
added, to avoid the compilation errors.

default y if FSL_ENETC_CORE=y && (NXP_ENETC4=m || NET_DSA_NETC_SWITCH=m)

> 
> >  	help
> >  	  This module provides common functionalities for both ENETC and NETC
> >  	  Switch, such as NETC Table Management Protocol (NTMP) 2.0, common tc
> > --
> > 2.34.1
> >
> 
> What about this interpretation? cbdr.o uses symbols from NXP_NETC_LIB,
> so the Kconfig option controlling cbdr.o, aka FSL_ENETC_CORE, should
> select NXP_NETC_LIB. This solves the problem in a way which is more
> logical to me, and doesn't need to change when the switch is later added.
> 

Yes, this is also a solution. I thought that LS1028A does not need the netc-lib
driver at all. Doing so will result in netc-lib being compiled on the LS1028A
platform, which may be unacceptable, so I did not do this. Since you think
this is better, I will apply this solution next. Thanks.

> Then you can drop "select NXP_NETC_LIB" from NXP_ENETC4, because the
> dependency will transfer transitively via FSL_ENETC_CORE.
> 
> diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig
> b/drivers/net/ethernet/freescale/enetc/Kconfig
> index 616ea22ceabc..ef31eea0fc50 100644
> --- a/drivers/net/ethernet/freescale/enetc/Kconfig
> +++ b/drivers/net/ethernet/freescale/enetc/Kconfig
> @@ -1,6 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
>  config FSL_ENETC_CORE
>  	tristate
> +	select NXP_NETC_LIB
>  	help
>  	  This module supports common functionality between the PF and VF
>  	  drivers for the NXP ENETC controller.
> @@ -47,7 +48,6 @@ config NXP_ENETC4
>  	select FSL_ENETC_CORE
>  	select FSL_ENETC_MDIO
>  	select NXP_ENETC_PF_COMMON
> -	select NXP_NETC_LIB
>  	select PHYLINK
>  	select DIMLIB
>  	help

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ