diff options
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/module.c b/kernel/module.c index ae79ce615cb9..6f69463f0066 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -3381,6 +3381,8 @@ static inline int within(unsigned long addr, void *start, unsigned long size) | |||
| 3381 | */ | 3381 | */ |
| 3382 | static inline int is_arm_mapping_symbol(const char *str) | 3382 | static inline int is_arm_mapping_symbol(const char *str) |
| 3383 | { | 3383 | { |
| 3384 | if (str[0] == '.' && str[1] == 'L') | ||
| 3385 | return true; | ||
| 3384 | return str[0] == '$' && strchr("atd", str[1]) | 3386 | return str[0] == '$' && strchr("atd", str[1]) |
| 3385 | && (str[2] == '\0' || str[2] == '.'); | 3387 | && (str[2] == '\0' || str[2] == '.'); |
| 3386 | } | 3388 | } |
| @@ -3444,8 +3446,7 @@ const char *module_address_lookup(unsigned long addr, | |||
| 3444 | list_for_each_entry_rcu(mod, &modules, list) { | 3446 | list_for_each_entry_rcu(mod, &modules, list) { |
| 3445 | if (mod->state == MODULE_STATE_UNFORMED) | 3447 | if (mod->state == MODULE_STATE_UNFORMED) |
| 3446 | continue; | 3448 | continue; |
| 3447 | if (within_module_init(addr, mod) || | 3449 | if (within_module(addr, mod)) { |
| 3448 | within_module_core(addr, mod)) { | ||
| 3449 | if (modname) | 3450 | if (modname) |
| 3450 | *modname = mod->name; | 3451 | *modname = mod->name; |
| 3451 | ret = get_ksymbol(mod, addr, size, offset); | 3452 | ret = get_ksymbol(mod, addr, size, offset); |
| @@ -3469,8 +3470,7 @@ int lookup_module_symbol_name(unsigned long addr, char *symname) | |||
| 3469 | list_for_each_entry_rcu(mod, &modules, list) { | 3470 | list_for_each_entry_rcu(mod, &modules, list) { |
| 3470 | if (mod->state == MODULE_STATE_UNFORMED) | 3471 | if (mod->state == MODULE_STATE_UNFORMED) |
| 3471 | continue; | 3472 | continue; |
| 3472 | if (within_module_init(addr, mod) || | 3473 | if (within_module(addr, mod)) { |
| 3473 | within_module_core(addr, mod)) { | ||
| 3474 | const char *sym; | 3474 | const char *sym; |
| 3475 | 3475 | ||
| 3476 | sym = get_ksymbol(mod, addr, NULL, NULL); | 3476 | sym = get_ksymbol(mod, addr, NULL, NULL); |
| @@ -3495,8 +3495,7 @@ int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, | |||
| 3495 | list_for_each_entry_rcu(mod, &modules, list) { | 3495 | list_for_each_entry_rcu(mod, &modules, list) { |
| 3496 | if (mod->state == MODULE_STATE_UNFORMED) | 3496 | if (mod->state == MODULE_STATE_UNFORMED) |
| 3497 | continue; | 3497 | continue; |
| 3498 | if (within_module_init(addr, mod) || | 3498 | if (within_module(addr, mod)) { |
| 3499 | within_module_core(addr, mod)) { | ||
| 3500 | const char *sym; | 3499 | const char *sym; |
| 3501 | 3500 | ||
| 3502 | sym = get_ksymbol(mod, addr, size, offset); | 3501 | sym = get_ksymbol(mod, addr, size, offset); |
| @@ -3760,8 +3759,7 @@ struct module *__module_address(unsigned long addr) | |||
| 3760 | list_for_each_entry_rcu(mod, &modules, list) { | 3759 | list_for_each_entry_rcu(mod, &modules, list) { |
| 3761 | if (mod->state == MODULE_STATE_UNFORMED) | 3760 | if (mod->state == MODULE_STATE_UNFORMED) |
| 3762 | continue; | 3761 | continue; |
| 3763 | if (within_module_core(addr, mod) | 3762 | if (within_module(addr, mod)) |
| 3764 | || within_module_init(addr, mod)) | ||
| 3765 | return mod; | 3763 | return mod; |
| 3766 | } | 3764 | } |
| 3767 | return NULL; | 3765 | return NULL; |
