kexec: call do_kexec_load() in compat syscall directly
authorDominik Brodowski <linux@dominikbrodowski.net>
Sat, 17 Mar 2018 14:18:30 +0000 (15:18 +0100)
committerDominik Brodowski <linux@dominikbrodowski.net>
Mon, 2 Apr 2018 18:15:01 +0000 (20:15 +0200)
commit6b27aef09fea32b805a8c81287b1bb80362dadb0
treec7188fcb528eeb261b62bbbfebb5466881849c0a
parentd53238cd51a80f6f2e5b9d64830c62e2086787bd
kexec: call do_kexec_load() in compat syscall directly

do_kexec_load() can be called directly by compat_sys_kexec() as long as
the same parameters checks are completed which are currently handled
(also) by sys_kexec(). Therefore, move those to kexec_load_check(),
call that newly introduced helper function from both sys_kexec() and
compat_sys_kexec(), and duplicate the remaining code from sys_kexec()
in compat_sys_kexec().

This patch is part of a series which removes in-kernel calls to syscalls.
On this basis, the syscall entry path can be streamlined. For details, see
http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

Cc: Eric Biederman <ebiederm@xmission.com>
Cc: kexec@lists.infradead.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
kernel/kexec.c