Re: [PATCHv3 2/7] sections: split dereference_function_descriptor()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Petr Mladek <pmladek@xxxxxxxx>
- Subject: Re: [PATCHv3 2/7] sections: split dereference_function_descriptor()
- From: Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx>
- Date: Thu, 19 Oct 2017 15:45:44 +0900
- Cc: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, James Bottomley <jejb@xxxxxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Jessica Yu <jeyu@xxxxxxxxxx>, Alexei Starovoitov <ast@xxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- In-reply-to: <20171004090043.GD20084@pathway.suse.cz>
- References: <20170930025319.987-1-sergey.senozhatsky@gmail.com> <20170930025319.987-3-sergey.senozhatsky@gmail.com> <20171004090043.GD20084@pathway.suse.cz>
- User-agent: Mutt/1.9.1 (2017-09-22)
On (10/04/17 11:00), Petr Mladek wrote:
[..]
> > /* random extra sections (if any). Override
> > diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h
> > index 4d0cb9bba93e..172904e9cded 100644
> > --- a/include/linux/moduleloader.h
> > +++ b/include/linux/moduleloader.h
> > @@ -85,6 +85,10 @@ void module_arch_cleanup(struct module *mod);
> > /* Any cleanup before freeing mod->module_init */
> > void module_arch_freeing_init(struct module *mod);
> >
> > +/* Dereference module function descriptor */
> > +unsigned long dereference_module_function_descriptor(struct module *mod,
> > + unsigned long addr);
> > +
>
> The function is used when the module is already loaded. IMHO,
> include/linux/module.h would be a better place.
>
> One advantage would be that we could use the same trick
> as in include/asm-generic/sections.h. I mean:
>
> #define dereference_module_function_descriptor(mod, addr) (addr)
>
> and redefine it in the three affected
> arch/<arch>/include/asm/module.h headers. Then it might be completely
> optimized out on all architectures.
will take a look.
-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]