From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx2.suse.de ([195.135.220.15]:55106 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbcHWTKX (ORCPT ); Tue, 23 Aug 2016 15:10:23 -0400 Date: Tue, 23 Aug 2016 21:10:13 +0200 From: "Luis R. Rodriguez" To: Cristina-Gabriela Moraru Cc: "Luis R. Rodriguez" , linux-kernel@vger.kernel.org, Tom Gundersen , Kay Sievers , Rusty Russell , akpm@linux-foundation.org, Steven Rostedt , backports@vger.kernel.org, vegard.nossum@gmail.com Subject: Re: [RFC PATCH 4/5] Set KCONFIG_KSYMB as value for kconfig_ksymb module attribute Message-ID: <20160823191013.GG3296@wotan.suse.de> (sfid-20160823_211107_546304_46738B33) References: <1471462023-119645-1-git-send-email-cristina.moraru09@gmail.com> <1471462023-119645-5-git-send-email-cristina.moraru09@gmail.com> <20160818185941.GK3296@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: backports-owner@vger.kernel.org List-ID: On Sat, Aug 20, 2016 at 05:16:50PM +0200, Cristina-Gabriela Moraru wrote: > 2016-08-18 20:59 GMT+02:00 Luis R. Rodriguez : > > > > On Wed, Aug 17, 2016 at 09:27:02PM +0200, Cristina Moraru wrote: > > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > > > index 48958d3..a105916 100644 > > > --- a/scripts/mod/modpost.c > > > +++ b/scripts/mod/modpost.c > > > @@ -2245,6 +2245,12 @@ static void add_srcversion(struct buffer *b, struct module *mod) > > > } > > > } > > > > > > +static void add_kconfig_symbol(struct buffer *b, struct module *mod) > > > +{ > > > + buf_printf(b, "\n"); > > > + buf_printf(b, "MODULE_INFO(kconfig_symbol, KBUILD_KSYMB);\n"); > > > > What if its not available? What happens? > > > > If not available KBUILD_KSYMB is "" and so is set in kconfig_symbol. > More concrete: > > prompt:/sys$ cat ./module/mptbase/kconfig_symbol > > prompt:/sys$ As I noted in my other e-mail I think its best we just avoid exposing this then for modules that lack a mapping, and then we make this best effort, but document the shortcomings very well and super clearly as to why a backward map is not possible. This then enables us to do work on the build system to help with this and complete the semantic gap. Luis -- To unsubscribe from this list: send the line "unsubscribe backports" in From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754872AbcHWTLI (ORCPT ); Tue, 23 Aug 2016 15:11:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:55106 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbcHWTKX (ORCPT ); Tue, 23 Aug 2016 15:10:23 -0400 Date: Tue, 23 Aug 2016 21:10:13 +0200 From: "Luis R. Rodriguez" To: Cristina-Gabriela Moraru Cc: "Luis R. Rodriguez" , linux-kernel@vger.kernel.org, Tom Gundersen , Kay Sievers , Rusty Russell , akpm@linux-foundation.org, Steven Rostedt , backports@vger.kernel.org, vegard.nossum@gmail.com Subject: Re: [RFC PATCH 4/5] Set KCONFIG_KSYMB as value for kconfig_ksymb module attribute Message-ID: <20160823191013.GG3296@wotan.suse.de> References: <1471462023-119645-1-git-send-email-cristina.moraru09@gmail.com> <1471462023-119645-5-git-send-email-cristina.moraru09@gmail.com> <20160818185941.GK3296@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 20, 2016 at 05:16:50PM +0200, Cristina-Gabriela Moraru wrote: > 2016-08-18 20:59 GMT+02:00 Luis R. Rodriguez : > > > > On Wed, Aug 17, 2016 at 09:27:02PM +0200, Cristina Moraru wrote: > > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > > > index 48958d3..a105916 100644 > > > --- a/scripts/mod/modpost.c > > > +++ b/scripts/mod/modpost.c > > > @@ -2245,6 +2245,12 @@ static void add_srcversion(struct buffer *b, struct module *mod) > > > } > > > } > > > > > > +static void add_kconfig_symbol(struct buffer *b, struct module *mod) > > > +{ > > > + buf_printf(b, "\n"); > > > + buf_printf(b, "MODULE_INFO(kconfig_symbol, KBUILD_KSYMB);\n"); > > > > What if its not available? What happens? > > > > If not available KBUILD_KSYMB is "" and so is set in kconfig_symbol. > More concrete: > > prompt:/sys$ cat ./module/mptbase/kconfig_symbol > > prompt:/sys$ As I noted in my other e-mail I think its best we just avoid exposing this then for modules that lack a mapping, and then we make this best effort, but document the shortcomings very well and super clearly as to why a backward map is not possible. This then enables us to do work on the build system to help with this and complete the semantic gap. Luis