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: <2f1603fa-d03c-412c-895c-bc4afa06834b@intel.com>
Date: Thu, 30 May 2024 10:54:34 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Arnd Bergmann <arnd@...nel.org>, Sunil Goutham <sgoutham@...vell.com>,
	Geetha sowjanya <gakula@...vell.com>, Subbaraya Sundeep
	<sbhatta@...vell.com>, hariprasad <hkelam@...vell.com>
CC: Arnd Bergmann <arnd@...db.de>, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, "Paolo
 Abeni" <pabeni@...hat.com>, Richard Cochran <richardcochran@...il.com>, Suman
 Ghosh <sumang@...vell.com>, Simon Horman <horms@...nel.org>, "Tony Nguyen"
	<anthony.l.nguyen@...el.com>, Jiri Pirko <jiri@...nulli.us>, "Mateusz
 Polchlopek" <mateusz.polchlopek@...el.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ethernet: octeontx2: avoid linking objects into multiple
 modules



On 5/28/2024 8:25 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> Each object file contains information about which module it gets linked
> into, so linking the same file into multiple modules now causes a warning:
> 
> scripts/Makefile.build:254: drivers/net/ethernet/marvell/octeontx2/nic/Makefile: otx2_devlink.o is added to multiple modules: rvu_nicpf rvu_nicvf
> 

When I tried to build, I don't see any warnings produced on the current
net-next with W=1. Is this something new and not yet in net-next tree?
If not, how do I enable this warning in my local build?

> Change the way that octeontx2 ethernet is built by moving the common
> file into a separate module with exported symbols instead.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---

The change makes sense to me. I built and tested both before and after
this change.

On my system, before the build change, the driver built to 3 separate
modules totaling 2029176 bytes:

> -rw-r--r--. 1 jekeller jekeller   72104 May 30 10:46 otx2_ptp.ko
> -rw-r--r--. 1 jekeller jekeller 1774008 May 30 10:46 rvu_nicpf.ko
> -rw-r--r--. 1 jekeller jekeller  183064 May 30 10:46 rvu_nicvf.ko
After this change, the driver builds to 5 separate modules totaling
1977984 bytes:

> -rw-r--r--. 1 jekeller jekeller   81480 May 30 10:46 otx2_dcbnl.ko
> -rw-r--r--. 1 jekeller jekeller   19784 May 30 10:46 otx2_devlink.ko
> -rw-r--r--. 1 jekeller jekeller   72104 May 30 10:46 otx2_ptp.ko
> -rw-r--r--. 1 jekeller jekeller 1698880 May 30 10:46 rvu_nicpf.ko
> -rw-r--r--. 1 jekeller jekeller  105736 May 30 10:46 rvu_nicvf.ko

This is a savings of 51192 bytes from removing the duplicated object code.

Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ