[kernel/f16] modpost: add option to allow external modules to avoid taint Make integrated compat-wireless take ad
John W. Linville
linville at fedoraproject.org
Wed Jan 25 20:58:24 UTC 2012
commit 6d0a652dcdd974ea05e5492cad055de602b82929
Author: John W. Linville <linville at tuxdriver.com>
Date: Wed Jan 25 15:49:38 2012 -0500
modpost: add option to allow external modules to avoid taint
Make integrated compat-wireless take advantage of the above
compat-wireless-integrated-build.patch | 12 +++
kernel.spec | 16 ++++-
...-option-to-allow-external-modules-to-avoi.patch | 80 ++++++++++++++++++++
3 files changed, 106 insertions(+), 2 deletions(-)
---
diff --git a/compat-wireless-integrated-build.patch b/compat-wireless-integrated-build.patch
new file mode 100644
index 0000000..1d08e4b
--- /dev/null
+++ b/compat-wireless-integrated-build.patch
@@ -0,0 +1,12 @@
+diff -up compat-wireless-2011-12-01/Makefile.orig compat-wireless-2011-12-01/Makefile
+--- compat-wireless-2011-12-01/Makefile.orig 2011-12-14 09:10:01.377297637 -0500
++++ compat-wireless-2011-12-01/Makefile 2011-12-14 09:47:36.834100534 -0500
+@@ -68,7 +68,7 @@ all: modules
+
+ modules: $(CREL_CHECK)
+ @./scripts/check_config.sh
+- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
++ $(MAKE) -C $(KLIB_BUILD) M=$(PWD) INTEGRATED_BUILD=1 modules
+ @touch $@
+
+ bt: $(CREL_CHECK)
diff --git a/kernel.spec b/kernel.spec
index b7a4ec6..f5ea9bd 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -701,6 +701,7 @@ Patch471: floppy-drop-disable_hlt-warning.patch
Patch510: linux-2.6-silence-noise.patch
Patch520: quite-apm.patch
Patch530: linux-2.6-silence-fbcon-logo.patch
+Patch540: modpost-add-option-to-allow-external-modules-to-avoi.patch
Patch700: linux-2.6-e1000-ich9-montevina.patch
@@ -826,10 +827,12 @@ Patch22000: rcu-reintroduce-missing-calls.patch
# compat-wireless patches
Patch50000: compat-wireless-config-fixups.patch
Patch50001: compat-wireless-pr_fmt-warning-avoidance.patch
-Patch50002: compat-wireless-rtl8192cu-Fix-WARNING-on-suspend-resume.patch
+Patch50002: compat-wireless-integrated-build.patch
+
+Patch50100: compat-wireless-rtl8192cu-Fix-WARNING-on-suspend-resume.patch
# Remove overlapping hardware support between b43 and brcmsmac
-Patch50100: b43-add-option-to-avoid-duplicating-device-support-w.patch
+Patch50101: b43-add-option-to-avoid-duplicating-device-support-w.patch
%endif
@@ -1416,6 +1419,11 @@ ApplyPatch linux-2.6-silence-noise.patch
# Make fbcon not show the penguins with 'quiet'
ApplyPatch linux-2.6-silence-fbcon-logo.patch
+%if %{with_backports}
+# modpost: add option to allow external modules to avoid taint
+ApplyPatch modpost-add-option-to-allow-external-modules-to-avoi.patch
+%endif
+
# Changes to upstream defaults.
@@ -2298,6 +2306,10 @@ fi
# and build.
%changelog
+* Wed Jan 25 2012 John W. Linville <linville at redhat.com>
+- modpost: add option to allow external modules to avoid taint
+- Make integrated compat-wireless take advantage of the above
+
* Wed Jan 25 2012 Josh Boyer <jwboyer at redhat.com>
- Backport patch to fix oops in rds (rhbz 718790)
diff --git a/modpost-add-option-to-allow-external-modules-to-avoi.patch b/modpost-add-option-to-allow-external-modules-to-avoi.patch
new file mode 100644
index 0000000..d203854
--- /dev/null
+++ b/modpost-add-option-to-allow-external-modules-to-avoi.patch
@@ -0,0 +1,80 @@
+From 69f63a67165da5e9f08c1132521598701d914573 Mon Sep 17 00:00:00 2001
+From: John W. Linville <linville at tuxdriver.com>
+Date: Wed, 14 Dec 2011 11:09:04 -0500
+Subject: [PATCH] modpost: add option to allow external modules to avoid taint
+
+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 at 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
+
More information about the scm-commits
mailing list