lkml.org 
[lkml]   [2017]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 00/14] Fix wrong %pF and %pS printk format specifier usages
Hi,

On (09/08/17 22:23), Yu, Fenghua wrote:
> > 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.

sure. well, I didn't post the exact patch. __mod_text_address() was
supposed to be used from __module_text_address() /* I factored out
__mod_text_address() from that function, basically */

---

@@ -4305,9 +4323,7 @@ struct module *__module_text_address(unsigned long addr)
{
struct module *mod = __module_address(addr);
if (mod) {
- /* 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))
+ if (!__mod_text_address(mod, addr))
mod = NULL;
}
return mod;
---
-ss

\
 
 \ /
  Last update: 2017-09-14 08:36    [W:0.129 / U:1.088 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site