lkml.org 
[lkml]   [2022]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] modpost: fix section mismatch check for exported init/exit sections
On Mon, May 30, 2022 at 5:55 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Since commit f02e8a6596b7 ("module: Sort exported symbols"),
> EXPORT_SYMBOL is placed in the individual section ___ksymtab(_gpl)+<sym>
> (3 leading underscores, not 2).
>
> Since then, modpost cannot detect the bad combination of EXPORT_SYMBOL
> and __init/__exit.
>
> Fix the .fromsec to ___ksymtab*.
>
> Fixes: f02e8a6596b7 ("module: Sort exported symbols")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>
> scripts/mod/modpost.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 29d5a841e215..620dc8c4c814 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -980,7 +980,7 @@ static const struct sectioncheck sectioncheck[] = {
> },
> /* Do not export init/exit functions or data */
> {
> - .fromsec = { "__ksymtab*", NULL },
> + .fromsec = { "___ksymtab*", NULL },
> .bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
> .mismatch = EXPORT_TO_INIT_EXIT,
> .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
> --
> 2.32.0
>


--
Thanks,
~Nick Desaulniers

\
 
 \ /
  Last update: 2022-06-06 23:08    [W:0.061 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site