--- zzzz-none-000/linux-4.9.279/kernel/module.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/kernel/module.c 2023-02-08 10:58:16.000000000 +0000 @@ -16,6 +16,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* + * Includes Intel Corporation's changes dated: 2019. + * Changed portions - Copyright 2019, Intel Corporation. + */ + #include #include #include @@ -2148,6 +2153,10 @@ /* Free lock-classes; relies on the preceding sync_rcu(). */ lockdep_free_key_range(mod->core_layout.base, mod->core_layout.size); +#ifdef CONFIG_INTEL_DEBUG_MODULES + printk("unloaded module: %s\n", mod->name); +#endif + /* Finally, free the core (containing the module structure) */ disable_ro_nx(&mod->core_layout); module_memfree(mod->core_layout.base); @@ -3492,6 +3501,10 @@ mutex_unlock(&module_mutex); wake_up_all(&module_wq); +#ifdef CONFIG_INTEL_DEBUG_MODULES + printk("loaded module: %s 0x%p-0x%p\n", mod->name, mod->core_layout.base, mod->core_layout.base + mod->core_layout.size); +#endif + return 0; fail_free_freeinit: @@ -4314,6 +4327,9 @@ if (mod->state == MODULE_STATE_UNFORMED) continue; pr_cont(" %s%s", mod->name, module_flags(mod, buf)); +#ifdef CONFIG_INTEL_DEBUG_MODULES + pr_cont(" 0x%p-0x%p,", mod->core_layout.base, mod->core_layout.base + mod->init_layout.size + mod->core_layout.size); +#endif } preempt_enable(); if (last_unloaded_module[0])