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: <20210805112546.gitosuu7bzogbzyf@skbuf>
Date:   Thu, 5 Aug 2021 14:25:46 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Oleksij Rempel <linux@...pel-privat.de>,
        Yangbo Lu <yangbo.lu@....com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] dsa: sja1105: fix reverse dependency

Hi Arnd,

On Thu, Aug 05, 2021 at 01:00:28PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> The DSA driver and the tag driver for sja1105 are closely linked,
> and recently the dependency started becoming visible in the form
> of the sja1110_process_meta_tstamp() that gets exported by one
> and used by the other.
>
> This causes a rare build failure with CONFIG_NET_DSA_TAG_SJA1105=y
> and CONFIG_NET_DSA_SJA1105=m, as the 'select' statement only
> prevents the opposite configuration:
>
> aarch64-linux-ld: net/dsa/tag_sja1105.o: in function `sja1110_rcv':
> tag_sja1105.c:(.text.sja1110_rcv+0x164): undefined reference to `sja1110_process_meta_tstamp'
>
> Add a stricter dependency for the CONFIG_NET_DSA_TAG_SJA110y to
> prevent it from being built-in when the other one is not.
>
> Fixes: 566b18c8b752 ("net: dsa: sja1105: implement TX timestamping for SJA1110")
> Fixes: 227d07a07ef1 ("net: dsa: sja1105: Add support for traffic through standalone ports")

The second Fixes: tag makes no sense.

> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> Not sure if there is a more logical way to deal with this,
> but the added dependency does help avoid the build failure.
>
> I found this one while verifying the PTP dependency patch, but
> it's really a separate issue.
> ---
>  net/dsa/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
> index bca1b5d66df2..548285539752 100644
> --- a/net/dsa/Kconfig
> +++ b/net/dsa/Kconfig
> @@ -138,6 +138,7 @@ config NET_DSA_TAG_LAN9303
>
>  config NET_DSA_TAG_SJA1105
>  	tristate "Tag driver for NXP SJA1105 switches"
> +	depends on NET_DSA_SJA1105 || !NET_DSA_SJA1105

I think I would prefer an optional "build as module if NET_DSA_SJA1105 is a module"
dependency only if NET_DSA_SJA1105_PTP is enabled. I think this is how that is
expressed:

	depends on (NET_DSA_SJA1105 && NET_DSA_SJA1105_PTP) || !NET_DSA_SJA1105 || !NET_DSA_SJA1105_PTP

>  	select PACKING
>  	help
>  	  Say Y or M if you want to enable support for tagging frames with the
> --
> 2.29.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ