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: <20241204230526.GA1166824@ZenIV>
Date: Wed, 4 Dec 2024 23:05:26 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Max Filippov <jcmvbkbc@...il.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@...el.com>,
	kernel test robot <lkp@...el.com>, oe-kbuild-all@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Pawel Chmielewski <pawel.chmielewski@...el.com>,
	Jacob Keller <jacob.e.keller@...el.com>,
	Paul Greenwalt <paul.greenwalt@...el.com>,
	Simon Horman <horms@...nel.org>,
	Tony Nguyen <anthony.l.nguyen@...el.com>
Subject: Re: WARNING: [xtensa] modpost: vmlinux: section mismatch in
 reference: ice_adv_lnk_speed_maps+0x14 (section: .data) ->
 __setup_str_initcall_blacklist (section: .init.rodata)

On Fri, Aug 23, 2024 at 11:41:17PM -0700, Max Filippov wrote:

> static struct ethtool_forced_speed_map ice_adv_lnk_speed_maps[]
> __ro_after_init = {
>        ETHTOOL_FORCED_SPEED_MAP(ice_adv_lnk_speed, 100),
> 
> that array goes into the .data,

... due to

#define __ro_after_init __read_mostly

in your asm/cache.h, instead of the usual .data..ro_after_init,
which would be enough for modpost to assume that driver knows
what it's doing and won't access the dangling pointers to
.init.rodata in there after the initmem had been freed.

The same goes for qed and the same thing happens on openrisc,
for exact same reason.

While we are at it, that might as well had been
#define __ro_after_init
since __read_mostly is not defined on xtensa and default is empty.

If you don't want that stuff to go into RODATA, why not
simply define an empty RO_AFTER_INIT_DATA in your vmlinux.lds
and put those sections explicitly there, along with the data ones,
as e.g. s390 does?  Or arch/arm/kernel/vmlinux-xip.lds.S,
for that matter...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ