--- zzzz-none-000/linux-5.15.111/kernel/module.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/kernel/module.c 2024-02-07 10:23:28.000000000 +0000 @@ -3,6 +3,10 @@ * Copyright (C) 2002 Richard Henderson * Copyright (C) 2001 Rusty Russell, 2002, 2010 Rusty Russell IBM. */ +/* + * Includes Intel Corporation's changes dated: 2019. + * Changed portions - Copyright 2019, Intel Corporation. + */ #define INCLUDE_VERMAGIC @@ -2207,6 +2211,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("unload module: %s\n", mod->name); +#endif + /* Finally, free the core (containing the module structure) */ module_memfree(mod->core_layout.base); } @@ -3798,6 +3806,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: @@ -4788,6 +4800,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])