kernel: provide ksys_*() wrappers for syscalls called by kernel/uid16.c
authorDominik Brodowski <linux@dominikbrodowski.net>
Mon, 19 Mar 2018 17:09:27 +0000 (18:09 +0100)
committerDominik Brodowski <linux@dominikbrodowski.net>
Mon, 2 Apr 2018 18:15:30 +0000 (20:15 +0200)
commite530dca584a9aa4aedf26adf0ed3c1c9b80e2767
tree2ca93ae3fa0684ec65da2d72084032b8a29c1cb0
parent6203deb0a76f35b6dc476fecb228c850099a1bc4
kernel: provide ksys_*() wrappers for syscalls called by kernel/uid16.c

Using these helpers allows us to avoid the in-kernel calls to these
syscalls: sys_setregid(), sys_setgid(), sys_setreuid(), sys_setuid(),
sys_setresuid(), sys_setresgid(), sys_setfsuid(), and sys_setfsgid().

The ksys_ prefix denotes that these function are meant as a drop-in
replacement for the syscall. In particular, they use the same calling
convention.

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: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
kernel/sys.c
kernel/uid16.c
kernel/uid16.h [new file with mode: 0644]