Skip to content

Commit 0bd476e

Browse files
willdeacontorvalds
authored andcommitted
kallsyms: unexport kallsyms_lookup_name() and kallsyms_on_each_symbol()
kallsyms_lookup_name() and kallsyms_on_each_symbol() are exported to modules despite having no in-tree users and being wide open to abuse by out-of-tree modules that can use them as a method to invoke arbitrary non-exported kernel functions. Unexport kallsyms_lookup_name() and kallsyms_on_each_symbol(). Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Masami Hiramatsu <[email protected]> Reviewed-by: Quentin Perret <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: K.Prasad <[email protected]> Cc: Miroslav Benes <[email protected]> Cc: Petr Mladek <[email protected]> Cc: Joe Lawrence <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent d8a84d3 commit 0bd476e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/kallsyms.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ unsigned long kallsyms_lookup_name(const char *name)
175175
}
176176
return module_kallsyms_lookup_name(name);
177177
}
178-
EXPORT_SYMBOL_GPL(kallsyms_lookup_name);
179178

180179
int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
181180
unsigned long),
@@ -194,7 +193,6 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
194193
}
195194
return module_kallsyms_on_each_symbol(fn, data);
196195
}
197-
EXPORT_SYMBOL_GPL(kallsyms_on_each_symbol);
198196

199197
static unsigned long get_symbol_pos(unsigned long addr,
200198
unsigned long *symbolsize,

0 commit comments

Comments
 (0)