Re: [PATCH] driver-core: devtmpfs - driver core maintained /dev tmpfs

From: Kay Sievers
Date: Mon May 04 2009 - 15:14:22 EST


On Mon, May 4, 2009 at 20:55, Michael Riepe
<michael.riepe@xxxxxxxxxxxxxx> wrote:
>> Dynamic device numbers! A static /dev does not work at all for many
>> subsystems, not to mention the risk you take by talking to the wrong
>> device pointed to, by your incorrect static device nodes. It's not an
>> option at all today, and it will get much worse in the future.
>
> Maybe it's just me, but my devices end up being numbered the same after
> every reboot. Unless I add or remove devices to/from the system, of course.

Sure, that works fine for most things, and will continue to do so. But
there are entire subsystems in the kernel, mostly newer ones, which do
not have any static number assignment and require dynamic /dev
support.

It's not about /dev/null and /dev/tty and such, that will not change,
but there is already an option in the upstream kernel to assign
dynamic numbers to sd* disks to allow more than 15 partitions, and the
numbers of subsystem requiring dynamic numbers will likely grow.

The thing today is that userspace on distro systems messes around in
/dev and assigns access control lists to grant device-access to
specific users, udev creates many symlinks there to identify your
devices, because the kernel names get reordered, and nothing will ever
revert /dev to the state where it came from at boot.
So the wider support for a static /dev is kind of fading away,
stuff that works today statically will likely continue to work, but
all the new stuff will not work with a static /dev. That's one part of
what devtmpfs addresses.

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/