linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] modules: CONFIG_MODULE_COMPRESS: add hint that userspace support may easily be missing.
@ 2015-05-31 15:29 Andreas Mohr
  2015-06-01  6:26 ` Rusty Russell
  0 siblings, 1 reply; 14+ messages in thread
From: Andreas Mohr @ 2015-05-31 15:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Rusty Russell, Bertrand Jacquin, Marco d'Itri, linux-modules,
	linux-kernel

Hi,

I just had a not so nice experience
when finally upgrading to a new 4.1-rc5
with CONFIG_MODULE_COMPRESS newly enabled -
userspace binary parts (kmod 18 or 20 in my case)
did not have compression enabled
(at least on Debian 8pre, vs. encountering it enabled on FC21)
since it does not seem to be
the default build configuration of kmod (yet?).

Doing a manual
    for gz in $(find . -name "*.gz"); do echo gunzip $gz; done
    depmod -a (somewhere temporarily in bootup scripts)
manages to fix the grave problem
introduced by erroneously having enabled CONFIG_MODULE_COMPRESS.

Thus it seems that the Kconfig text was much more optimistic
than a hapless user would want to encounter,
thus I decided to have it updated.


BTW: kmod and/or module-init-tools packages
might want to provide a generic way to openly advertise
certain build-configured "capabilities" in the binary -
neither
    kmod --help
nor
    kmod -V
indicated whether or not they provided capabilities
such as e.g. providing or not providing support of compression types
and which ones.
That would have been a very helpful way
to reliably determine
that support in fact is missing in the binary,
rather than having to resort to clumsy hacks
such as ldd or even strings.


While this is a minor but useful addition
rather than a severe fix,
having a CC to stable@ added subsequently might be useful.

Thanks!

Signed-off-by: Andreas Mohr <andim2@users.sf.net>

---
 init/Kconfig | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index dc24dec..8e451f30 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1951,11 +1951,19 @@ config MODULE_COMPRESS
 	  This option compresses the kernel modules when 'make
 	  modules_install' is run.
 
-	  The modules will be compressed either using gzip or xz depend on the
-	  choice made in "Compression algorithm".
-
-	  module-init-tools has support for gzip format while kmod handle gzip
-	  and xz compressed modules.
+	  The module files will be compressed either using gzip or xz
+	  depending on the choice made in "Compression algorithm".
+
+	  Obviously one will then need appropriate userspace parts
+	  which are actually able to deal with compressed files, too:
+	  module-init-tools has support for gzip format
+	  while kmod handles gzip and xz compressed modules.
+	  However, we observed that in several environments
+	  module loader binaries do not have that enabled (yet?)
+	  and thus bootup will fail fatally -
+	  manually doing ldd on these binaries
+	  to detect compression libraries
+	  is a tell-tale sign of having support enabled.
 
 	  When a kernel module is installed from outside of the main kernel
 	  source and uses the Kbuild system for installing modules then that
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-06-07  6:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-31 15:29 [PATCH] modules: CONFIG_MODULE_COMPRESS: add hint that userspace support may easily be missing Andreas Mohr
2015-06-01  6:26 ` Rusty Russell
2015-06-03 12:04   ` Michal Marek
2015-06-03 17:30   ` Lucas De Marchi
2015-06-03 17:36     ` Kay Sievers
2015-06-03 17:51       ` Lucas De Marchi
2015-06-04  1:30     ` Rusty Russell
2015-06-04  2:31       ` Lucas De Marchi
2015-06-04 19:53         ` Andreas Mohr
2015-06-04 20:22         ` Rusty Russell
2015-06-07  6:18           ` Lucas De Marchi
2015-06-04  2:51       ` Marco d'Itri
2015-06-04  3:19       ` Stephen Rothwell
2015-06-04 20:09         ` Andreas Mohr

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).