Revert "kallsyms: Make module_kallsyms_on_each_symbol generally available"

This reverts commit 7b296fe960.
This commit is contained in:
Ksawlii 2024-11-24 00:22:59 +01:00
parent 5fca109408
commit 62030ec18e
2 changed files with 2 additions and 9 deletions

View file

@ -892,17 +892,8 @@ static inline bool module_sig_ok(struct module *module)
}
#endif /* CONFIG_MODULE_SIG */
#if defined(CONFIG_MODULES) && defined(CONFIG_KALLSYMS)
int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
struct module *, unsigned long),
void *data);
#else
static inline int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
struct module *, unsigned long),
void *data)
{
return -EOPNOTSUPP;
}
#endif /* CONFIG_MODULES && CONFIG_KALLSYMS */
#endif /* _LINUX_MODULE_H */

View file

@ -4575,6 +4575,7 @@ unsigned long module_kallsyms_lookup_name(const char *name)
return ret;
}
#ifdef CONFIG_LIVEPATCH
int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
struct module *, unsigned long),
void *data)
@ -4605,6 +4606,7 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
mutex_unlock(&module_mutex);
return ret;
}
#endif /* CONFIG_LIVEPATCH */
#endif /* CONFIG_KALLSYMS */
static void cfi_init(struct module *mod)