[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMo8BfLYSRxEXJVJxrZEe-SpLhcz2ScZs7avCoh=_C4taWuL2Q@mail.gmail.com>
Date: Fri, 6 Dec 2024 04:47:52 -0800
From: Max Filippov <jcmvbkbc@...il.com>
To: Al Viro <viro@...iv.linux.org.uk>
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 Wed, Dec 4, 2024 at 3:05 PM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> 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,
Oh, the trail leads back to me (:
> 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...
I'll do that, thanks for digging into it.
--
Thanks.
-- Max
Powered by blists - more mailing lists