forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/[email protected] Cc: Al Viro <[email protected]> Cc: Eric W. Biederman <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Dominik Brodowski <[email protected]>
- Loading branch information
Dominik Brodowski
committed
Apr 2, 2018
1 parent
6203deb
commit e530dca
Showing
3 changed files
with
74 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef LINUX_UID16_H | ||
#define LINUX_UID16_H | ||
|
||
long __sys_setuid(uid_t uid); | ||
long __sys_setgid(gid_t gid); | ||
long __sys_setreuid(uid_t ruid, uid_t euid); | ||
long __sys_setregid(gid_t rgid, gid_t egid); | ||
long __sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); | ||
long __sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); | ||
long __sys_setfsuid(uid_t uid); | ||
long __sys_setfsgid(gid_t gid); | ||
|
||
#endif /* LINUX_UID16_H */ |