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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160302101016.GA2122@nanopsycho.orion>
Date:	Wed, 2 Mar 2016 11:10:16 +0100
From:	Jiri Pirko <jiri@...nulli.us>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Jiri Pirko <jiri@...lanox.com>,
	"David S. Miller" <davem@...emloft.net>,
	linux-arm-kernel@...ts.infradead.org,
	Yishai Hadas <yishaih@...lanox.com>,
	Doug Ledford <dledford@...hat.com>,
	Sean Hefty <sean.hefty@...el.com>,
	Hal Rosenstock <hal.rosenstock@...il.com>,
	Ido Schimmel <idosch@...lanox.com>, linux-rdma@...r.kernel.org,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] net: mellanox: add DEVLINK dependencies

Wed, Mar 02, 2016 at 10:40:54AM CET, arnd@...db.de wrote:
>The new NET_DEVLINK infrastructure can be a loadable module, but the drivers
>using it might be built-in, which causes link errors like:
>
>drivers/net/built-in.o: In function `mlx4_load_one':
>:(.text+0x2fbfda): undefined reference to `devlink_port_register'
>:(.text+0x2fc084): undefined reference to `devlink_port_unregister'
>drivers/net/built-in.o: In function `mlxsw_sx_port_remove':
>:(.text+0x33a03a): undefined reference to `devlink_port_type_clear'
>:(.text+0x33a04e): undefined reference to `devlink_port_unregister'
>
>There are multiple ways to avoid this:
>
>a) add 'depends on NET_DEVLINK || !NET_DEVLINK' dependencies
>   for each user
>b) use 'select NET_DEVLINK' from each driver that uses it
>   and hide the symbol in Kconfig.
>c) make NET_DEVLINK a 'bool' option so we don't have to
>   list it as a dependency, and rely on the APIs to be
>   stubbed out when it is disabled
>d) use IS_REACHABLE() rather than IS_ENABLED() to check for
>   NET_DEVLINK in include/net/devlink.h
>
>This implements a variation of approach a) by adding an
>intermediate symbol that drivers can depend on, and changes
>the three drivers using it.

Approach a) looks like the best. Thanks for taking care of this.

>
>Signed-off-by: Arnd Bergmann <arnd@...db.de>

Acked-by: Jiri Pirko <jiri@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ