On 8/29/25 12:54 PM, Siddharth Nayyar wrote:
> The *_gpl section are not being used populated by modpost anymore. Hence
> the module loader doesn't need to find and process these sections in
> modules.
>
> Signed-off-by: Siddharth Nayyar <[email protected]>
> ---
> [...]
> @@ -2601,10 +2590,6 @@ static int find_module_sections(struct module *mod,
> struct load_info *info)
> mod->syms = section_objs(info, "__ksymtab",
> sizeof(*mod->syms), &mod->num_syms);
> mod->crcs = section_addr(info, "__kcrctab");
> - mod->gpl_syms = section_objs(info, "__ksymtab_gpl",
> - sizeof(*mod->gpl_syms),
> - &mod->num_gpl_syms);
> - mod->gpl_crcs = section_addr(info, "__kcrctab_gpl");
> mod->flagstab = section_addr(info, "__kflagstab");
>
I suggest adding a check that the loaded module doesn't contain
a __ksymtab_gpl or __kcrctab_gpl section, similarly how the function
later checks if the old __obsparm section isn't present. Something like:
if (section_addr(info, "__ksymtab_gpl"))
pr_warn("%s: ignoring obsolete section __ksymtab_gpl\n",
mod->name);
if (section_addr(info, "__kcrctab_gpl"))
pr_warn("%s: ignoring obsolete section __kcrctab_gpl\n",
mod->name);
--
Thanks,
Petr