Loading kernel/module.c +13 −0 Original line number Diff line number Diff line Loading @@ -2178,6 +2178,11 @@ static void free_module(struct module *mod) /* Finally, free the core (containing the module structure) */ disable_ro_nx(&mod->core_layout); #ifdef CONFIG_DEBUG_MODULE_LOAD_INFO pr_info("Unloaded %s: module core layout address range: 0x%lx-0x%lx\n", mod->name, (long)mod->core_layout.base, (long)(mod->core_layout.base + mod->core_layout.size - 1)); #endif module_memfree(mod->core_layout.base); #ifdef CONFIG_MPU Loading Loading @@ -3507,6 +3512,14 @@ static noinline int do_init_module(struct module *mod) mod_tree_remove_init(mod); disable_ro_nx(&mod->init_layout); module_arch_freeing_init(mod); #ifdef CONFIG_DEBUG_MODULE_LOAD_INFO pr_info("Loaded %s: module init layout addresses range: 0x%lx-0x%lx\n", mod->name, (long)mod->init_layout.base, (long)(mod->init_layout.base + mod->init_layout.size - 1)); pr_info("%s: core layout addresses range: 0x%lx-0x%lx\n", mod->name, (long)mod->core_layout.base, (long)(mod->core_layout.base + mod->core_layout.size - 1)); #endif mod->init_layout.base = NULL; mod->init_layout.size = 0; mod->init_layout.ro_size = 0; Loading lib/Kconfig.debug +12 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,18 @@ config DYNAMIC_DEBUG See Documentation/admin-guide/dynamic-debug-howto.rst for additional information. config DEBUG_MODULE_LOAD_INFO bool "Use prints for module info under a debug flag" help If you say Y here the resulting kernel image will include debug prints which was kept under DEBUG_MODULE_LOAD_INFO. This will be used by developer to debug loadable modules in the kernel. Say Y here only if you plan to debug the kernel. If unsure, say N. endmenu # "printk and dmesg options" menu "Compile-time checks and compiler options" Loading Loading
kernel/module.c +13 −0 Original line number Diff line number Diff line Loading @@ -2178,6 +2178,11 @@ static void free_module(struct module *mod) /* Finally, free the core (containing the module structure) */ disable_ro_nx(&mod->core_layout); #ifdef CONFIG_DEBUG_MODULE_LOAD_INFO pr_info("Unloaded %s: module core layout address range: 0x%lx-0x%lx\n", mod->name, (long)mod->core_layout.base, (long)(mod->core_layout.base + mod->core_layout.size - 1)); #endif module_memfree(mod->core_layout.base); #ifdef CONFIG_MPU Loading Loading @@ -3507,6 +3512,14 @@ static noinline int do_init_module(struct module *mod) mod_tree_remove_init(mod); disable_ro_nx(&mod->init_layout); module_arch_freeing_init(mod); #ifdef CONFIG_DEBUG_MODULE_LOAD_INFO pr_info("Loaded %s: module init layout addresses range: 0x%lx-0x%lx\n", mod->name, (long)mod->init_layout.base, (long)(mod->init_layout.base + mod->init_layout.size - 1)); pr_info("%s: core layout addresses range: 0x%lx-0x%lx\n", mod->name, (long)mod->core_layout.base, (long)(mod->core_layout.base + mod->core_layout.size - 1)); #endif mod->init_layout.base = NULL; mod->init_layout.size = 0; mod->init_layout.ro_size = 0; Loading
lib/Kconfig.debug +12 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,18 @@ config DYNAMIC_DEBUG See Documentation/admin-guide/dynamic-debug-howto.rst for additional information. config DEBUG_MODULE_LOAD_INFO bool "Use prints for module info under a debug flag" help If you say Y here the resulting kernel image will include debug prints which was kept under DEBUG_MODULE_LOAD_INFO. This will be used by developer to debug loadable modules in the kernel. Say Y here only if you plan to debug the kernel. If unsure, say N. endmenu # "printk and dmesg options" menu "Compile-time checks and compiler options" Loading