|| ||Linus Torvalds <torvalds-AT-linux-foundation.org> |
|| ||Kay Sievers <kay.sievers-AT-vrfy.org> |
|| ||Re: [bug] /etc/profile: line 30: /dev/null: Permission denied (Was:
Re: [PATCH] Remove broken by design and by implementation devtmpfs
maintenance disaster) |
|| ||Thu, 17 Sep 2009 13:26:01 -0700 (PDT)|
|| ||Ingo Molnar <mingo-AT-elte.hu>,
"Eric W. Biederman" <ebiederm-AT-xmission.com>,
Greg KH <greg-AT-kroah.com>, linux-kernel-AT-vger.kernel.org|
|| ||Article, Thread
On Thu, 17 Sep 2009, Kay Sievers wrote:
> On Thu, Sep 17, 2009 at 20:53, Ingo Molnar <firstname.lastname@example.org> wrote:
> > I've reproduced a bug with the following .config options:
> > Â CONFIG_DEVTMPFS=y
> > Â CONFIG_DEVTMPFS_MOUNT=y
> > /dev/null and /dev/zero are not read/writable to ordinary users,
> > breaking normal bootup and login:
> Udev should run long before some ordinary/non-root user can login, and
> apply the permissions as it always does. It's known to work on Fedora,
> SUSE, Ubuntu. What kind of system/environment/setup is that where you
> see this?
I don't know if this is what Ingo does, but I have a few machines where I
don't run the distro-supplied 'initrd' at all, because it's easier to boot
without it. The Fedora initrd doesn't allow me to sanely set root
filesystem parameters without totally rewriting the initrd image, which
I'm not interested in, for example (they'll take effect for the root
initrd, not the final root).
That may be "not supported", but the point is, we want to make the kernel
be as self-sufficient as possible, and the whole _point_ of this devtmpfs
seemed to be to increase self-sufficiency rather than decrease it by
requiring 'udev' to have run very very early.
If you have udev running really early, then what's the point of devtmpfs?
You might as well just have udev and tmpfs.
So I suspect /dev/null and /dev/zero should be special - just make them
have 0666 permissions. Because they really _are_ special, and no other
permissions ever make sense for them.
to post comments)