Re: [PATCH] Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev

From: Alan Jenkins
Date: Wed Aug 05 2009 - 16:55:59 EST


On 8/5/09, Greg KH <greg@xxxxxxxxx> wrote:
> Here's the devtmpfs patch again. For .32 it's a simple and clean patch.
> It's been tested and agreed by three major distros that this is a good
> idea. SuSE has been shipping this in their kernels for a while now with
> no problems, and actual speedups measured on their boot times. Gentoo
> also has been testing it, but we haven't gotten a tested-by: line from
> them yet, hopefully that will happen soon.
>
> A number of embedded distros have also privately said they would be
> using this patch, I really don't understand why they don't publically
> want to state this, but oh well...
>
> It's been in linux-next for many months now, with no reported
> regressions at all as well.
>
> thanks,
>
> greg k-h
>
> --------------
>
>
> From: Kay Sievers <kay.sievers@xxxxxxxx>
>
> Devtmpfs lets the kernel create a tmpfs instance called devtmpfs
> very early at kernel initialization, before any driver-core device
> is registered. Every device with a major/minor will provide a
> device node in devtmpfs.
>
> Devtmpfs can be changed and altered by userspace at any time,
> and in any way needed - just like today's udev-mounted tmpfs.
> Unmodified udev versions will run just fine on top of it, and will
> recognize an already existing kernel-created device node and use it.
> The default node permissions are root:root 0600. Proper permissions
> and user/group ownership, meaningful symlinks, all other policy still
> needs to be applied by userspace.

> + err = vfs_path_lookup(dev_mnt->mnt_root, dev_mnt,
> + path, LOOKUP_PARENT, &nd);
> + if (err == 0) {
> + struct dentry *dentry;
> +
> + /* create directory right away */
> + dentry = lookup_create(&nd, 1);
> + if (!IS_ERR(dentry)) {
> + err = vfs_mkdir(nd.path.dentry->d_inode,
> + dentry, 0775);

Is there a typo here? I think the mode should be 0755. 0755 is used
below, and that does fit better with the 0600 mode for device nodes.

Thanks
Alan
--
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/