lkml.org 
[lkml]   [2017]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 00/14] Fix wrong %pF and %pS printk format specifier usages
Date
> From: Sergey Senozhatsky [mailto:sergey.senozhatsky.work@gmail.com]
> On (09/07/17 16:05), Luck, Tony wrote:
> +static inline bool __mod_text_address(struct module *mod,
> + unsigned long addr) {
> + /* Make sure it's within the text section. */
> + if (!within(addr, mod->init_layout.base, mod->init_layout.text_size)
> + && !within(addr, mod->core_layout.base, mod-
> >core_layout.text_size))
> + return false;
> + return true;
> +}

The __mod_text_address() may be defined only on IA64, PPC64 and PARISC since it's only called in those cases.

> +
> #ifdef CONFIG_KALLSYMS
> /*
> * This ignores the intensely annoying "mapping symbols" found @@ -3942,6
> +3952,14 @@ const char *module_address_lookup(unsigned long addr,
> preempt_disable();
> mod = __module_address(addr);
> if (mod) {
> +#if defined(CONFIG_IA64) || defined(CONFIG_PPC64) ||
> defined(CONFIG_PARISC)
> + unsigned long deref_addr;
> +
> + if (!__mod_text_address(mod, addr))
> + deref_addr = dereference_function_descriptor(addr);
> + if (__mod_text_address(mod, deref_addr))
> + addr = deref_addr; #endif

Thanks.

-Fenghua

\
 
 \ /
  Last update: 2017-09-09 00:24    [W:0.173 / U:1.568 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site