https://github.com/torvalds/linux
Revision cccaa5e33525fc07f4a2ce0518e50b9ddf435e47 authored by Dominik Brodowski on 23 October 2018, 20:41:09 UTC, committed by Dominik Brodowski on 12 December 2019, 13:50:05 UTC
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>
1 parent d4440aa
History
Tip revision: cccaa5e33525fc07f4a2ce0518e50b9ddf435e47 authored by Dominik Brodowski on 23 October 2018, 20:41:09 UTC
init: use do_mount() instead of ksys_mount()
Tip revision: cccaa5e
File Mode Size
kvm
lib
Makefile -rw-r--r-- 54 bytes

back to top