Bug#574584: module-init-tools: modprobe is too chatty with parse_toplevel_config and parse_kcmdline
* Chung-chieh Shan k...@digitas.harvard.edu [Thu Mar 18, 2010 at 11:43:37PM -0700]: After I added i915.modeset=1 to my kernel cmdline today, modprobe started printing options i915 modeset=1 to stdout whenever it is invoked (even just to add or remove a non-existent module, add an already-loaded module, or remove a never-loaded module). Further investigation revealed that modprobe -c repeats the first few hundred lines of its config output. I am not so familiar with the internals of modprobe, but perhaps the following patch is the right fix to both problems? Addon: initramfs related scripts that use a modprobe call in a function that's being evaluated in another one, but don't redirect stdout to /dev/null can seriously fail due to this behaviour. Cc-ing debian-live, as they might be interested in this issue as well, for now the following patch addresses this issue for live-initramfs: http://git.grml.org/?p=live-initramfs-grml.git;a=blob;f=debian/patches/16_do_not_leak_modprobe_options.dpatch;hb=HEAD regards, -mika- signature.asc Description: Digital signature
Bug#574584: module-init-tools: modprobe is too chatty with parse_toplevel_config and parse_kcmdline
On 04/02/2010 03:54 PM, Michael Prokop wrote: Cc-ing debian-live, as they might be interested in this issue as well, for now the following patch addresses this issue for live-initramfs: http://git.grml.org/?p=live-initramfs-grml.git;a=blob;f=debian/patches/16_do_not_leak_modprobe_options.dpatch;hb=HEAD thanks, applied in git. -- Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist Email: daniel.baum...@panthera-systems.net Internet: http://people.panthera-systems.net/~daniel-baumann/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#574584: module-init-tools: modprobe is too chatty with parse_toplevel_config and parse_kcmdline
Package: module-init-tools Version: 3.12~pre2-1 Severity: normal Tags: patch After I added i915.modeset=1 to my kernel cmdline today, modprobe started printing options i915 modeset=1 to stdout whenever it is invoked (even just to add or remove a non-existent module, add an already-loaded module, or remove a never-loaded module). Further investigation revealed that modprobe -c repeats the first few hundred lines of its config output. I am not so familiar with the internals of modprobe, but perhaps the following patch is the right fix to both problems? --- modprobe.c.orig 2010-03-10 00:51:56.0 -0800 +++ modprobe.c 2010-03-18 23:35:08.0 -0700 @@ -1894,7 +1894,7 @@ parse_toplevel_config(configname, conf, dump_config, flags mit_remove); /* Read module options from kernel command line */ - parse_kcmdline(1, conf.options); + parse_kcmdline(dump_config, conf.options); if (dump_config) { char *aliasfilename, *symfilename; @@ -1903,9 +1903,6 @@ nofail_asprintf(aliasfilename, %s/modules.alias, dirname); nofail_asprintf(symfilename, %s/modules.symbols, dirname); - parse_toplevel_config(configname, conf, 1, 0); - /* Read module options from kernel command line */ - parse_kcmdline(1, conf.options); read_aliases(aliasfilename, , 1, conf.aliases); read_aliases(symfilename, , 1, conf.aliases); -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.32 (SMP w/2 CPU cores) Locale: LANG=zh_TW.UTF-8, LC_CTYPE=zh_TW.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages module-init-tools depends on: ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip module-init-tools recommends no packages. module-init-tools suggests no packages. -- no debconf information -- signature.asc Description: Digital signature