[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef48302b-3421-ebbe-7135-1297cffba7ed@gmail.com>
Date: Tue, 28 Jun 2022 13:32:56 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Nick Desaulniers <ndesaulniers@...gle.com>,
Christoph Hellwig <hch@....de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Masahiro Yamada <masahiroy@...nel.org>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Jessica Yu <jeyu@...nel.org>
Subject: Re: [PATCH 5.4 57/60] modpost: fix section mismatch check for
exported init/exit sections
On 6/28/22 12:11, Nick Desaulniers wrote:
> On Mon, Jun 27, 2022 at 10:03 AM Florian Fainelli <f.fainelli@...il.com> wrote:
>>
>> On 6/27/22 04:22, Greg Kroah-Hartman wrote:
>>> From: Masahiro Yamada <masahiroy@...nel.org>
>>>
>>> commit 28438794aba47a27e922857d27b31b74e8559143 upstream.
>>>
>>> Since commit f02e8a6596b7 ("module: Sort exported symbols"),
>>> EXPORT_SYMBOL* is placed in the individual section ___ksymtab(_gpl)+<sym>
>>> (3 leading underscores instead of 2).
>>>
>>> Since then, modpost cannot detect the bad combination of EXPORT_SYMBOL
>>> and __init/__exit.
>>>
>>> Fix the .fromsec field.
>>>
>>> Fixes: f02e8a6596b7 ("module: Sort exported symbols")
>>> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
>>> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
>>> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>>
>> This commit causes the following warning to show up on my kernel builds
>> used for testing 5.4 stable candidates:
>>
>> WARNING: vmlinux.o(___ksymtab+drm_fb_helper_modinit+0x0): Section
>> mismatch in reference from the variable __ksymtab_drm_fb_helper_modinit
>> to the function .init.text:drm_fb_helper_modinit()
>> The symbol drm_fb_helper_modinit is exported and annotated __init
>> Fix this by removing the __init annotation of drm_fb_helper_modinit or
>> drop the export.
>
> Thanks for the report. Looks like the patch is "working as intended."
>
> It looks like drm_fb_helper_modinit was deleted outright in
> commit bf22c9ec39da ("drm: remove drm_fb_helper_modinit")
> in v5.12-rc1.
>
> Florian, can you test if that cherry-picks cleanly and resolves the
> issue for you?
It does and it does, thanks!
>
> Maybe let's check with Christoph if it's ok to backport bf22c9ec39da
> to stable 5.10 and 5.4?
>
>>
>> The kernel configuration to reproduce this is located here (this is 5.10
>> but works in 5.4 as well):
>>
>> https://gist.github.com/2c3e8edd5ceb089c8040db724073d941
>>
>> Same applies to the 5.10, 5.15 and 5.18 stable queues FWIW.
>> --
>> Florian
>
>
>
--
Florian
Powered by blists - more mailing lists