Patch "modpost: disallow the combination of EXPORT_SYMBOL and __meminit*" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    modpost: disallow the combination of EXPORT_SYMBOL and __meminit*

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     modpost-disallow-the-combination-of-export_symbol-an.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d2e58d657afcfe5bf950850fed5bed0a74d988b7
Author: Masahiro Yamada <masahiroy@xxxxxxxxxx>
Date:   Mon Oct 23 02:06:10 2023 +0900

    modpost: disallow the combination of EXPORT_SYMBOL and __meminit*
    
    [ Upstream commit a3df1526da480c089c20868b7f4d486b9f266001 ]
    
    Theoretically, we could export conditionally-discarded code sections,
    such as .meminit*, if all the users can become modular under a certain
    condition. However, that would be difficult to control and such a tricky
    case has never occurred.
    
    Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
    Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 0426c1bf3a69c..c4c09e28dc902 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1176,7 +1176,7 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf,
 	    ELF_ST_TYPE(sym->st_info) == STT_LOPROC)
 		s->is_func = true;
 
-	if (match(secname, PATTERNS(INIT_SECTIONS)))
+	if (match(secname, PATTERNS(ALL_INIT_SECTIONS)))
 		warn("%s: %s: EXPORT_SYMBOL used for init symbol. Remove __init or EXPORT_SYMBOL.\n",
 		     mod->name, name);
 	else if (match(secname, PATTERNS(ALL_EXIT_SECTIONS)))




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux