lookup() on non-directories.

From: Frank van Maarseveen
Date: Wed Sep 01 2004 - 12:01:25 EST


The reiserfs4 and openat() discussion made me thinking. This is different:

* /dev/hda1 -> /dev/hda/1
=> /dev/hda/1 causes a lookup in the partition table of /dev/hda

* /dev/hda/1/. is a "root inode lookup" in the superblock inside /dev/hda/1: no
explicit mount/umount but just the usual refcounting. File system type? the
kernel already knows about this stuff: needed for mounting the root-fs.
/dev/hda/1 need not be a special file.

* /usr/X11R6/bin/xterm/... ?
Kernel has some knowledge about ELF (fs/binfmt_*) so this could mean
something.

So what's the concept?

lookup() on files are just _interpretations_ of the file based on
knowledge the kernel already has. Interpretations might require
access( , X_OK) == 0 for sanity (in addition to R_OK and/or W_OK).

This way, user mounts/automounter would no longer be a requirement for
the user in order to get access to the usual things like USB storage,
CDROM, DVD, or images of those.

yes I know, this does not address the samba or reiserfs4 issues: openat()
name space now becomes orthogonal.

--
Frank
-
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/