1
0
Fork 0
remarkable-linux/fs/sysfs
Eric W. Biederman b5eb51f2ee mnt: Refactor the logic for mounting sysfs and proc in a user namespace
commit 1b852bceb0 upstream.

Fresh mounts of proc and sysfs are a very special case that works very
much like a bind mount.  Unfortunately the current structure can not
preserve the MNT_LOCK... mount flags.  Therefore refactor the logic
into a form that can be modified to preserve those lock bits.

Add a new filesystem flag FS_USERNS_VISIBLE that requires some mount
of the filesystem be fully visible in the current mount namespace,
before the filesystem may be mounted.

Move the logic for calling fs_fully_visible from proc and sysfs into
fs/namespace.c where it has greater access to mount namespace state.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-21 10:10:01 -07:00
..
Kconfig kernfs: add CONFIG_KERNFS 2014-02-07 16:08:57 -08:00
Makefile sysfs, kernfs: move inode code to fs/kernfs/inode.c 2013-11-29 17:55:10 -08:00
dir.c sysfs: Add support for permanently empty directories to serve as mount points. 2015-07-21 10:10:01 -07:00
file.c kernfs: remove KERNFS_STATIC_NAME 2015-02-13 21:21:36 -08:00
group.c sysfs: Only accept read/write permissions for file attributes 2015-03-25 13:27:57 +01:00
mount.c mnt: Refactor the logic for mounting sysfs and proc in a user namespace 2015-07-21 10:10:01 -07:00
symlink.c kernfs: s/sysfs/kernfs/ in constants 2013-12-11 17:39:20 -08:00
sysfs.h kernfs: s/sysfs_dirent/kernfs_node/ and rename its friends accordingly 2013-12-11 15:28:36 -08:00