aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-10-23 22:41:09 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2019-12-12 14:50:05 +0100
commitcccaa5e33525fc07f4a2ce0518e50b9ddf435e47 (patch)
tree841730eb8a627568c8d8b75eef0621c4cf3d900d /include
parentinitrd: use do_mount() instead of ksys_mount() (diff)
downloadlinux-dev-cccaa5e33525fc07f4a2ce0518e50b9ddf435e47.tar.xz
linux-dev-cccaa5e33525fc07f4a2ce0518e50b9ddf435e47.zip
init: use do_mount() instead of ksys_mount()
In prepare_namespace(), do_mount() can be used instead of ksys_mount() as the first and third argument are const strings in the kernel, the second and fourth argument are passed through anyway, and the fifth argument is NULL. In do_mount_root(), ksys_mount() is called with the first and third argument being already kernelspace strings, which do not need to be copied over from userspace to kernelspace (again). The second and fourth arguments are passed through to do_mount() anyway. The fifth argument, while already residing in kernelspace, needs to be put into a page of its own. Then, do_mount() can be used instead of ksys_mount(). Once this is done, there are no in-kernel users to ksys_mount() left, which can therefore be removed. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/syscalls.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index d0391cc2dae9..5262b7a76d39 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -1231,8 +1231,6 @@ asmlinkage long sys_ni_syscall(void);
* the ksys_xyzyyz() functions prototyped below.
*/
-int ksys_mount(const char __user *dev_name, const char __user *dir_name,
- const char __user *type, unsigned long flags, void __user *data);
int ksys_umount(char __user *name, int flags);
int ksys_dup(unsigned int fildes);
int ksys_chroot(const char __user *filename);