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]
Date:   Mon, 27 Jun 2022 10:03:07 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Cc:     stable@...r.kernel.org, Masahiro Yamada <masahiroy@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH 5.4 57/60] modpost: fix section mismatch check for
 exported init/exit sections

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.

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

Powered by blists - more mailing lists