History

Merge branch 'mount.part1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs mount API prep from Al Viro: "Mount API prereqs. Mostly that's LSM mount options cleanups. There are several minor fixes in there, but nothing earth-shattering (leaks on failure exits, mostly)" * 'mount.part1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (27 commits) mount_fs: suppress MAC on MS_SUBMOUNT as well as MS_KERNMOUNT smack: rewrite smack_sb_eat_lsm_opts() smack: get rid of match_token() smack: take the guts of smack_parse_opts_str() into a new helper LSM: new method: ->sb_add_mnt_opt() selinux: rewrite selinux_sb_eat_lsm_opts() selinux: regularize Opt_... names a bit selinux: switch away from match_token() selinux: new helper - selinux_add_opt() LSM: bury struct security_mnt_opts smack: switch to private smack_mnt_opts selinux: switch to private struct selinux_mnt_opts LSM: hide struct security_mnt_opts from any generic code selinux: kill selinux_sb_get_mnt_opts() LSM: turn sb_eat_lsm_opts() into a method nfs_remount(): don't leak, don't ignore LSM options quietly btrfs: sanitize security_mnt_opts use selinux; don't open-code a loop in sb_finish_set_opts() LSM: split ->sb_set_mnt_opts() out of ->sb_kern_mount() new helper: security_sb_eat_lsm_opts() ...

Linus Torvalds committed 7 years ago

Commit 505b0502 parents 9b286ef 718c43028 files · +724 −1040Browse files

Showing the changes to include/uapi/linux (2 of 28 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/fs.h +5 −51
  2. include/uapi/linux/mount.h +58 −0
include/uapi/linux/fs.h+5−51
@@ -14,6 +14,11 @@ · 13 unmodified lines
1414 #include <linux/ioctl.h>
1515 #include <linux/types.h>
1616
17+/* Use of MS_* flags within the kernel is restricted to core mount(2) code. */
18+#if !defined(__KERNEL__)
19+#include <linux/mount.h>
20+#endif
21+
1722 /*
1823 * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
1924 * the file limit at runtime and only root can increase the per-process
@@ -101,57 +106,6 @@ struct inodes_stat_t { · 81 unmodified lines
101106
102107 #define NR_FILE 8192 /* this can well be larger on a larger system */
103108
104−
105−/*
106− * These are the fs-independent mount-flags: up to 32 flags are supported
107− */
108−#define MS_RDONLY 1 /* Mount read-only */
109−#define MS_NOSUID 2 /* Ignore suid and sgid bits */
110−#define MS_NODEV 4 /* Disallow access to device special files */
111−#define MS_NOEXEC 8 /* Disallow program execution */
112−#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
113−#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
114−#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
115−#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
116−#define MS_NOATIME 1024 /* Do not update access times. */
117−#define MS_NODIRATIME 2048 /* Do not update directory access times */
118−#define MS_BIND 4096
119−#define MS_MOVE 8192
120−#define MS_REC 16384
121−#define MS_VERBOSE 32768 /* War is peace. Verbosity is silence.
122− MS_VERBOSE is deprecated. */
123−#define MS_SILENT 32768
124−#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */
125−#define MS_UNBINDABLE (1<<17) /* change to unbindable */
126−#define MS_PRIVATE (1<<18) /* change to private */
127−#define MS_SLAVE (1<<19) /* change to slave */
128−#define MS_SHARED (1<<20) /* change to shared */
129−#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
130−#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
131−#define MS_I_VERSION (1<<23) /* Update inode I_version field */
132−#define MS_STRICTATIME (1<<24) /* Always perform atime updates */
133−#define MS_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */
134−
135−/* These sb flags are internal to the kernel */
136−#define MS_SUBMOUNT (1<<26)
137−#define MS_NOREMOTELOCK (1<<27)
138−#define MS_NOSEC (1<<28)
139−#define MS_BORN (1<<29)
140−#define MS_ACTIVE (1<<30)
141−#define MS_NOUSER (1<<31)
142−
143−/*
144− * Superblock flags that can be altered by MS_REMOUNT
145− */
146−#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION|\
147− MS_LAZYTIME)
148−
149−/*
150− * Old magic mount flag and mask
151− */
152−#define MS_MGC_VAL 0xC0ED0000
153−#define MS_MGC_MSK 0xffff0000
154−
155109 /*
156110 * Structure for FS_IOC_FSGETXATTR[A] and FS_IOC_FSSETXATTR.
157111 */
include/uapi/linux/mount.h+58−0
@@ -0,0 +1,58 @@
1+#ifndef _UAPI_LINUX_MOUNT_H
2+#define _UAPI_LINUX_MOUNT_H
3+
4+/*
5+ * These are the fs-independent mount-flags: up to 32 flags are supported
6+ *
7+ * Usage of these is restricted within the kernel to core mount(2) code and
8+ * callers of sys_mount() only. Filesystems should be using the SB_*
9+ * equivalent instead.
10+ */
11+#define MS_RDONLY 1 /* Mount read-only */
12+#define MS_NOSUID 2 /* Ignore suid and sgid bits */
13+#define MS_NODEV 4 /* Disallow access to device special files */
14+#define MS_NOEXEC 8 /* Disallow program execution */
15+#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
16+#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
17+#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
18+#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
19+#define MS_NOATIME 1024 /* Do not update access times. */
20+#define MS_NODIRATIME 2048 /* Do not update directory access times */
21+#define MS_BIND 4096
22+#define MS_MOVE 8192
23+#define MS_REC 16384
24+#define MS_VERBOSE 32768 /* War is peace. Verbosity is silence.
25+ MS_VERBOSE is deprecated. */
26+#define MS_SILENT 32768
27+#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */
28+#define MS_UNBINDABLE (1<<17) /* change to unbindable */
29+#define MS_PRIVATE (1<<18) /* change to private */
30+#define MS_SLAVE (1<<19) /* change to slave */
31+#define MS_SHARED (1<<20) /* change to shared */
32+#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
33+#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
34+#define MS_I_VERSION (1<<23) /* Update inode I_version field */
35+#define MS_STRICTATIME (1<<24) /* Always perform atime updates */
36+#define MS_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */
37+
38+/* These sb flags are internal to the kernel */
39+#define MS_SUBMOUNT (1<<26)
40+#define MS_NOREMOTELOCK (1<<27)
41+#define MS_NOSEC (1<<28)
42+#define MS_BORN (1<<29)
43+#define MS_ACTIVE (1<<30)
44+#define MS_NOUSER (1<<31)
45+
46+/*
47+ * Superblock flags that can be altered by MS_REMOUNT
48+ */
49+#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION|\
50+ MS_LAZYTIME)
51+
52+/*
53+ * Old magic mount flag and mask
54+ */
55+#define MS_MGC_VAL 0xC0ED0000
56+#define MS_MGC_MSK 0xffff0000
57+
58+#endif /* _UAPI_LINUX_MOUNT_H */