Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-20 Thread Alexander Sverdlin
Hello Ard, On 13/03/18 18:32, Alexander Sverdlin wrote: > u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val) > { > struct mod_plt_sec *pltsec = !in_init(mod, loc) ? &mod->arch.core > : >

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Ard Biesheuvel
On 13 March 2018 at 18:24, Alexander Sverdlin wrote: > Hi! > > On 13/03/18 18:51, Ard Biesheuvel wrote: if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS)) module_plt_alloc_fixed(); >>> Do you consider this a legal C code if without module-plts.o the function >>> would not exist at all? >>> Tha

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
Hi! On 13/03/18 18:39, Ard Biesheuvel wrote: >> u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr >> val) >> { >> struct mod_plt_sec *pltsec = !in_init(mod, loc) ? >> &mod->arch.core : >>

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
Hi! On 13/03/18 18:51, Ard Biesheuvel wrote: >>> if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS)) >>> module_plt_alloc_fixed(); >> Do you consider this a legal C code if without module-plts.o the function >> would not exist at all? >> That's too much relying on optimizer I think... >> > Yes, we rely o

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Ard Biesheuvel
On 13 March 2018 at 17:49, Alexander Sverdlin wrote: > On 13/03/18 18:39, Ard Biesheuvel wrote: >> if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS)) >> module_plt_alloc_fixed(); > > Do you consider this a legal C code if without module-plts.o the function > would not exist at all? > That's too much rel

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
On 13/03/18 18:39, Ard Biesheuvel wrote: > if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS)) > module_plt_alloc_fixed(); Do you consider this a legal C code if without module-plts.o the function would not exist at all? That's too much relying on optimizer I think... -- Best regards, Alexander Sverdli

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Ard Biesheuvel
On 13 March 2018 at 17:32, Alexander Sverdlin wrote: > Hi Ard! > > On 13/03/18 18:18, Ard Biesheuvel wrote: > u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val) > { > struct mod_plt_sec *pltsec = !in_init(mod, loc) ? &mod->arch.core > : >

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
Hi Ard! On 13/03/18 18:18, Ard Biesheuvel wrote: u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val) { struct mod_plt_sec *pltsec = !in_init(mod, loc) ? &mod->arch.core : &mod->arch.init;

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Ard Biesheuvel
On 13 March 2018 at 17:13, Alexander Sverdlin wrote: > Hello Ard, > > On 13/03/18 17:12, Ard Biesheuvel wrote: >>> u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val) >>> { >>> struct mod_plt_sec *pltsec = !in_init(mod, loc) ? &mod->arch.core : >>>

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
Hello Ard, On 13/03/18 17:12, Ard Biesheuvel wrote: >> u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val) >> { >> struct mod_plt_sec *pltsec = !in_init(mod, loc) ? &mod->arch.core : >> &mod->arch.init; >> +

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Ard Biesheuvel
On 13 March 2018 at 13:53, Alexander Sverdlin wrote: > Teach ftrace_make_call() and ftrace_make_nop() about PLTs. > Teach PLT code about FTRACE and all its callbacks. > Otherwise the following might happen: > > [ cut here ] > WARNING: CPU: 14 PID: 2265 at .../arch/arm/kerne