aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/namespace.c12
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/security.h12
-rw-r--r--security/capability.c4
-rw-r--r--security/security.c4
-rw-r--r--security/selinux/hooks.c4
-rw-r--r--security/smack/smack_lsm.c4
-rw-r--r--security/tomoyo/common.h2
-rw-r--r--security/tomoyo/mount.c5
-rw-r--r--security/tomoyo/tomoyo.c4
10 files changed, 27 insertions, 26 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 7bdf7907413f..fc33207e28ad 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1640,7 +1640,7 @@ static int do_change_type(struct path *path, int flag)
1640/* 1640/*
1641 * do loopback mount. 1641 * do loopback mount.
1642 */ 1642 */
1643static int do_loopback(struct path *path, char *old_name, 1643static int do_loopback(struct path *path, const char *old_name,
1644 int recurse) 1644 int recurse)
1645{ 1645{
1646 LIST_HEAD(umount_list); 1646 LIST_HEAD(umount_list);
@@ -1764,7 +1764,7 @@ static inline int tree_contains_unbindable(struct mount *mnt)
1764 return 0; 1764 return 0;
1765} 1765}
1766 1766
1767static int do_move_mount(struct path *path, char *old_name) 1767static int do_move_mount(struct path *path, const char *old_name)
1768{ 1768{
1769 struct path old_path, parent_path; 1769 struct path old_path, parent_path;
1770 struct mount *p; 1770 struct mount *p;
@@ -1917,8 +1917,8 @@ unlock:
1917 * create a new mount for userspace and request it to be added into the 1917 * create a new mount for userspace and request it to be added into the
1918 * namespace's tree 1918 * namespace's tree
1919 */ 1919 */
1920static int do_new_mount(struct path *path, char *type, int flags, 1920static int do_new_mount(struct path *path, const char *type, int flags,
1921 int mnt_flags, char *name, void *data) 1921 int mnt_flags, const char *name, void *data)
1922{ 1922{
1923 struct vfsmount *mnt; 1923 struct vfsmount *mnt;
1924 int err; 1924 int err;
@@ -2191,8 +2191,8 @@ int copy_mount_string(const void __user *data, char **where)
2191 * Therefore, if this magic number is present, it carries no information 2191 * Therefore, if this magic number is present, it carries no information
2192 * and must be discarded. 2192 * and must be discarded.
2193 */ 2193 */
2194long do_mount(char *dev_name, char *dir_name, char *type_page, 2194long do_mount(const char *dev_name, const char *dir_name,
2195 unsigned long flags, void *data_page) 2195 const char *type_page, unsigned long flags, void *data_page)
2196{ 2196{
2197 struct path path; 2197 struct path path;
2198 int retval = 0; 2198 int retval = 0;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ec911aeea968..9baf8270f9d1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2075,7 +2075,7 @@ extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
2075extern void kern_unmount(struct vfsmount *mnt); 2075extern void kern_unmount(struct vfsmount *mnt);
2076extern int may_umount_tree(struct vfsmount *); 2076extern int may_umount_tree(struct vfsmount *);
2077extern int may_umount(struct vfsmount *); 2077extern int may_umount(struct vfsmount *);
2078extern long do_mount(char *, char *, char *, unsigned long, void *); 2078extern long do_mount(const char *, const char *, const char *, unsigned long, void *);
2079extern struct vfsmount *collect_mounts(struct path *); 2079extern struct vfsmount *collect_mounts(struct path *);
2080extern void drop_collected_mounts(struct vfsmount *); 2080extern void drop_collected_mounts(struct vfsmount *);
2081extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, 2081extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
diff --git a/include/linux/security.h b/include/linux/security.h
index 5b50c4e1a7c2..05e88bdcf7d9 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -1411,8 +1411,8 @@ struct security_operations {
1411 int (*sb_kern_mount) (struct super_block *sb, int flags, void *data); 1411 int (*sb_kern_mount) (struct super_block *sb, int flags, void *data);
1412 int (*sb_show_options) (struct seq_file *m, struct super_block *sb); 1412 int (*sb_show_options) (struct seq_file *m, struct super_block *sb);
1413 int (*sb_statfs) (struct dentry *dentry); 1413 int (*sb_statfs) (struct dentry *dentry);
1414 int (*sb_mount) (char *dev_name, struct path *path, 1414 int (*sb_mount) (const char *dev_name, struct path *path,
1415 char *type, unsigned long flags, void *data); 1415 const char *type, unsigned long flags, void *data);
1416 int (*sb_umount) (struct vfsmount *mnt, int flags); 1416 int (*sb_umount) (struct vfsmount *mnt, int flags);
1417 int (*sb_pivotroot) (struct path *old_path, 1417 int (*sb_pivotroot) (struct path *old_path,
1418 struct path *new_path); 1418 struct path *new_path);
@@ -1694,8 +1694,8 @@ int security_sb_remount(struct super_block *sb, void *data);
1694int security_sb_kern_mount(struct super_block *sb, int flags, void *data); 1694int security_sb_kern_mount(struct super_block *sb, int flags, void *data);
1695int security_sb_show_options(struct seq_file *m, struct super_block *sb); 1695int security_sb_show_options(struct seq_file *m, struct super_block *sb);
1696int security_sb_statfs(struct dentry *dentry); 1696int security_sb_statfs(struct dentry *dentry);
1697int security_sb_mount(char *dev_name, struct path *path, 1697int security_sb_mount(const char *dev_name, struct path *path,
1698 char *type, unsigned long flags, void *data); 1698 const char *type, unsigned long flags, void *data);
1699int security_sb_umount(struct vfsmount *mnt, int flags); 1699int security_sb_umount(struct vfsmount *mnt, int flags);
1700int security_sb_pivotroot(struct path *old_path, struct path *new_path); 1700int security_sb_pivotroot(struct path *old_path, struct path *new_path);
1701int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); 1701int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts);
@@ -1964,8 +1964,8 @@ static inline int security_sb_statfs(struct dentry *dentry)
1964 return 0; 1964 return 0;
1965} 1965}
1966 1966
1967static inline int security_sb_mount(char *dev_name, struct path *path, 1967static inline int security_sb_mount(const char *dev_name, struct path *path,
1968 char *type, unsigned long flags, 1968 const char *type, unsigned long flags,
1969 void *data) 1969 void *data)
1970{ 1970{
1971 return 0; 1971 return 0;
diff --git a/security/capability.c b/security/capability.c
index a40aac677c72..b14a30c234b8 100644
--- a/security/capability.c
+++ b/security/capability.c
@@ -74,8 +74,8 @@ static int cap_sb_statfs(struct dentry *dentry)
74 return 0; 74 return 0;
75} 75}
76 76
77static int cap_sb_mount(char *dev_name, struct path *path, char *type, 77static int cap_sb_mount(const char *dev_name, struct path *path,
78 unsigned long flags, void *data) 78 const char *type, unsigned long flags, void *data)
79{ 79{
80 return 0; 80 return 0;
81} 81}
diff --git a/security/security.c b/security/security.c
index 3724029d0f6d..8dcd4ae10a5f 100644
--- a/security/security.c
+++ b/security/security.c
@@ -276,8 +276,8 @@ int security_sb_statfs(struct dentry *dentry)
276 return security_ops->sb_statfs(dentry); 276 return security_ops->sb_statfs(dentry);
277} 277}
278 278
279int security_sb_mount(char *dev_name, struct path *path, 279int security_sb_mount(const char *dev_name, struct path *path,
280 char *type, unsigned long flags, void *data) 280 const char *type, unsigned long flags, void *data)
281{ 281{
282 return security_ops->sb_mount(dev_name, path, type, flags, data); 282 return security_ops->sb_mount(dev_name, path, type, flags, data);
283} 283}
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 651d8456611a..24ab4148547c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2452,9 +2452,9 @@ static int selinux_sb_statfs(struct dentry *dentry)
2452 return superblock_has_perm(cred, dentry->d_sb, FILESYSTEM__GETATTR, &ad); 2452 return superblock_has_perm(cred, dentry->d_sb, FILESYSTEM__GETATTR, &ad);
2453} 2453}
2454 2454
2455static int selinux_mount(char *dev_name, 2455static int selinux_mount(const char *dev_name,
2456 struct path *path, 2456 struct path *path,
2457 char *type, 2457 const char *type,
2458 unsigned long flags, 2458 unsigned long flags,
2459 void *data) 2459 void *data)
2460{ 2460{
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 2874c7316783..38be92ce901e 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -408,8 +408,8 @@ static int smack_sb_statfs(struct dentry *dentry)
408 * Returns 0 if current can write the floor of the filesystem 408 * Returns 0 if current can write the floor of the filesystem
409 * being mounted on, an error code otherwise. 409 * being mounted on, an error code otherwise.
410 */ 410 */
411static int smack_sb_mount(char *dev_name, struct path *path, 411static int smack_sb_mount(const char *dev_name, struct path *path,
412 char *type, unsigned long flags, void *data) 412 const char *type, unsigned long flags, void *data)
413{ 413{
414 struct superblock_smack *sbp = path->dentry->d_sb->s_security; 414 struct superblock_smack *sbp = path->dentry->d_sb->s_security;
415 struct smk_audit_info ad; 415 struct smk_audit_info ad;
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h
index af010b62d544..d4f166bc3508 100644
--- a/security/tomoyo/common.h
+++ b/security/tomoyo/common.h
@@ -970,7 +970,7 @@ int tomoyo_init_request_info(struct tomoyo_request_info *r,
970 const u8 index); 970 const u8 index);
971int tomoyo_mkdev_perm(const u8 operation, struct path *path, 971int tomoyo_mkdev_perm(const u8 operation, struct path *path,
972 const unsigned int mode, unsigned int dev); 972 const unsigned int mode, unsigned int dev);
973int tomoyo_mount_permission(char *dev_name, struct path *path, 973int tomoyo_mount_permission(const char *dev_name, struct path *path,
974 const char *type, unsigned long flags, 974 const char *type, unsigned long flags,
975 void *data_page); 975 void *data_page);
976int tomoyo_open_control(const u8 type, struct file *file); 976int tomoyo_open_control(const u8 type, struct file *file);
diff --git a/security/tomoyo/mount.c b/security/tomoyo/mount.c
index fe00cdfd0267..390c646013cb 100644
--- a/security/tomoyo/mount.c
+++ b/security/tomoyo/mount.c
@@ -71,7 +71,8 @@ static bool tomoyo_check_mount_acl(struct tomoyo_request_info *r,
71 * 71 *
72 * Caller holds tomoyo_read_lock(). 72 * Caller holds tomoyo_read_lock().
73 */ 73 */
74static int tomoyo_mount_acl(struct tomoyo_request_info *r, char *dev_name, 74static int tomoyo_mount_acl(struct tomoyo_request_info *r,
75 const char *dev_name,
75 struct path *dir, const char *type, 76 struct path *dir, const char *type,
76 unsigned long flags) 77 unsigned long flags)
77{ 78{
@@ -183,7 +184,7 @@ static int tomoyo_mount_acl(struct tomoyo_request_info *r, char *dev_name,
183 * 184 *
184 * Returns 0 on success, negative value otherwise. 185 * Returns 0 on success, negative value otherwise.
185 */ 186 */
186int tomoyo_mount_permission(char *dev_name, struct path *path, 187int tomoyo_mount_permission(const char *dev_name, struct path *path,
187 const char *type, unsigned long flags, 188 const char *type, unsigned long flags,
188 void *data_page) 189 void *data_page)
189{ 190{
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
index d88eb3a046ed..a2ee362546ab 100644
--- a/security/tomoyo/tomoyo.c
+++ b/security/tomoyo/tomoyo.c
@@ -408,8 +408,8 @@ static int tomoyo_path_chroot(struct path *path)
408 * 408 *
409 * Returns 0 on success, negative value otherwise. 409 * Returns 0 on success, negative value otherwise.
410 */ 410 */
411static int tomoyo_sb_mount(char *dev_name, struct path *path, 411static int tomoyo_sb_mount(const char *dev_name, struct path *path,
412 char *type, unsigned long flags, void *data) 412 const char *type, unsigned long flags, void *data)
413{ 413{
414 return tomoyo_mount_permission(dev_name, path, type, flags, data); 414 return tomoyo_mount_permission(dev_name, path, type, flags, data);
415} 415}