[PATCH 031/109] ipc: add semget syscall wrapper

2018-03-29 Thread Dominik Brodowski
to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- ipc/sem.c | 7 ++- ipc/syscall.c | 4 ++-- ipc/util.h

[PATCH 066/109] fs: add ksys_mount() helper; remove in-kernel calls to sys_mount()

2018-03-29 Thread Dominik Brodowski
-off-by: Dominik Brodowski --- drivers/base/devtmpfs.c | 5 +++-- fs/namespace.c | 10 -- include/linux/syscalls.h | 3 +++ init/do_mounts.c | 4 ++-- init/do_mounts_initrd.c | 6 +++--- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/base

[PATCH 069/109] fs: add ksys_chroot() helper; remove-in kernel calls to sys_chroot()

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- drivers/base/devtmpfs.c | 2 +- fs/open.c| 7 ++- include/linux/syscalls.h | 1 + init/do_mounts.c | 2 +- init/do_mounts_initrd.c | 4 ++-- 5 files

[PATCH 060/109] fs: add do_compat_signalfd4() helper; remove in-kernel call to compat syscall

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/signalfd.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/fs/signalfd.c b/fs/signalfd.c index 501c41f3351f..d2187a813376

[PATCH 088/109] fs: add ksys_read() helper; remove in-kernel calls to sys_read()

2018-03-29 Thread Dominik Brodowski
-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- arch/s390/kernel/compat_linux.c | 2 +- fs/read_write.c

[PATCH 029/109] net: socket: add __compat_sys_...msg() helpers; remove in-kernel calls to compat syscalls

2018-03-29 Thread Dominik Brodowski
can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- net/compat.c | 37 ++--- 1 file changed, 30 insertions(+), 7 deletions

[PATCH 091/109] kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid()

2018-03-29 Thread Dominik Brodowski
-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Signed-off-by: Dominik Brodowski --- include/linux/syscalls.h | 1 + init/do_mounts_initrd.c | 2 +- kernel

[PATCH 104/109] net: remove compat_sys_*() prototypes from net/compat.h

2018-03-29 Thread Dominik Brodowski
As the syscall functions should only be called from the system call table but not from elsewhere in the kernel, it is sufficient that they are defined in linux/compat.h. Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- include/net/compat.h | 11 --- 1

[PATCH 100/109] x86: fix sys_sigreturn() return type to be long, not unsigned long

2018-03-29 Thread Dominik Brodowski
Tautschnig Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski --- arch/x86/include/asm/syscalls.h | 2 +- arch/x86/kernel/signal.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index

[PATCH 083/109] fs: add ksys_close() wrapper; remove in-kernel calls to sys_close()

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/autofs4/dev-ioctl.c | 2 +- fs/binfmt_misc.c | 2 +- fs/file.c| 1 + fs/open.c| 1 - include/linux

[PATCH 093/109] fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate()

2018-03-29 Thread Dominik Brodowski
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.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- arch/mips/kernel/linux32.c

[PATCH 042/109] kernel: provide ksys_*() wrappers for syscalls called by kernel/uid16.c

2018-03-29 Thread Dominik Brodowski
Cc: Eric W. Biederman Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- kernel/sys.c | 58 ++ kernel/uid16.c | 19 ++- kernel/uid16.h | 14 ++ 3 files changed, 74 insertions(+), 17 deletions(-) create

[PATCH 108/109] kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions

2018-03-29 Thread Dominik Brodowski
This keeps it in line with the SYSCALL_DEFINEx() / COMPAT_SYSCALL_DEFINEx() calling convention. Signed-off-by: Dominik Brodowski --- Documentation/process/adding-syscalls.rst | 2 +- kernel/sys_ni.c | 433 +++--- 2 files changed, 219

[PATCH 079/109] fs: add ksys_fchmod() and do_fchmodat() helpers and ksys_chmod() wrapper; remove in-kernel calls to syscall

2018-03-29 Thread Dominik Brodowski
, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 2 ++ fs/open.c| 17 ++--- include/linux/syscalls.h | 8 init/initramfs.c

[PATCH 043/109] sched: add do_sched_yield() helper; remove in-kernel call to sched_yield()

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Dominik Brodowski --- kernel/sched/core.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e7c535eee0a6

[PATCH 037/109] ipc: add msgctl syscall/compat_syscall wrappers

2018-03-29 Thread Dominik Brodowski
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.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- ipc/msg.c

[PATCH 081/109] fs: add do_fchownat(), ksys_fchown() helpers and ksys_{,l}chown() wrappers

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- arch/s390/kernel/compat_linux.c | 6 +++--- fs/internal.h | 2 ++ fs/open.c | 23 +-- include/linux

[PATCH 087/109] fs: add ksys_lseek() helper; remove in-kernel calls to sys_lseek()

2018-03-29 Thread Dominik Brodowski
-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/read_write.c | 9 +++-- include/linux/syscalls.h

[PATCH 049/109] fs: add do_pipe2() helper; remove internal call to sys_pipe2()

2018-03-29 Thread Dominik Brodowski
Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/pipe.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 7b1954caf388..39d6f431da83 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -841,7 +841,7 @@ int do_pipe_flags(int *fd, int flags

[PATCH 065/109] fs/quota: use COMPAT_SYSCALL_DEFINE for sys32_quotactl()

2018-03-29 Thread Dominik Brodowski
While sys32_quotactl() is only needed on x86, it can use the recommended COMPAT_SYSCALL_DEFINEx() machinery for its setup. Acked-by: Jan Kara Cc: Christoph Hellwig Signed-off-by: Dominik Brodowski --- arch/x86/entry/syscalls/syscall_32.tbl | 2 +- fs/quota/compat.c | 5

[PATCH 054/109] fs: add do_eventfd() helper; remove internal call to sys_eventfd()

2018-03-29 Thread Dominik Brodowski
Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/eventfd.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 012f5bd46dfa..08d3bd602f73 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -380,7 +380,7 @@ struct eventfd_ctx

[PATCH 012/109] net: socket: add __sys_bind() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- include/linux/socket.h | 1 + net/compat.c | 2 +- net/socket.c | 9 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/linux

[PATCH 034/109] ipc: add shmget syscall wrapper

2018-03-29 Thread Dominik Brodowski
to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- ipc/shm.c | 7 ++- ipc/syscall.c | 4 ++-- ipc/util.h

[PATCH 007/109] x86: remove compat_sys_x86_waitpid()

2018-03-29 Thread Dominik Brodowski
compat_sys_x86_waitpid() is not needed, as it takes the same parameters (int, *int, int) as the native syscall. Suggested-by: Al Viro Cc: Ingo Molnar Cc: Jiri Slaby Cc: x...@kernel.org Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski --- arch/x86/entry/syscalls/syscall_32.tbl

[PATCH 102/109] kexec: move sys_kexec_load() prototype to syscalls.h

2018-03-29 Thread Dominik Brodowski
As the syscall function should only be called from the system call table but not from elsewhere in the kernel, move the prototype for sys_kexec_load() to include/syscall.h. Cc: Eric Biederman Cc: ke...@lists.infradead.org Signed-off-by: Dominik Brodowski --- include/linux/kexec.h| 4

[PATCH 001/109] syscalls: define and explain goal to not call syscalls in the kernel

2018-03-29 Thread Dominik Brodowski
which currently need to pretend to be userspace in order to make use of syscalls. Signed-off-by: Dominik Brodowski --- Documentation/process/adding-syscalls.rst | 32 +++ include/linux/syscalls.h | 7 +++ 2 files changed, 39 insertions(+) diff --git

[PATCH 025/109] net: socket: add __compat_sys_recvfrom() helper; remove in-kernel call to compat syscall

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- net/compat.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/net/compat.c b/net/compat.c index 9e0d030063ad

[PATCH 045/109] mm: add kernel_move_pages() helper, move compat syscall to mm/migrate.c

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: linux...@kvack.org Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- kernel/compat.c | 22 -- mm/migrate.c| 39 +++ 2 files changed, 35 insertions

[PATCH 056/109] fs: add do_vmsplice() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/splice.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/splice.c b/fs/splice.c index 39e2dc01ac12..005d09cf3fa8 100644 --- a/fs/splice.c +++ b

[PATCH 075/109] fs: add do_mkdirat() helper and ksys_mkdir() wrapper; remove in-kernel calls to syscall

2018-03-29 Thread Dominik Brodowski
...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 1 + fs/namei.c | 9 +++-- include/linux/syscalls.h | 7 +++ init/do_mounts_initrd.c | 2 +- init/initramfs.c | 2 +- init/noinitramfs.c | 4 ++-- 6 files

[PATCH 064/109] fs/quota: add kernel_quotactl() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Acked-by: Jan Kara Signed-off-by: Dominik Brodowski --- fs/quota/compat.c| 8 fs/quota/quota.c | 10 -- include/linux/quotaops.h | 3 +++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/fs/quota

[PATCH 067/109] fs: add ksys_umount() helper; remove in-kernel call to sys_umount()

2018-03-29 Thread Dominik Brodowski
/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/namespace.c | 9 +++-- include/linux/syscalls.h | 1 + init/do_mounts_initrd.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/namespace.c b/fs

[PATCH 062/109] inotify: add do_inotify_init() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Acked-by: Jan Kara Cc: Amir Goldstein Cc: linux-fsde...@vger.kernel.org Signed-off-by: Dominik Brodowski --- fs/notify/inotify/inotify_user.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/notify/inotify

[PATCH 004/109] kexec: call do_kexec_load() in compat syscall directly

2018-03-29 Thread Dominik Brodowski
Cc: Eric Biederman Cc: ke...@lists.infradead.org Signed-off-by: Dominik Brodowski --- kernel/kexec.c | 52 +++- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/kernel/kexec.c b/kernel/kexec.c index e62ec4dc6620..aed8fb2564b3 100644

[PATCH 027/109] net: socket: add __compat_sys_getsockopt() helper; remove in-kernel call to compat syscall

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- net/compat.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/net/compat.c b/net/compat.c index 75bfcbbb2e3e

[PATCH 005/109] mm: use do_futex() instead of sys_futex() in mm_release()

2018-03-29 Thread Dominik Brodowski
Signed-off-by: Dominik Brodowski --- include/linux/futex.h | 13 ++--- kernel/fork.c | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/include/linux/futex.h b/include/linux/futex.h index c0fb9a24bbd2..821ae502d3d8 100644 --- a/include/linux/futex.h +++ b

[PATCH 039/109] ipc: add msgsnd syscall/compat_syscall wrappers

2018-03-29 Thread Dominik Brodowski
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.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- ipc/msg.c

[PATCH 047/109] mm: add kernel_[sg]et_mempolicy() helpers; remove in-kernel calls to syscalls

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: linux...@kvack.org Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- mm/mempolicy.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/mm/mempolicy.c b/mm

[PATCH 077/109] fs: add do_mknodat() helper and ksys_mknod() wrapper; remove in-kernel calls to syscall

2018-03-29 Thread Dominik Brodowski
...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 2 ++ fs/namei.c | 12 +--- include/linux/syscalls.h | 9 + init/do_mounts.h | 2 +- init/initramfs.c | 2 +- init/noinitramfs.c | 2 +- 6

[PATCH 095/109] fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate()

2018-03-29 Thread Dominik Brodowski
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.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- arch/mips/kernel/linux32.c

[PATCH 089/109] fs: add ksys_sync() helper; remove in-kernel calls to sys_sync()

2018-03-29 Thread Dominik Brodowski
-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- arch/sparc/kernel/setup_32.c | 2 +- drivers/tty/sysrq.c

[PATCH 058/109] fs: add do_compat_fcntl64() helper; remove in-kernel call to compat syscall

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/fcntl.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index 1e97f1fda90c..d737ff082472 100644 --- a/fs

[PATCH 006/109] x86: use _do_fork() in compat_sys_x86_clone()

2018-03-29 Thread Dominik Brodowski
...@light.dominikbrodowski.net Cc: Ingo Molnar Cc: Jiri Slaby Cc: x...@kernel.org Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski --- arch/x86/ia32/sys_ia32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c

[PATCH 063/109] fanotify: add do_fanotify_mark() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Acked-by: Jan Kara Cc: Amir Goldstein Cc: linux-fsde...@vger.kernel.org Signed-off-by: Dominik Brodowski --- fs/notify/fanotify/fanotify_user.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/notify

[PATCH 010/109] net: socket: add __sys_accept4() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- include/linux/socket.h | 2 ++ net/compat.c | 4 ++-- net/socket.c | 20 +--- 3 files changed, 17 insertions(+), 9 deletions(-) diff

[PATCH 085/109] fs: add ksys_getdents64() helper; remove in-kernel calls to sys_getdents64()

2018-03-29 Thread Dominik Brodowski
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.ga17...@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/readdir.c | 11 +-- include/linux

[PATCH 015/109] net: socket: add __sys_getsockname() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- include/linux/socket.h | 2 ++ net/compat.c | 2 +- net/socket.c | 14 ++ 3 files changed, 13 insertions(+), 5 deletions(-) diff

[PATCH 021/109] net: socket: add do_sys_recvmmsg() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- net/socket.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/net/socket.c b/net/socket.c index a05289b1f863..54d19b0edab1

[PATCH 059/109] fs: add do_compat_select() helper; remove in-kernel call to compat syscall

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/select.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/fs/select.c b/fs/select.c index b5df01c4587d..ba879c51288f 100644 --- a

[PATCH 046/109] mm: add kernel_mbind() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: linux...@kvack.org Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- mm/mempolicy.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 7399ede02b5f

[PATCH 019/109] net: socket: add __sys_setsockopt() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- include/linux/socket.h | 1 + net/socket.c | 13 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/linux/socket.h b

[PATCH 070/109] fs: add ksys_write() helper; remove in-kernel calls to sys_write()

2018-03-29 Thread Dominik Brodowski
...@light.dominikbrodowski.net Cc: Alexander Viro Cc: linux-s...@vger.kernel.org Signed-off-by: Dominik Brodowski --- arch/s390/kernel/compat_linux.c | 2 +- fs/read_write.c | 9 +++-- include/linux/syscalls.h| 1 + init/do_mounts_rd.c | 4 ++-- init/initramfs.c

[PATCH 071/109] fs: add ksys_chdir() helper; remove in-kernel calls to sys_chdir()

2018-03-29 Thread Dominik Brodowski
-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- drivers/base/devtmpfs.c | 2 +- fs/open.c

[PATCH 086/109] fs: add ksys_ioctl() helper; remove in-kernel calls to sys_ioctl()

2018-03-29 Thread Dominik Brodowski
Signed-off-by: Dominik Brodowski --- fs/ioctl.c | 7 ++- include/linux/syscalls.h | 1 + init/do_mounts.c | 8 init/do_mounts_initrd.c | 2 +- init/do_mounts_md.c | 15 --- init/do_mounts_rd.c | 4 ++-- 6 files changed, 22 insertions(+), 15

[PATCH 052/109] fs: add do_epoll_*() helpers; remove internal calls to sys_epoll_*()

2018-03-29 Thread Dominik Brodowski
://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/eventpoll.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 0f3494ed3ed0..602ca4285b2e

[PATCH 072/109] fs: add ksys_unlink() wrapper; remove in-kernel calls to sys_unlink()

2018-03-29 Thread Dominik Brodowski
...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- include/linux/syscalls.h | 11 +++ init/do_mounts.h | 2 +- init/do_mounts_initrd.c | 4 ++-- init/do_mounts_rd.c | 2 +- init/initramfs.c | 4 ++-- 5 files changed

[PATCH 050/109] fs: add do_renameat2() helper; remove internal call to sys_renameat2()

2018-03-29 Thread Dominik Brodowski
Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/namei.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 921ae32dbc80..524e829ffc7d 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -4478,8 +4478,8 @@ int vfs_rename(struct

[PATCH 008/109] net: socket: add __sys_recvfrom() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- include/linux/socket.h | 6 ++ net/compat.c | 3 ++- net/socket.c | 21 + 3 files changed, 21 insertions(+), 9 deletions

[PATCH 053/109] fs: add do_signalfd4() helper; remove internal calls to sys_signalfd4()

2018-03-29 Thread Dominik Brodowski
...@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/signalfd.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/signalfd.c b/fs/signalfd.c index 76bf9cc62074..501c41f3351f 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c @@ -256,8 +256,8

[PATCH 073/109] hostfs: rename do_rmdir() to hostfs_do_rmdir()

2018-03-29 Thread Dominik Brodowski
do_rmdir() is used in the VFS layer at fs/namei.c, so use a different name in hostfs. Cc: Jeff Dike Cc: user-mode-linux-de...@lists.sourceforge.net Acked-by: Richard Weinberger Signed-off-by: Dominik Brodowski --- fs/hostfs/hostfs.h | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hostfs

[PATCH 098/109] mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead()

2018-03-29 Thread Dominik Brodowski
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.ga17...@light.dominikbrodowski.net Cc: Andrew Morton Cc: linux...@kvack.org Signed-off-by: Dominik Brodowski --- arch/mips/kernel/linux32.c | 2

[PATCH 022/109] net: socket: move check for forbid_cmsg_compat to __sys_...msg()

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- include/linux/socket.h | 13 + net/compat.c | 8 +--- net/socket.c | 38 +++--- 3 files

[PATCH 109/109] bpf: whitelist all syscalls for error injection

2018-03-29 Thread Dominik Brodowski
and COMPAT_SYSCALL_DEFINE for error injection. These changes are not intended to be considered stable, and would normally be configured off. Signed-off-by: Howard McLauchlan Signed-off-by: Dominik Brodowski --- include/linux/compat.h | 3 +++ include/linux/syscalls.h | 3 +++ 2 files changed,

[PATCH 000/109] remove in-kernel calls to syscalls

2018-03-29 Thread Dominik Brodowski
[ While most parts of this patch set have been sent out already at least once, I send out *all* patches to lkml once again as this whole series touches several different subsystems in sensitive areas. ] System calls are interaction points between userspace and the kernel. Therefore, system cal

[PATCH 020/109] net: socket: add __sys_getsockopt() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- net/socket.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/net/socket.c b/net/socket.c index 5dd2e39a6cd4..a05289b1f863 100644

[PATCH 099/109] x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm()

2018-03-29 Thread Dominik Brodowski
-by: Dominik Brodowski --- arch/x86/include/asm/syscalls.h | 1 + arch/x86/kernel/ioport.c| 7 ++- drivers/tty/vt/vt_ioctl.c | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index

[PATCH 084/109] fs: add ksys_open() wrapper; remove in-kernel calls to sys_open()

2018-03-29 Thread Dominik Brodowski
-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/open.c| 2 +- include/linux

[PATCH 107/109] kernel/sys_ni: sort cond_syscall() entries

2018-03-29 Thread Dominik Brodowski
-off-by: Dominik Brodowski --- kernel/sys_ni.c | 506 +--- 1 file changed, 332 insertions(+), 174 deletions(-) diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 951dbda5c2b4..0c1538f5a559 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c

[PATCH 017/109] net: socket: add __sys_socketpair() helper; remove in-kernel call to syscall

2018-03-29 Thread Dominik Brodowski
/20180325162527.ga17...@light.dominikbrodowski.net Cc: David S. Miller Cc: net...@vger.kernel.org Signed-off-by: Dominik Brodowski --- include/linux/socket.h | 2 ++ net/compat.c | 2 +- net/socket.c | 11 --- 3 files changed, 11 insertions(+), 4 deletions(-) diff

[PATCH 105/109] syscalls: sort syscall prototypes in include/linux/compat.h

2018-03-29 Thread Dominik Brodowski
exception to this, add the prefix "asmlinkage" where it was missing. Cc: Arnd Bergmann Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- include/linux/compat.h | 655 - 1 file changed, 378 insertions(+), 277 deletions(-) diff --git

[PATCH 074/109] fs: add ksys_rmdir() wrapper; remove in-kernel calls to sys_rmdir()

2018-03-29 Thread Dominik Brodowski
-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 1 + fs/namei.c

[PATCH 092/109] fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall

2018-03-29 Thread Dominik Brodowski
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.ga17...@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- arch/mips/kernel/linux32.c

[PATCH 101/109] x86/sigreturn: use SYSCALL_DEFINE0

2018-03-29 Thread Dominik Brodowski
een Cc: x...@kernel.org Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski --- arch/x86/kernel/signal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 83a26726b689..da270b95fe4d 100644 --- a/arch/x86/kernel/sign

Re: [PATCH 000/109] remove in-kernel calls to syscalls

2018-03-29 Thread Dominik Brodowski
On Thu, Mar 29, 2018 at 07:20:27AM -0700, Matthew Wilcox wrote: > On Thu, Mar 29, 2018 at 01:22:37PM +0200, Dominik Brodowski wrote: > > At least on 64-bit x86, it will likely be a hard requirement from v4.17 > > onwards to not call system call functions in the kernel: It is better

Re: [PATCH 000/109] remove in-kernel calls to syscalls

2018-03-29 Thread Dominik Brodowski
On Thu, Mar 29, 2018 at 02:46:44PM +, David Laight wrote: > From: Dominik Brodowski > > Sent: 29 March 2018 15:42 > > On Thu, Mar 29, 2018 at 07:20:27AM -0700, Matthew Wilcox wrote: > > > On Thu, Mar 29, 2018 at 01:22:37PM +0200, Dominik Brodowski wrote: > > >

Re: [PATCH 13/18] kernel: add kcompat_sys_{f,}statfs64()

2018-05-15 Thread Dominik Brodowski
On Tue, May 15, 2018 at 10:53:51AM +0100, Mark Rutland wrote: > On Mon, May 14, 2018 at 10:34:14PM +0200, Dominik Brodowski wrote: > > On Mon, May 14, 2018 at 06:14:28PM +0100, Mark Rutland wrote: > > > On Mon, May 14, 2018 at 10:46:35AM +0100, Mark Rutland wrote: > > &

Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-15 Thread Dominik Brodowski
On Tue, May 15, 2018 at 09:22:23AM +0100, Mark Rutland wrote: > On Mon, May 14, 2018 at 10:24:45PM +0200, Dominik Brodowski wrote: > > On Mon, May 14, 2018 at 12:41:10PM +0100, Mark Rutland wrote: > > > I agree it would be nicer if it had a wrapper that took a pt_regs, eve

Re: [PATCH] drivers: pcmcia: This patch fix the following checkpatch warning.

2019-04-17 Thread Dominik Brodowski
On Tue, Apr 16, 2019 at 08:45:44PM +0300, Mohan Kumar wrote: > Switch hardcoded function name with a reference to __func__ making the > code more maintainable Thanks for your patch. Are there any other patches pending to this driver? As noted in Kconfig, the TCIC host briges "are only found on a

fs_context-related oops in mainline

2019-03-15 Thread Dominik Brodowski
David, Al, commit 23bf1b6be9c2 ("kernfs, sysfs, cgroup, intel_rdt: Support fs_context") seems to have introduced a bug; at least that's the commit I bisected the following oops down to: [0.827317] BUG: unable to handle kernel NULL pointer dereference at 0220 [0.829771] #PF er

Re: fs_context-related oops in mainline

2019-03-15 Thread Dominik Brodowski
On Fri, Mar 15, 2019 at 11:34:47AM +, Al Viro wrote: > On Fri, Mar 15, 2019 at 08:43:07AM +0100, Dominik Brodowski wrote: > > David, Al, > > > > commit 23bf1b6be9c2 ("kernfs, sysfs, cgroup, intel_rdt: Support fs_context") > > seems to have introduce

Re: fs_context-related oops in mainline

2019-03-15 Thread Dominik Brodowski
On Fri, Mar 15, 2019 at 11:44:45AM +, David Howells wrote: > Dominik Brodowski wrote: > > > [0.839322] RIP: 0010:sysfs_init_fs_context+0x82/0xd0 > > Could you load your kernel into gdb and then do: > > i li *sysfs_init_fs_context+0x82 Doesn't seem n

Re: fs_context-related oops in mainline

2019-03-15 Thread Dominik Brodowski
On Fri, Mar 15, 2019 at 12:18:13PM +, Al Viro wrote: > On Fri, Mar 15, 2019 at 12:50:02PM +0100, Dominik Brodowski wrote: > > On Fri, Mar 15, 2019 at 11:44:45AM +, David Howells wrote: > > > Dominik Brodowski wrote: > > > > > > > [0.839322] RI

Re: [PATCH] pcmcia: Switch to using the new API kobj_to_dev()

2021-02-23 Thread Dominik Brodowski
Am Tue, Feb 23, 2021 at 05:26:50PM +0800 schrieb Yang Li: > fixed the following coccicheck: > ./drivers/pcmcia/cistpl.c:1584:53-54: WARNING opportunity for > kobj_to_dev() > > Reported-by: Abaci Robot > Signed-off-by: Yang Li Sorry, an equivalent patch is already in pcmcia-next and about to be

Re: [PATCH 1/2] docs: Make syscalls' helpers naming consistent

2021-01-30 Thread Dominik Brodowski
_xyzzy()`, and so are all the helpers declared bellow it. Change the > documentation to reflect this. > > Cc: Dominik Brodowski > Fixes: 819671ff849b ("syscalls: define and explain goal to not call syscalls > in the kernel") > Signed-off-by: André Almeida Reviewed-by: Dominik Brodowski Thanks, Dominik

Re: [PATCH] cpufreq: Remove CPUFREQ_STICKY flag

2021-02-01 Thread Dominik Brodowski
Viresh, Am Mon, Feb 01, 2021 at 01:35:51PM +0530 schrieb Viresh Kumar: > The removal of such a driver is avoided if the driver carries the > CPUFREQ_STICKY flag. This was added way back [1] in 2004 and perhaps no > one should ever need it now. A lot of driver do set this flag, probably > because t

[GIT PULL] pcmcia updates for v5.12

2021-02-25 Thread Dominik Brodowski
Linus, A lone PCMCIA change since commit e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62: Linux 5.11-rc2 (2021-01-03 15:55:30 -0800) is available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git pcmcia-next for you to fetch changes up to 4ce6b242b78d355ba8

Re: [PATCH] init: fix msleep() is not accurate

2020-12-10 Thread Dominik Brodowski
Am Fri, Dec 11, 2020 at 11:24:12AM +0800 schrieb Yejune Deng: > See Documentation/timers/timers-howto.rst, msleep() is not > for (1ms - 20ms),use usleep_range() instead. While technically correct, this branch is only taken if the "rootwait" kernel parameter is passed -- and as the kernel is loopin

Re: [PATCH] pcmcia: Remove NEC VRC4173 CARDU

2020-12-05 Thread Dominik Brodowski
Am Wed, Sep 16, 2020 at 10:16:29AM +0200 schrieb Sebastian Andrzej Siewior: > This driver is the very definition of bitrotting: > - Introduced in commit > 79a140932c776 ("[PATCH] mips: vR41xx updates") > which is 2.6.11-rc3. > > - Provides ->register_callback which was removed in commit > 7f

Re: [PATCH] pcmcia: omap: Fix error return code in omap_cf_probe()

2020-12-05 Thread Dominik Brodowski
Am Wed, Nov 25, 2020 at 08:50:57PM +0800 schrieb Wang ShaoBo: > Fix to return proper error code instaed of 0 in omap_cf_probe(), as done > elsewhere in this function. > > Signed-off-by: Wang ShaoBo Applied to pcmcia-next. Thanks, Dominik

Re: [PATCH] drivers/pcmcia: Fix error return code in electra_cf_probe()

2020-12-05 Thread Dominik Brodowski
Am Tue, Nov 24, 2020 at 03:00:40PM +0800 schrieb Wei Li: > When it fails to call of_get_property(), it just jumps to 'fail1', > while the 'status' which will be returned is not updated. > > Fixes: 2b571a066a2f ("pcmcia: CompactFlash driver for PA Semi Electra boards") > Signed-off-by: Wei Li Thn

Re: [PATCH 1/2] pcmcia: at91_cf: move definitions locally

2020-12-05 Thread Dominik Brodowski
Am Tue, Nov 24, 2020 at 12:07:30PM +0100 schrieb Alexandre Belloni: > On Wed, 30 Sep 2020 20:48:02 +0200, Alexandre Belloni wrote: > > struct at91_cf_data is only used in the driver since all the platforms moved > > to device tree, move its definition locally. > > I've now applied those patches on

Re: [PATCH] pcmcia: db1xxx_ss: remove unneeded semicolon

2020-12-05 Thread Dominik Brodowski
Am Thu, Sep 10, 2020 at 10:05:24PM +0800 schrieb Jason Yan: > Eliminate the following coccicheck warning: > > drivers/pcmcia/db1xxx_ss.c:455:2-3: Unneeded semicolon > > Reported-by: Hulk Robot > Signed-off-by: Jason Yan Applied to pcmcia-next. Thanks, Dominik

Re: [PATCH REPOST] pcmcia: Remove NEC VRC4173 CARDU

2020-12-05 Thread Dominik Brodowski
Am Fri, Dec 04, 2020 at 08:20:09PM +0100 schrieb Sebastian Andrzej Siewior: > On 2020-11-19 18:06:24 [+0100], To linux-kernel@vger.kernel.org wrote: > > On 2020-11-13 22:34:08 [+0100], To linux-kernel@vger.kernel.org wrote: > > > This driver is the very definition of bitrotting: > > > - Introduced

Re: [PATCH] pcmcia/electra_cf: Fix some return values in 'electra_cf_probe()' in case of error

2020-12-05 Thread Dominik Brodowski
Am Wed, Jun 17, 2020 at 09:53:26PM +0200 schrieb Christophe JAILLET: > 'status' is known to be 0 at this point. It must be set to a meaningful > value in order to return an error code if one of the 'of_get_property()' > call fails. > > Return -EINVAL in such a case. > > Fixes: 2b571a066a2f("pcmci

[GIT PULL] pcmcia updates for v5.11

2020-12-18 Thread Dominik Brodowski
Linus, The following changes since commit b3298500b23f0b53a8d81e0d5ad98a29db71f4f0: Merge tag 'for-5.10/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm (2020-12-04 13:28:39 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linu

Re: [PATCH] pcmcia: ds: Remove if with always false condition

2021-03-15 Thread Dominik Brodowski
Am Mon, Mar 01, 2021 at 06:38:47PM +0100 schrieb Uwe Kleine-König: > pcmcia_device_remove() is only ever called by the driver core with > dev->driver pointing to a valid driver. (And even if dev->driver was > NULL, p_drv wouldn't be NULL as p_drv is assigned as follows: > > p_drv = to_pcmcia

Re: [PATCH 0/6] Rid W=1 warnings from PCMCIA

2021-03-15 Thread Dominik Brodowski
Am Fri, Mar 12, 2021 at 11:02:33AM + schrieb Lee Jones: > This set is part of a larger effort attempting to clean-up W=1 > kernel builds, which are currently overwhelmingly riddled with > niggly little warnings. > > Lee Jones (6): > pcmcia: rsrc_nonstatic: Demote kernel-doc abuses > pcmc

Re: [PATCH] pcmcia: Switch to using the new API kobj_to_dev()

2021-01-03 Thread Dominik Brodowski
Am Mon, Jan 04, 2021 at 09:59:30AM +0800 schrieb Tian Tao: > fixed the following coccicheck: > drivers/pcmcia/cistpl.c:1557:54-55: WARNING opportunity for kobj_to_dev() > drivers/pcmcia/cistpl.c:1584:53-54: WARNING opportunity for kobj_to_dev() > > Signed-off-by: Tian Tao Applied to pcmcia-next,

lockdep warning on thunderbolt docking

2019-08-30 Thread Dominik Brodowski
When connecting a thunderbolt-enabled docking station to my work laptop, the following lockdep warning is reported on v5.3.0-rc6+ as of Thursday morning (can look up the exact git id if so required): thunderbolt 0-1: new device found, vendor=0xd4 device=0xb070 thunderbolt 0-1: Dell WD19TB Thunder

[PATCH] random: inform about bootloader-provided randomness

2019-10-05 Thread Dominik Brodowski
Inform how many bits of randomness were provided by the bootloader, and whether we trust that input. Signed-off-by: Dominik Brodowski Cc: Ard Biesheuvel Cc: Hsin-Yi Wang Cc: Stephen Boyd Cc: Rob Herring Cc: Theodore Ts'o Cc: Will Deacon diff --git a/drivers/char/random.c b/drivers

<    1   2   3   4   5   6   7   >