Re: [RFC] perf probe: Fix offline module name missmatch issue

From: Masami Hiramatsu
Date: Mon Apr 25 2016 - 22:19:24 EST


On Tue, 26 Apr 2016 06:24:38 +0900
Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:
> > +/*
> > + * NOTE:
> > + * '.gnu.linkonce.this_module' section of kernel module elf directly
> > + * maps to 'struct module' from linux/module.h. This section contains
> > + * actual module name which will be used by kernel after loading it.
> > + * But, we cannot use 'struct module' here since linux/module.h is not
> > + * exposed to user-space. Offset of 'name' has remained same from long
> > + * time, so hardcoding it here.
> > + */

BTW, is there no way to get the module name avoiding to access
this "hidden" data structure?
This looks very tricky way...

Thanks,

--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>