From: Al Viro <viro@zeniv.linux.org.uk>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>,
kernel test robot <lkp@intel.com>,
oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Pawel Chmielewski <pawel.chmielewski@intel.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Paul Greenwalt <paul.greenwalt@intel.com>,
Simon Horman <horms@kernel.org>,
Tony Nguyen <anthony.l.nguyen@intel.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)
Date: Wed, 4 Dec 2024 23:05:26 +0000 [thread overview]
Message-ID: <20241204230526.GA1166824@ZenIV> (raw)
In-Reply-To: <CAMo8BfJOPNaHb0f3Rf2GyhApCDg5bFfCGETWU9-LBJWiJpLeFw@mail.gmail.com>
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...
next prev parent reply other threads:[~2024-12-04 23:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 23:24 WARNING: modpost: vmlinux: section mismatch in reference: ice_adv_lnk_speed_maps+0x14 (section: .data) -> __setup_str_initcall_blacklist (section: .init.rodata) kernel test robot
2024-08-22 8:23 ` WARNING: [xtensa] " Przemek Kitszel
2024-08-24 6:41 ` Max Filippov
2024-08-26 8:53 ` Przemek Kitszel
2024-12-04 23:05 ` Al Viro [this message]
2024-12-06 12:47 ` Max Filippov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241204230526.GA1166824@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=anthony.l.nguyen@intel.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jcmvbkbc@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paul.greenwalt@intel.com \
--cc=pawel.chmielewski@intel.com \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox