Bug#679571: modprobe: no module unix found in modules.dep

2012-07-22 Thread Ben Hutchings
Control: tag -1 patch

On Fri, 2012-06-29 at 13:35 -0700, Zack Weinberg wrote:
 Package: initramfs-tools
 Version: 0.106
 Severity: normal
 
 No matter how I configure the initramfs, I always get the warning message
 
 modprobe: no module unix found in modules.dep
 
 on boot.
[...]

I've been meaning to fix this for a while.  It seems to be a bug in the
minimal implementation of modprobe used in the initramfs, part of
'busybox'.  I'm attaching a patch that seems to do the right thing,
which I hope the busybox maintainer will apply.

Ben.

-- 
Ben Hutchings
73.46% of all statistics are made up.
From: Ben Hutchings b...@decadent.org.uk
Subject: modprobe: Read modules.builtin
Bug-Debian: http://bugs.debian.org/679571

This suppresses warnings for explicit probing of potential modules
that are actually built-in.

--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -595,6 +595,11 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
 		while (config_read(parser, s, 1, 1, # \t, PARSE_NORMAL  ~PARSE_GREEDY))
 			get_or_add_modentry(s)-flags |= MODULE_FLAG_LOADED;
 		config_close(parser);
+
+		parser = config_open2(modules.builtin, fopen_for_read);
+		while (config_read(parser, s, 1, 1, # \t, PARSE_NORMAL))
+			get_or_add_modentry(s)-flags |= MODULE_FLAG_LOADED;
+		config_close(parser);
 	}
 
 	if (opt  (OPT_INSERT_ALL | OPT_REMOVE)) {


signature.asc
Description: This is a digitally signed message part


Bug#679571: modprobe: no module unix found in modules.dep

2012-07-22 Thread Michael Tokarev
forwarded 679571 https://bugs.busybox.net/show_bug.cgi?id=5270
thanks

On 22.07.2012 10:11, Ben Hutchings wrote:
[]
 I've been meaning to fix this for a while.  It seems to be a bug in the
 minimal implementation of modprobe used in the initramfs, part of
 'busybox'.  I'm attaching a patch that seems to do the right thing,
 which I hope the busybox maintainer will apply.

Thank you Ben for the patch.  I've been, well, waiting for the upstream
to show any reaction for https://bugs.busybox.net/show_bug.cgi?id=5270
(for which I forgot to set forwarded, doing it now), and basically
forgot about this stuff (since I still can't use debian initramfs I
don't see this message on every boot myself).

Your patch isn't exactly sufficient, -- well, the behavour should now
match m-i-t/kmod as modprobe wont return error when asked to load a
built-in module anymore, but it will still error out with --first-time
(which should ignore loaded modules but not built-ins), and it will
emit somewhat unclear error message when asked to _remove_ a built-in
module.  Maybe that's all just cosmetics, but these cosmetics are so
easy to fix already... :)

But anyway.  I agree this needs to be fixed in busybox for sure.  But
do we really need this `modprobe unix' in the first place?  It's been
many years since this isn't needed for debian kernels, and it is
difficult to imagine a custom kernel with unix.ko as a module.  I
had such a config for a while, but it gave me quite a few headaches
already, so I changed from unix=m to unix=y.  And 3rd, I'm not sure
AF_UNIX is really needed for initramfs itself anymore - the module
autoloads just fine on first access, when udev creates its first
unix socket.

So I'd say this 'modprobe unix' should be removed from udev hook.
(Cc'ing Md for this).

Thanks,

/mjt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679571: modprobe: no module unix found in modules.dep

2012-07-22 Thread Michael Tokarev
source busybox
severity 654282 wishlist
merge 652672 654282
thanks

On 22.07.2012 11:15, Michael Tokarev wrote:
 Thank you Ben for the patch.  I've been, well, waiting for the upstream
 to show any reaction for https://bugs.busybox.net/show_bug.cgi?id=5270
 (for which I forgot to set forwarded, doing it now), and basically

Actually it is yet another bug, #652672.

Since no functionality is affected by it, I'm mergeing all
with #652672, with severity wishlist - it is just the
message, nothing more.  I'm okay with raising severity but
let's at least merge them.

Thanks,

/mjt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679571: modprobe: no module unix found in modules.dep

2012-07-22 Thread Ben Hutchings
On Sun, 2012-07-22 at 12:22 +0400, Michael Tokarev wrote:
 source busybox
 severity 654282 wishlist
 merge 652672 654282
 thanks
 
 On 22.07.2012 11:15, Michael Tokarev wrote:
  Thank you Ben for the patch.  I've been, well, waiting for the upstream
  to show any reaction for https://bugs.busybox.net/show_bug.cgi?id=5270
  (for which I forgot to set forwarded, doing it now), and basically
 
 Actually it is yet another bug, #652672.
 
 Since no functionality is affected by it, I'm mergeing all
 with #652672, with severity wishlist - it is just the
 message, nothing more.  I'm okay with raising severity but
 let's at least merge them.

A spurious warning message that appears for *all* users is important.

Ben.

-- 
Ben Hutchings
73.46% of all statistics are made up.


signature.asc
Description: This is a digitally signed message part


Bug#679571: modprobe: no module unix found in modules.dep

2012-07-22 Thread Ben Hutchings
On Sun, 2012-07-22 at 11:15 +0400, Michael Tokarev wrote:
 forwarded 679571 https://bugs.busybox.net/show_bug.cgi?id=5270
 thanks
 
 On 22.07.2012 10:11, Ben Hutchings wrote:
 []
  I've been meaning to fix this for a while.  It seems to be a bug in the
  minimal implementation of modprobe used in the initramfs, part of
  'busybox'.  I'm attaching a patch that seems to do the right thing,
  which I hope the busybox maintainer will apply.
 
 Thank you Ben for the patch.  I've been, well, waiting for the upstream
 to show any reaction for https://bugs.busybox.net/show_bug.cgi?id=5270
 (for which I forgot to set forwarded, doing it now), and basically
 forgot about this stuff (since I still can't use debian initramfs I
 don't see this message on every boot myself).
 
 Your patch isn't exactly sufficient, -- well, the behavour should now
 match m-i-t/kmod as modprobe wont return error when asked to load a
 built-in module anymore, but it will still error out with --first-time

The --first-time option isn't implemented in busybox 1.20.0.

 (which should ignore loaded modules but not built-ins), and it will
 emit somewhat unclear error message when asked to _remove_ a built-in
 module.  Maybe that's all just cosmetics, but these cosmetics are so
 easy to fix already... :)

OK, attaching a new patch that does that as well.

 But anyway.  I agree this needs to be fixed in busybox for sure.  But
 do we really need this `modprobe unix' in the first place?  It's been
 many years since this isn't needed for debian kernels, and it is
 difficult to imagine a custom kernel with unix.ko as a module.  I
 had such a config for a while, but it gave me quite a few headaches
 already, so I changed from unix=m to unix=y.  And 3rd, I'm not sure
 AF_UNIX is really needed for initramfs itself anymore - the module
 autoloads just fine on first access, when udev creates its first
 unix socket.
 
 So I'd say this 'modprobe unix' should be removed from udev hook.
 (Cc'ing Md for this).

It could and should, but that's kind of a workaround for the deficiency
in busybox.  The same problem will occur for other potential modules
that are built-in in a custom kernel but explicitly loaded by userland.

Ben.

-- 
Ben Hutchings
73.46% of all statistics are made up.
From: Ben Hutchings b...@decadent.org.uk
Subject: modprobe: Read modules.builtin
Bug-Debian: http://bugs.debian.org/679571

This allows explicit probing to succeed when the requested module
is actually built-in, and corrects the error message for removal.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -146,6 +146,7 @@ static const char modprobe_longopts[] AL
 /* was seen in modules.dep: */
 #define MODULE_FLAG_FOUND_IN_MODDEP 0x0004
 #define MODULE_FLAG_BLACKLISTED 0x0008
+#define MODULE_FLAG_BUILTIN 0x0010
 
 struct module_entry { /* I'll call it ME. */
 	unsigned flags;
@@ -240,7 +241,7 @@ static void add_probe(const char *name)
 
 	m = get_or_add_modentry(name);
 	if (!(option_mask32  (OPT_REMOVE | OPT_SHOW_DEPS))
-	  (m-flags  MODULE_FLAG_LOADED)
+	  (m-flags  (MODULE_FLAG_LOADED | MODULE_FLAG_BUILTIN))
 	) {
 		DBG(skipping %s, it is already loaded, name);
 		return;
@@ -394,8 +395,10 @@ static int do_modprobe(struct module_ent
 
 	if (!(m-flags  MODULE_FLAG_FOUND_IN_MODDEP)) {
 		if (!(option_mask32  INSMOD_OPT_SILENT))
-			bb_error_msg(module %s not found in modules.dep,
-humanly_readable_name(m));
+			bb_error_msg((m-flags  MODULE_FLAG_BUILTIN) ?
+ module %s is builtin :
+ module %s not found in modules.dep,
+ humanly_readable_name(m));
 		return -ENOENT;
 	}
 	DBG(do_modprob'ing %s, m-modname);
@@ -595,6 +598,11 @@ int modprobe_main(int argc UNUSED_PARAM,
 		while (config_read(parser, s, 1, 1, # \t, PARSE_NORMAL  ~PARSE_GREEDY))
 			get_or_add_modentry(s)-flags |= MODULE_FLAG_LOADED;
 		config_close(parser);
+
+		parser = config_open2(modules.builtin, fopen_for_read);
+		while (config_read(parser, s, 1, 1, # \t, PARSE_NORMAL))
+			get_or_add_modentry(s)-flags |= MODULE_FLAG_BUILTIN;
+		config_close(parser);
 	}
 
 	if (opt  (OPT_INSERT_ALL | OPT_REMOVE)) {


signature.asc
Description: This is a digitally signed message part


Bug#679571: modprobe: no module unix found in modules.dep

2012-07-22 Thread Marco d'Itri
On Jul 22, Ben Hutchings b...@decadent.org.uk wrote:

 A spurious warning message that appears for *all* users is important.
This will be rectified very soon, sorry for the noise.

-- 
ciao,
Marco


signature.asc
Description: Digital signature


Bug#679571: modprobe: no module unix found in modules.dep

2012-06-30 Thread Michael Prokop
* Zack Weinberg [Fri Jun 29, 2012 at 01:35:04PM -0700]:

 No matter how I configure the initramfs, I always get the warning message

 modprobe: no module unix found in modules.dep

 on boot.
[...]

This is #654282 (package udev)

regards,
-mika-


signature.asc
Description: Digital signature


Bug#679571: modprobe: no module unix found in modules.dep

2012-06-29 Thread Zack Weinberg
Package: initramfs-tools
Version: 0.106
Severity: normal

No matter how I configure the initramfs, I always get the warning message

modprobe: no module unix found in modules.dep

on boot.

The configuration below is for my regular desktop, which has continuously
tracked unstable since before squeeze, and may therefore have Weird Shit
in it.  However, I see exactly the same error message on a fresh install
of wheezy-to-be with all kernel-related configuration left at the
defaults, using this installer image:

aa4082a89b8ff92cf35fda56349069139243ea55  
debian-wheezy-DI-a1-i386-businesscard.iso

-- Package-specific info:
-- initramfs sizes
-- /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.2.0-3-amd64 
root=UUID=80eabe2b-76e2-4a6c-a00e-df8e6cc0dc1d ro quiet

-- resume
RESUME=UUID=0fbd36df-8e69-476f-9191-f74dcd10245b
-- /proc/filesystems
ext4
fuseblk

-- lsmod
Module  Size  Used by
nouveau   545197  3 
video  17628  1 nouveau
ttm48725  1 nouveau
drm_kms_helper 27227  1 nouveau
drm   167670  5 drm_kms_helper,ttm,nouveau
i2c_algo_bit   12841  1 nouveau
parport_pc 22364  0 
bnep   17567  2 
ppdev  12763  0 
rfcomm 33656  0 
bluetooth 119406  10 rfcomm,bnep
rfkill 19012  3 bluetooth
lp 17149  0 
parport31858  3 lp,ppdev,parport_pc
cpufreq_userspace  12576  0 
cpufreq_stats  12866  0 
cpufreq_conservative13147  0 
cpufreq_powersave  12454  0 
pci_stub   12429  1 
vboxpci19103  0 
vboxnetadp 25443  0 
vboxnetflt 23608  1 
vboxdrv   186009  4 vboxnetflt,vboxnetadp,vboxpci
binfmt_misc12957  1 
microcode  25793  0 
fuse   61981  1 
joydev 17266  0 
usb_storage43870  0 
uas13296  0 
hid_microsoft  12627  0 
usbhid 36379  0 
hid81288  2 usbhid,hid_microsoft
snd_hda_codec_realtek   188797  1 
snd_hda_intel  26345  2 
snd_hda_codec  78031  2 snd_hda_intel,snd_hda_codec_realtek
snd_hwdep  13186  1 snd_hda_codec
snd_pcm63900  2 snd_hda_codec,snd_hda_intel
snd_page_alloc 13003  2 snd_pcm,snd_hda_intel
snd_seq45093  0 
snd_seq_device 13176  1 snd_seq
snd_timer  22917  2 snd_seq,snd_pcm
snd52850  12 
snd_timer,snd_seq_device,snd_seq,snd_pcm,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek
soundcore  13065  1 snd
sr_mod 21899  0 
cdrom  35401  1 sr_mod
uhci_hcd   26865  0 
acpi_cpufreq   12935  0 
mperf  12453  1 acpi_cpufreq
ehci_hcd   40215  0 
usbcore   128498  6 ehci_hcd,uhci_hcd,usbhid,uas,usb_storage
mxm_wmi12473  1 nouveau
iTCO_wdt   17081  0 
iTCO_vendor_support12704  1 iTCO_wdt
i2c_i801   16870  0 
i2c_core   23876  5 i2c_i801,i2c_algo_bit,drm,drm_kms_helper,nouveau
pcspkr 12579  0 
wmi13243  1 mxm_wmi
r8169  46980  0 
processor  28157  1 acpi_cpufreq
thermal_sys18040  2 processor,video
coretemp   12898  0 
mii12675  1 r8169
psmouse64455  0 
serio_raw  12931  0 
evdev  17562  10 
usb_common 12354  1 usbcore
button 12937  1 nouveau
crc32c_intel   12747  0 
ext4  350411  2 
crc16  12343  2 ext4,bluetooth
jbd2   62015  1 ext4
mbcache13065  1 ext4
sd_mod 36136  4 
crc_t10dif 12348  1 sd_mod
ata_generic12479  0 
ata_piix   29535  3 
libata140589  2 ata_piix,ata_generic
scsi_mod  162372  5 libata,sd_mod,sr_mod,uas,usb_storage

-- /etc/initramfs-tools/modules

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = no
do_bootloader = no
do_initrd = yes
link_in_boot = no

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
BOOT=local
DEVICE=
NFSROOT=auto

-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no

-- /sys/block
sda
sdb
sr0

-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:

/usr/share/initramfs-tools/hooks:
busybox
dmsetup
fuse
iscan_data
keymap
klibc
kmod
ntfs_3g
thermal
udev


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (501, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)