kallsyms: remove unsed API lookup_symbol_attrs
with commit '7878c231dae0 ("slab: remove /proc/slab_allocators")'
lookup_symbol_attrs usage is removed.
Thus removing redundant API.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
This commit is contained in:
committed by
Luis Chamberlain
parent
15d5daa0a7
commit
4f521bab5b
@@ -381,34 +381,6 @@ out:
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size,
|
||||
unsigned long *offset, char *modname, char *name)
|
||||
{
|
||||
struct module *mod;
|
||||
|
||||
preempt_disable();
|
||||
list_for_each_entry_rcu(mod, &modules, list) {
|
||||
if (mod->state == MODULE_STATE_UNFORMED)
|
||||
continue;
|
||||
if (within_module(addr, mod)) {
|
||||
const char *sym;
|
||||
|
||||
sym = find_kallsyms_symbol(mod, addr, size, offset);
|
||||
if (!sym)
|
||||
goto out;
|
||||
if (modname)
|
||||
strscpy(modname, mod->name, MODULE_NAME_LEN);
|
||||
if (name)
|
||||
strscpy(name, sym, KSYM_NAME_LEN);
|
||||
preempt_enable();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
out:
|
||||
preempt_enable();
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
|
||||
char *name, char *module_name, int *exported)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user