From: "John W. Linville" <linville@tuxdriver.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: "Luis R. Rodriguez" <mcgrof@frijolero.org>,
linux-kernel@vger.kernel.org, Dave Jones <davej@redhat.com>,
Greg KH <greg@kroah.com>,
Debian kernel maintainers <debian-kernel@lists.debian.org>,
Rusty Russell <rusty@rustcorp.com.au>,
linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>
Subject: [RFC] modpost: add option to allow external modules to avoid taint
Date: Wed, 14 Dec 2011 11:20:03 -0500 [thread overview]
Message-ID: <1323879603-2961-1-git-send-email-linville@tuxdriver.com> (raw)
In-Reply-To: <1323752547.2825.101.camel@deadeye>
In some cases, it might be desirable to package a module from an
external source tree alongside the base kernel. In those cases, it
might also be desirable to not have those modules tainting the kernel.
This patch provides a mechanism for an external module build to declare
itself as an "integrated build". Such a module is then treated the same
as an intree module.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
Any thoughts on this? I'm thinking of adding this to Fedora kernels,
where I have been working to integrate the compat-wireless package as
part of the base kernel RPM.
scripts/Makefile.modpost | 1 +
scripts/mod/modpost.c | 10 ++++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 08dce14..160c6fb 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -81,6 +81,7 @@ modpost = scripts/mod/modpost \
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
$(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
$(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
+ $(if $(INTEGRATED_BUILD),-B) \
$(if $(cross_build),-c)
quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 2bd594e..5d077f9 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -43,6 +43,9 @@ static int warn_unresolved = 0;
static int sec_mismatch_count = 0;
static int sec_mismatch_verbose = 1;
+/* Is this a module being built as part of an integrated package? */
+static int integrated_build = 0;
+
enum export {
export_plain, export_unused, export_gpl,
export_unused_gpl, export_gpl_future, export_unknown
@@ -1851,7 +1854,7 @@ static void add_header(struct buffer *b, struct module *mod)
static void add_intree_flag(struct buffer *b, int is_intree)
{
- if (is_intree)
+ if (is_intree || integrated_build)
buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n");
}
@@ -2101,7 +2104,7 @@ int main(int argc, char **argv)
struct ext_sym_list *extsym_iter;
struct ext_sym_list *extsym_start = NULL;
- while ((opt = getopt(argc, argv, "i:I:e:cmsSo:awM:K:")) != -1) {
+ while ((opt = getopt(argc, argv, "i:I:e:cmsSo:awM:K:B")) != -1) {
switch (opt) {
case 'i':
kernel_read = optarg;
@@ -2139,6 +2142,9 @@ int main(int argc, char **argv)
case 'w':
warn_unresolved = 1;
break;
+ case 'B':
+ integrated_build = 1;
+ break;
default:
exit(1);
}
--
1.7.4.4
next prev parent reply other threads:[~2011-12-14 16:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 13:12 [PATCH] module,bug: Add TAINT_OOT_MODULE flag for modules not built in-tree Ben Hutchings
2011-10-24 13:58 ` Dave Jones
2011-10-24 14:57 ` Randy Dunlap
2011-10-25 3:56 ` Rusty Russell
2011-10-25 9:52 ` Ben Hutchings
2011-10-25 15:38 ` Nick Bowler
2011-10-25 16:05 ` Ben Hutchings
2011-10-25 16:51 ` Nick Bowler
2011-10-25 20:04 ` Greg KH
2011-10-25 20:17 ` Dave Jones
2011-10-25 20:54 ` Greg KH
2011-10-26 13:08 ` Nick Bowler
2011-10-27 1:11 ` Rusty Russell
2011-10-27 1:55 ` Dave Jones
2011-10-31 1:30 ` Rusty Russell
2011-10-27 5:49 ` Greg KH
2011-10-26 4:16 ` Rusty Russell
2011-10-26 6:15 ` Mathieu Desnoyers
2011-10-25 1:37 ` Greg KH
2011-12-12 21:40 ` Luis R. Rodriguez
2011-12-12 21:58 ` Ben Hutchings
2011-12-12 22:47 ` Luis R. Rodriguez
2011-12-12 22:49 ` Luis R. Rodriguez
2011-12-13 5:02 ` Ben Hutchings
2011-12-14 16:20 ` John W. Linville [this message]
2011-12-14 16:52 ` [RFC] modpost: add option to allow external modules to avoid taint Ben Hutchings
2011-12-14 17:39 ` John W. Linville
[not found] ` <87mxatp3ty.fsf@rustcorp.com.au>
2011-12-16 4:39 ` Ben Hutchings
2011-12-19 5:45 ` Rusty Russell
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=1323879603-2961-1-git-send-email-linville@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=ben@decadent.org.uk \
--cc=davej@redhat.com \
--cc=debian-kernel@lists.debian.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@frijolero.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®