Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic value

2016-02-26 Thread Michael Ellerman
On Thu, 2016-02-25 at 14:17 +0100, Torsten Duwe wrote: > On Thu, Feb 25, 2016 at 01:28:25AM +1100, Michael Ellerman wrote: > > > > We can make that process easier by marking the generated stubs with a > > magic value, and then looking for that magic value. Altough this is not > > as rigorous as

Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic value

2016-02-25 Thread Torsten Duwe
On Thu, Feb 25, 2016 at 01:28:25AM +1100, Michael Ellerman wrote: > > We can make that process easier by marking the generated stubs with a > magic value, and then looking for that magic value. Altough this is not > as rigorous as the current method, I believe it is sufficient in > practice. The

Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic value

2016-02-24 Thread Michael Ellerman
On Thu, 2016-02-25 at 11:04 +1100, Balbir Singh wrote: > > On 25/02/16 01:28, Michael Ellerman wrote: > > -bool is_module_trampoline(u32 *p) > > +int module_trampoline_target(struct module *mod, unsigned long addr, > > +unsigned long *target) > > { > > - unsigned int i;

Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic value

2016-02-24 Thread Balbir Singh
On 25/02/16 01:28, Michael Ellerman wrote: > When a module is loaded, calls out to the kernel go via a stub which is > generated at runtime. One of these stubs is used to call _mcount(), > which is the default target of tracing calls generated by the compiler > with -pg. > > If dynamic ftrace is

[PATCH 02/12] powerpc/module: Mark module stubs with a magic value

2016-02-24 Thread Michael Ellerman
When a module is loaded, calls out to the kernel go via a stub which is generated at runtime. One of these stubs is used to call _mcount(), which is the default target of tracing calls generated by the compiler with -pg. If dynamic ftrace is enabled (which it typicall is), another stub is used to