module-add-helper-function-for-reading-module_buildid.patch removed from -mm tree
The quilt patch titled
Subject: module: add helper function for reading module_buildid()
has been removed from the -mm tree. Its filename was
module-add-helper-function-for-reading-module_buildid.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Petr Mladek <[email protected]>
Subject: module: add helper function for reading module_buildid()
Date: Fri, 28 Nov 2025 14:59:16 +0100
Add a helper function for reading the optional "build_id" member of struct module. It is going to be used also in ftrace_mod_address_lookup().
Use "#ifdef" instead of "#if IS_ENABLED()" to match the declaration of the optional field in struct module.
---
include/linux/module.h | 9 +++++++++ kernel/module/kallsyms.c | 9 ++------- 2 files changed, 11 insertions(+), 7 deletions(-)
include/linux/module.h renamed from include/linux/module.h~module-add-helper-function-for-reading-module_buildid +9 -0
@@ -748,6 +748,15 @@ static inline void __module_get(struct m __mod ? __mod->name :"kernel" ; \ }) +static inline const unsigned char *module_buildid (struct module *mod) +{ +#ifdef CONFIG_STACKTRACE_BUILD_ID +return mod->build_id; +#else +return NULL ; +#endif +} +/* Dereference module function descriptor */ void *dereference_module_function_descriptor (struct module *mod,void *ptr);
kernel/module/kallsyms.c renamed from kernel/module/kallsyms.c~module-add-helper-function-for-reading-module_buildid +2 -7
@@ -334,13 +334,8 @@ int module_address_lookup(unsigned longif (mod) {if (modname) *modname = mod->name; -if (modbuildid) { -#if IS_ENABLED (CONFIG_STACKTRACE_BUILD_ID ) - *modbuildid = mod->build_id; -#else - *modbuildid =NULL ; -#endif - } +if (modbuildid) + *modbuildid =module_buildid (mod); sym =find_kallsyms_symbol (mod, addr, size, offset);
_
Patches currently in -mm which might be from [email protected] are