@@ -569,6 +569,15 @@ struct symsearch {
bool unused;
};
+/*
+ * Walk the exported symbol table
+ *
+ * Must be called with module_mutex held or preemption disabled.
+ */
+bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
+ struct module *owner,
+ void *data), void *data);
+
/* Returns 0 and fills in value, defined and namebuf, or -ERANGE if
symnum out of range. */
int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
@@ -420,7 +420,7 @@ static bool each_symbol_in_section(const struct symsearch *arr,
}
/* Returns true as soon as fn returns true, otherwise false. */
-static bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
+bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
struct module *owner,
void *data),
void *data)
@@ -482,6 +482,7 @@ static bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
}
return false;
}
+EXPORT_SYMBOL_GPL(each_symbol_section);
struct find_symbol_arg {
/* Input */
BugLink: https://bugs.launchpad.net/bugs/1932065 This reverts commit c08935472a88ab208e3f6f4aade27216875c6b74. Upstream introduced 'module' patches that removed exported symbols that might cause potential disruption and breakage for customers. Temporarily reverting as SAUCE patches to allow customers time to make necessary changes to support patch changes. Signed-off-by: Ian May <ian.may@canonical.com> --- include/linux/module.h | 9 +++++++++ kernel/module.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-)