Udev in b6_0: to be or not to be

Alexander E. Patrakov see at the.sig
Tue Jun 1 09:10:25 PDT 2004


Currently, we have udev and hotplug both in HEAD and b6_0. Also we have 
this bug report: http://bugs.linuxfromscratch.org/show_bug.cgi?id=842 .

However the problem discussed in this bug report is very fundamental. 
The kernel assumes that userspace is always ready to handle the hotplug 
events. This assumption is not true for LFS. Today I received a message 
from my friend where he confirms that this assumption is not true for 
Debian.

The situation is bad because the problem is not LFS-specific and there 
is no upstream solution yet. We have to either solve the upstream 
problem ourselves (see below, this requires a kernel patch) or to drop 
udev and hotplug packages from the relatively-stable b6_0 branch, 
because they expose bad kernel design that leads to known bugs.

The proposed solution is to fix this broken assumption. The kernel 
should not call /sbin/hotplug at all if userspace is not ready. To 
achieve this, edit /usr/src/linux/kernel/kmod.c, line 50:

- char modprobe_path[256] = "/sbin/modprobe";
+ char modprobe_path[256] = "";

We should also tell the kernel that we are ready, in 
/etc/rc.d/init.d/hotplug script. To do that, add the following line at 
the beginning of the "start" commands:

echo "/sbin/hotplug" >/proc/sys/kernel/hotplug

I have at least 4 votes for that:

1) My own
2) Kevin P. Fleming, in linux-hotplug-devel
3) A. V. Galakhov (Debian user), in linux-hotplug-devel
4) Nathan Coulson, in private mail he said "Another Idea [mine, I think 
it's terrible]:  any way to disable the kernel finding /sbin/hotplug 
until we enable it?"

-- 
Alexander E. Patrakov
To get my address: echo '0!42!+/6 at 5-3.535.25' | tr [!-:] [a-z] | tr n .



More information about the lfs-dev mailing list