Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752045AbcDZCTW (ORCPT ); Mon, 25 Apr 2016 22:19:22 -0400 Received: from mail.kernel.org ([198.145.29.136]:56505 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322AbcDZCTV (ORCPT ); Mon, 25 Apr 2016 22:19:21 -0400 Date: Tue, 26 Apr 2016 11:19:16 +0900 From: Masami Hiramatsu To: Masami Hiramatsu Cc: Ravi Bangoria , linux-kernel@vger.kernel.org, acme@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, masami.hiramatsu.pt@hitachi.com, wangnan0@huawei.com, namhyung@kernel.org, srikar@linux.vnet.ibm.com, naveen.n.rao@linux.vnet.ibm.com Subject: Re: [RFC] perf probe: Fix offline module name missmatch issue Message-Id: <20160426111916.50d03e047aaed8112b235686@kernel.org> In-Reply-To: <20160426062438.aea663884cf5bd95f766f2d5@kernel.org> References: <1461580708-15169-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com> <20160426062438.aea663884cf5bd95f766f2d5@kernel.org> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 701 Lines: 20 On Tue, 26 Apr 2016 06:24:38 +0900 Masami Hiramatsu 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