Hi, On (09/08/17 22:23), Yu, Fenghua wrote: > > From: Sergey Senozhatsky [mailto:sergey.senozhatsky.w...@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