[kernel] modpost: add option to allow external modules to avoid taint Make integrated compat-wireless take ad

John W. Linville linville at fedoraproject.org
Tue Dec 20 12:30:41 UTC 2011


commit 217da4eb7b200560792b61a34674d00088e45657
Author: John W. Linville <linville at tuxdriver.com>
Date:   Mon Dec 19 16:32:30 2011 -0500

    modpost: add option to allow external modules to avoid taint
    Make integrated compat-wireless take advantage of the above
    Turn-on backports again, since TAINT_OOT_MODULE issue is resolved
    Update compat-wireless snapshot from 2011-12-18

 ...ule_usb_driver-and-module_platform_driver.patch |   90 --------------------
 compat-wireless-config-fixups.patch                |   36 ++++----
 compat-wireless-integrated-build.patch             |   12 +++
 config-backports                                   |    5 +
 kernel.spec                                        |   23 ++++--
 ...-option-to-allow-external-modules-to-avoi.patch |   80 +++++++++++++++++
 sources                                            |    2 +-
 7 files changed, 131 insertions(+), 117 deletions(-)
---
diff --git a/compat-wireless-config-fixups.patch b/compat-wireless-config-fixups.patch
index 411ee40..d73698e 100644
--- a/compat-wireless-config-fixups.patch
+++ b/compat-wireless-config-fixups.patch
@@ -1,6 +1,6 @@
-diff -up compat-wireless-3.2-rc1-1/config.mk.orig compat-wireless-3.2-rc1-1/config.mk
---- compat-wireless-3.2-rc1-1/config.mk.orig	2011-11-22 13:09:50.422879313 -0500
-+++ compat-wireless-3.2-rc1-1/config.mk	2011-11-22 13:10:28.870398679 -0500
+diff -up compat-wireless-2011-12-18/config.mk.orig compat-wireless-2011-12-18/config.mk
+--- compat-wireless-2011-12-18/config.mk.orig	2011-12-18 16:10:34.000000000 -0500
++++ compat-wireless-2011-12-18/config.mk	2011-12-19 15:54:24.962156028 -0500
 @@ -14,6 +14,9 @@ else
  include $(KLIB_BUILD)/.config
  endif
@@ -10,18 +10,16 @@ diff -up compat-wireless-3.2-rc1-1/config.mk.orig compat-wireless-3.2-rc1-1/conf
 +
  ifneq ($(wildcard $(KLIB_BUILD)/Makefile),)
  
- COMPAT_LATEST_VERSION = 1
-diff -up compat-wireless-3.2-rc1-1/drivers/misc/eeprom/Makefile.orig compat-wireless-3.2-rc1-1/drivers/misc/eeprom/Makefile
---- compat-wireless-3.2-rc1-1/drivers/misc/eeprom/Makefile.orig	2011-11-22 13:09:50.423879301 -0500
-+++ compat-wireless-3.2-rc1-1/drivers/misc/eeprom/Makefile	2011-11-22 13:10:28.871398662 -0500
-@@ -1,3 +1,3 @@
+ COMPAT_LATEST_VERSION = 3
+diff -up compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile.orig compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile
+--- compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile.orig	2011-12-18 16:10:36.000000000 -0500
++++ compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile	2011-12-19 15:54:24.963156015 -0500
+@@ -1 +1 @@
 -obj-$(CONFIG_EEPROM_93CX6)	+= eeprom_93cx6.o
 +#obj-$(CONFIG_EEPROM_93CX6)	+= eeprom_93cx6.o
- obj-$(CONFIG_EEPROM_93XX46)	+= eeprom_93xx46.o
- obj-$(CONFIG_EEPROM_DIGSY_MTC_CFG) += digsy_mtc_eeprom.o
-diff -up compat-wireless-3.2-rc1-1/drivers/net/ethernet/atheros/Makefile.orig compat-wireless-3.2-rc1-1/drivers/net/ethernet/atheros/Makefile
---- compat-wireless-3.2-rc1-1/drivers/net/ethernet/atheros/Makefile.orig	2011-11-22 13:09:50.423879301 -0500
-+++ compat-wireless-3.2-rc1-1/drivers/net/ethernet/atheros/Makefile	2011-11-22 13:10:28.871398662 -0500
+diff -up compat-wireless-2011-12-18/drivers/net/ethernet/atheros/Makefile.orig compat-wireless-2011-12-18/drivers/net/ethernet/atheros/Makefile
+--- compat-wireless-2011-12-18/drivers/net/ethernet/atheros/Makefile.orig	2011-12-18 16:10:35.000000000 -0500
++++ compat-wireless-2011-12-18/drivers/net/ethernet/atheros/Makefile	2011-12-19 15:54:24.963156015 -0500
 @@ -2,7 +2,7 @@
  # Makefile for the Atheros network device drivers.
  #
@@ -34,9 +32,9 @@ diff -up compat-wireless-3.2-rc1-1/drivers/net/ethernet/atheros/Makefile.orig co
 +#obj-$(CONFIG_ATL2) += atlx/
 +#obj-$(CONFIG_ATL1E) += atl1e/
 +#obj-$(CONFIG_ATL1C) += atl1c/
-diff -up compat-wireless-3.2-rc1-1/drivers/net/usb/Makefile.orig compat-wireless-3.2-rc1-1/drivers/net/usb/Makefile
---- compat-wireless-3.2-rc1-1/drivers/net/usb/Makefile.orig	2011-11-22 13:09:50.424879289 -0500
-+++ compat-wireless-3.2-rc1-1/drivers/net/usb/Makefile	2011-11-22 13:10:28.872398646 -0500
+diff -up compat-wireless-2011-12-18/drivers/net/usb/Makefile.orig compat-wireless-2011-12-18/drivers/net/usb/Makefile
+--- compat-wireless-2011-12-18/drivers/net/usb/Makefile.orig	2011-12-18 16:10:36.000000000 -0500
++++ compat-wireless-2011-12-18/drivers/net/usb/Makefile	2011-12-19 15:54:24.964156002 -0500
 @@ -2,7 +2,7 @@
  # Makefile for USB Network drivers
  #
@@ -48,9 +46,9 @@ diff -up compat-wireless-3.2-rc1-1/drivers/net/usb/Makefile.orig compat-wireless
 +#obj-$(CONFIG_USB_NET_COMPAT_RNDIS_HOST)	+= rndis_host.o
 +#obj-$(CONFIG_USB_COMPAT_USBNET)	+= usbnet.o
  
-diff -up compat-wireless-3.2-rc1-1/Makefile.orig compat-wireless-3.2-rc1-1/Makefile
---- compat-wireless-3.2-rc1-1/Makefile.orig	2011-11-22 13:10:37.165294951 -0500
-+++ compat-wireless-3.2-rc1-1/Makefile	2011-11-22 13:10:47.335167758 -0500
+diff -up compat-wireless-2011-12-18/Makefile.orig compat-wireless-2011-12-18/Makefile
+--- compat-wireless-2011-12-18/Makefile.orig	2011-12-18 16:10:34.000000000 -0500
++++ compat-wireless-2011-12-18/Makefile	2011-12-19 15:54:24.965155989 -0500
 @@ -41,8 +41,8 @@ endif
  
  endif
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/config-backports b/config-backports
index c1b1781..33a3adc 100644
--- a/config-backports
+++ b/config-backports
@@ -12,6 +12,11 @@
 # CONFIG_B44 is not set
 
 #
+# Prevent b43 and brcmsmac from competing
+#
+# CONFIG_B43_BCMA is not set
+
+#
 # These have to be turned-on again since compat-wireless does not
 # provide them...
 #
diff --git a/kernel.spec b/kernel.spec
index a001065..fc51d3d 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -147,7 +147,7 @@ Summary: The Linux kernel
 %define with_release   %{?_with_release:      1} %{?!_with_release:      0}
 
 # Include driver backports (e.g. compat-wireless) in the kernel build.
-%define with_backports %{?_with_backports:    1} %{?!_with_backports:    0}
+%define with_backports %{?_without_backports: 0} %{?!_without_backports: 1}
 
 # Set debugbuildsenabled to 1 for production (build separate debug kernels)
 #  and 0 for rawhide (all kernels are debug kernels).
@@ -202,7 +202,7 @@ Summary: The Linux kernel
 %define kversion 3.%{base_sublevel}
 
 # The compat-wireless version
-%define cwversion 2011-12-01
+%define cwversion 2011-12-18
 
 #######################################################################
 # If cwversion is less than kversion, make sure with_backports is
@@ -665,6 +665,7 @@ Patch471: floppy-Remove-_hlt-related-functions.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
 
@@ -737,7 +738,7 @@ Patch21045: nfs-client-freezer.patch
 
 # compat-wireless patches
 Patch50000: compat-wireless-config-fixups.patch
-Patch50001: compat-add-module_usb_driver-and-module_platform_driver.patch
+Patch50001: compat-wireless-integrated-build.patch
 
 %endif
 
@@ -1345,6 +1346,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.
 
 
@@ -1485,10 +1491,7 @@ rm -rf compat-wireless-%{cwversion}
 cd compat-wireless-%{cwversion}
 
 ApplyPatch compat-wireless-config-fixups.patch
-ApplyPatch compat-add-module_usb_driver-and-module_platform_driver.patch
-
-# Remove overlap between bcma/b43 and brcmsmac and reenable bcm4331
-ApplyPatch bcma-brcmsmac-compat.patch
+ApplyPatch compat-wireless-integrated-build.patch
 
 cd ..
 
@@ -2230,6 +2233,12 @@ fi
 #                 ||----w |
 #                 ||     ||
 %changelog
+* Wed Dec 19 2011 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
+- Turn-on backports again, since TAINT_OOT_MODULE issue is resolved
+- Update compat-wireless snapshot from 2011-12-18
+
 * Mon Dec 19 2011 Dave Jones <davej at redhat.com>
 - Switch x86-code-dump-fix-truncation.patch to use the pending upstream fix.
 
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
+
diff --git a/sources b/sources
index 2a6a3d1..69b9816 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
 8d43453f8159b2332ad410b19d86a931  linux-3.1.tar.bz2
 020a0ea456f0f061bf8d7c52c3670421  patch-3.2-rc6.xz
-5360f273d6b9e930675bf48f9aad33f7  compat-wireless-2011-12-01.tar.bz2
 aa87e7d3593118a2680c8eda45c88e0d  patch-3.2-rc6-git1.xz
+b5f0924b0547918ca1e1685811554315  compat-wireless-2011-12-18.tar.bz2


More information about the scm-commits mailing list