linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cristina Moraru <cristina.moraru09@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: mcgrof@kernel.org, teg@jklm.no, kay@vrfy.org,
	rusty@rustcorp.com.au, akpm@linux-foundation.org,
	Cristina Moraru <cristina.moraru09@gmail.com>
Subject: [RFC PATCH 0/3] Add kconfig symbol as module attribute
Date: Sun, 31 Jul 2016 17:33:49 +0200	[thread overview]
Message-ID: <1469979232-15531-1-git-send-email-cristina.moraru09@gmail.com> (raw)

This patchset implements dynamic pegging of kconfig symbol
into driver modinfo section

* adds a kconfig symbol attribute to struct module
* updates streamline_config.pl to generate the auxiliary file
scripts/mod/Module.ksymb containing associations of driver file
names and corresponding kconfig symbols CONFIG_*
* updates modpost to use the information from Module.ksymb to
add the content of the attribute kconfig_symbol.

Please note that this patchset is part of a research and
currently does not provide complete correctness or efficiency.

The result of this patchset is the following: the attribute
kconfig_symbol is added but only for some modules, namely for
those for which the module name corresponds to the source file
name of the driver. This has been observed by the fact that
there are more srcversion attributes than kconfig_symbol. This
happens mostly because, in some cases, the driver name does not
match the registered module name (more details in the the PATCH2
commit message). Also, in file Module.ksymb some object names
have more than one CONFIG_* symbol. This is because that object
it may be a platform independent component that is linked to more
than one driver. So, all CONFIGs in which is found appear as
associated with this object. However, I'm guessing this doesn't
happen for final individual modules.
Currently, for the sake of the proof of concept, the first of
the CONFIG_* options is considered.

Usage:
First run 'make localmodconfig' in order to generate the .config
file and Module.ksymb file with the associations. Then compile
the kernel. In the machine booted with this kernel kconfig_symbol
attributes should appear in /sys instances of the modules.

Thanks,
Cristina

Cristina Moraru (3):
  Add kconfig_symbol attribute to struct module
  Add generation of Module.ksymb file in streamline_config.pl
  Add dynamic pegging of Kconfig symbol

 include/linux/module.h               |  1 +
 kernel/module.c                      |  1 +
 scripts/kconfig/streamline_config.pl | 20 +++++++++++++++
 scripts/mod/modpost.c                | 47 ++++++++++++++++++++++++++++++++++++
 scripts/mod/modpost.h                |  1 +
 5 files changed, 70 insertions(+)

-- 
2.7.4

             reply	other threads:[~2016-07-31 15:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-31 15:33 Cristina Moraru [this message]
2016-07-31 15:33 ` [RFC PATCH 1/3] Add kconfig_symbol attribute to struct module Cristina Moraru
2016-07-31 15:33 ` [RFC PATCH 2/3] Add generation of Module.ksymb file in streamline_config.pl Cristina Moraru
2016-08-08 19:15   ` Luis R. Rodriguez
2016-08-08 20:32     ` Julia Lawall
2016-08-08 21:54       ` Luis R. Rodriguez
2016-08-09  6:54     ` Geert Uytterhoeven
2016-07-31 15:33 ` [RFC PATCH 3/3] Add dynamic pegging of Kconfig symbol Cristina Moraru
2016-08-08 20:05   ` Luis R. Rodriguez
2016-08-08 17:25 ` [RFC PATCH 0/3] Add kconfig symbol as module attribute Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469979232-15531-1-git-send-email-cristina.moraru09@gmail.com \
    --to=cristina.moraru09@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=teg@jklm.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).