diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-03-20 19:36:46 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-04-02 20:15:43 +0200 |
commit | 570484bfe813fa67da003077898a7046767cb4d1 (patch) | |
tree | 31ba785143b4d703cc6261360bc2b31fe252a24c /fs/signalfd.c | |
parent | fs: add do_compat_select() helper; remove in-kernel call to compat syscall (diff) | |
download | linux-570484bfe813fa67da003077898a7046767cb4d1.tar.xz linux-570484bfe813fa67da003077898a7046767cb4d1.zip |
fs: add do_compat_signalfd4() helper; remove in-kernel call to compat syscall
Using the fs-internal do_compat_signalfd4() helper allows us to get rid of
the fs-internal call to the compat_sys_signalfd4() syscall.
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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'fs/signalfd.c')
-rw-r--r-- | fs/signalfd.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c index 501c41f3351f..d2187a813376 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c @@ -323,10 +323,9 @@ SYSCALL_DEFINE3(signalfd, int, ufd, sigset_t __user *, user_mask, } #ifdef CONFIG_COMPAT -COMPAT_SYSCALL_DEFINE4(signalfd4, int, ufd, - const compat_sigset_t __user *,sigmask, - compat_size_t, sigsetsize, - int, flags) +static long do_compat_signalfd4(int ufd, + const compat_sigset_t __user *sigmask, + compat_size_t sigsetsize, int flags) { sigset_t tmp; sigset_t __user *ksigmask; @@ -342,10 +341,18 @@ COMPAT_SYSCALL_DEFINE4(signalfd4, int, ufd, return do_signalfd4(ufd, ksigmask, sizeof(sigset_t), flags); } +COMPAT_SYSCALL_DEFINE4(signalfd4, int, ufd, + const compat_sigset_t __user *, sigmask, + compat_size_t, sigsetsize, + int, flags) +{ + return do_compat_signalfd4(ufd, sigmask, sigsetsize, flags); +} + COMPAT_SYSCALL_DEFINE3(signalfd, int, ufd, const compat_sigset_t __user *,sigmask, compat_size_t, sigsetsize) { - return compat_sys_signalfd4(ufd, sigmask, sigsetsize, 0); + return do_compat_signalfd4(ufd, sigmask, sigsetsize, 0); } #endif |