@@ -796,18 +796,17 @@ static void check_section(const char *modname, struct elf_info *elf,
796
796
#define ALL_INIT_TEXT_SECTIONS \
797
797
".init.text", ".meminit.text"
798
798
#define ALL_EXIT_TEXT_SECTIONS \
799
- ".exit.text", ".memexit.text"
799
+ ".exit.text"
800
800
801
801
#define ALL_PCI_INIT_SECTIONS \
802
802
".pci_fixup_early", ".pci_fixup_header", ".pci_fixup_final", \
803
803
".pci_fixup_enable", ".pci_fixup_resume", \
804
804
".pci_fixup_resume_early", ".pci_fixup_suspend"
805
805
806
806
#define ALL_XXXINIT_SECTIONS MEM_INIT_SECTIONS
807
- #define ALL_XXXEXIT_SECTIONS MEM_EXIT_SECTIONS
808
807
809
808
#define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS
810
- #define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS
809
+ #define ALL_EXIT_SECTIONS EXIT_SECTIONS
811
810
812
811
#define DATA_SECTIONS ".data", ".data.rel"
813
812
#define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \
@@ -820,7 +819,6 @@ static void check_section(const char *modname, struct elf_info *elf,
820
819
#define MEM_INIT_SECTIONS ".meminit.*"
821
820
822
821
#define EXIT_SECTIONS ".exit.*"
823
- #define MEM_EXIT_SECTIONS ".memexit.*"
824
822
825
823
#define ALL_TEXT_SECTIONS ALL_INIT_TEXT_SECTIONS, ALL_EXIT_TEXT_SECTIONS, \
826
824
TEXT_SECTIONS, OTHER_TEXT_SECTIONS
@@ -830,7 +828,6 @@ enum mismatch {
830
828
DATA_TO_ANY_INIT ,
831
829
TEXTDATA_TO_ANY_EXIT ,
832
830
XXXINIT_TO_SOME_INIT ,
833
- XXXEXIT_TO_SOME_EXIT ,
834
831
ANY_INIT_TO_ANY_EXIT ,
835
832
ANY_EXIT_TO_ANY_INIT ,
836
833
EXTABLE_TO_NON_TEXT ,
@@ -881,12 +878,6 @@ static const struct sectioncheck sectioncheck[] = {
881
878
.bad_tosec = { INIT_SECTIONS , NULL },
882
879
.mismatch = XXXINIT_TO_SOME_INIT ,
883
880
},
884
- /* Do not reference exit code/data from memexit code/data */
885
- {
886
- .fromsec = { ALL_XXXEXIT_SECTIONS , NULL },
887
- .bad_tosec = { EXIT_SECTIONS , NULL },
888
- .mismatch = XXXEXIT_TO_SOME_EXIT ,
889
- },
890
881
/* Do not use exit code/data from init code */
891
882
{
892
883
.fromsec = { ALL_INIT_SECTIONS , NULL },
@@ -1015,7 +1006,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
1015
1006
1016
1007
/* symbols in data sections that may refer to meminit sections */
1017
1008
if (match (fromsec , PATTERNS (DATA_SECTIONS )) &&
1018
- match (tosec , PATTERNS (ALL_XXXINIT_SECTIONS , ALL_XXXEXIT_SECTIONS )) &&
1009
+ match (tosec , PATTERNS (ALL_XXXINIT_SECTIONS )) &&
1019
1010
match (fromsym , PATTERNS ("*driver" )))
1020
1011
return 0 ;
1021
1012
0 commit comments