Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1387255

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

From Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [RFC] perf probe: Fix offline module name missmatch issue
Date 2016-04-26 11:10 +0200
Message-ID <rs7ak-4SP-35@gated-at.bofh.it> (permalink)
References <rrM5Q-4ay-5@gated-at.bofh.it> <rrWeR-49v-3@gated-at.bofh.it> <rs0Lw-89e-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Thanks Masami,

On Tuesday 26 April 2016 07:49 AM, Masami Hiramatsu wrote:
> On Tue, 26 Apr 2016 06:24:38 +0900
> Masami Hiramatsu <mhiramat@kernel.org> 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...

So this is the same approach kernel use to find module name when module is
loaded. Please refer this function for more detail:

kernel/module.c ::  static struct module *setup_load_info(...)

Regards,
Ravi

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC] perf probe: Fix offline module name missmatch issue Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-04-25 12:50 +0200
  Re: [RFC] perf probe: Fix offline module name missmatch issue Masami Hiramatsu <mhiramat@kernel.org> - 2016-04-25 23:30 +0200
    Re: [RFC] perf probe: Fix offline module name missmatch issue Masami Hiramatsu <mhiramat@kernel.org> - 2016-04-26 04:20 +0200
      Re: [RFC] perf probe: Fix offline module name missmatch issue Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-04-26 11:10 +0200
    Re: [RFC] perf probe: Fix offline module name missmatch issue Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-04-26 11:00 +0200
      Re: [RFC] perf probe: Fix offline module name missmatch issue "Wangnan (F)" <wangnan0@huawei.com> - 2016-04-26 11:20 +0200
        Re: [RFC] perf probe: Fix offline module name missmatch issue Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-04-26 12:50 +0200
      Re: [RFC] perf probe: Fix offline module name missmatch issue Masami Hiramatsu <mhiramat@kernel.org> - 2016-04-26 12:50 +0200
        Re: [RFC] perf probe: Fix offline module name missmatch issue Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-04-26 16:40 +0200

csiph-web