From: Dominik Brodowski <linux-X3ehHDuj6sIIGcDfoQAp7OTW4wlIGRCZ@public.gmane.org> To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>, Amir Goldstein <amir73il-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, "H . Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>, tautschn-vV1OtcyAfmbQXOPxS62xeg@public.gmane.org, Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andi Kleen <ak-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>, user-mode-linux-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, hmclauchlan-b10kYP2dOMg@public.gmane.org, Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>, Jiri Slaby <jslaby-IBi9RG/b67k@public.gmane.org>, Darren Hart <dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>, Jaswinder Singh <jaswinder-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>, arnd-r2nGTMty4D4@public.gmane.org, Jeff Dike <jdike-OPE4K8JWMJJBDgjK7y7TUQ@public.gmane.org>, viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org, Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, "Luis R . Rodriguez" <mcgrof-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, "Eric W . Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>, torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, "David S . Miller" <davem@> Subject: [PATCH 000/109] remove in-kernel calls to syscalls Date: Thu, 29 Mar 2018 13:22:37 +0200 [thread overview] Message-ID: <20180329112426.23043-1-linux@dominikbrodowski.net> (raw) [ 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 call functions such as sys_xyzzy() or compat_sys_xyzzy() should only be called from userspace via the syscall table, but not from elsewhere in the kernel. 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 to use use a different calling convention for system calls there, where struct pt_regs is decoded on-the-fly in a syscall wrapper which then hands processing over to the actual syscall function. This means that only those parameters which are actually needed for a specific syscall are passed on during syscall entry, instead of filling in six CPU registers with random user space content all the time (which may cause serious trouble down the call chain).[*] Moreover, rules on how data may be accessed may differ between kernel data and user data. This is another reason why calling sys_xyzzy() is generally a bad idea, and -- at most -- acceptable in arch-specific code. This patchset removes all in-kernel calls to syscall functions in the kernel with the exception of arch/. On top of this, it cleans up the three places where many syscalls are referenced or prototyped, namely kernel/sys_ni.c, include/linux/syscalls.h and include/linux/compat.h. Patches 1 to 101 have been sent out earlier, namely - part 1 ( http://lkml.kernel.org/r/20180315190529.20943-1-linux-X3ehHDuj6sIIGcDfoQAp7OTW4wlIGRCZ@public.gmane.org ) - part 2 ( http://lkml.kernel.org/r/20180316170614.5392-1-linux-X3ehHDuj6sIIGcDfoQAp7OTW4wlIGRCZ@public.gmane.org ) - part 3 ( http://lkml.kernel.org/r/20180322090059.19361-1-linux-X3ehHDuj6sIIGcDfoQAp7OTW4wlIGRCZ@public.gmane.org ). Changes since these earlier versions are: - I have added a lot more documentation and improved the commit messages, namely to explain the naming convention and the rationale of this patches. - ACKs/Reviewed-by (thanks!) were added . - Shuffle the patches around to have them grouped together systematically: First goes a patch which defines the goal and explains the rationale: syscalls: define and explain goal to not call syscalls in the kernel A few codepaths can trivially be converted to existing in-kernel interfaces: kernel: use kernel_wait4() instead of sys_wait4() kernel: open-code sys_rt_sigpending() in sys_sigpending() kexec: call do_kexec_load() in compat syscall directly mm: use do_futex() instead of sys_futex() in mm_release() x86: use _do_fork() in compat_sys_x86_clone() x86: remove compat_sys_x86_waitpid() Then follow many patches which only affect specfic subsystems each, and replace sys_*() with internal helpers named __sys_*() or do_sys_*(). Let's start with net/: net: socket: add __sys_recvfrom() helper; remove in-kernel call to syscall net: socket: add __sys_sendto() helper; remove in-kernel call to syscall net: socket: add __sys_accept4() helper; remove in-kernel call to syscall net: socket: add __sys_socket() helper; remove in-kernel call to syscall net: socket: add __sys_bind() helper; remove in-kernel call to syscall net: socket: add __sys_connect() helper; remove in-kernel call to syscall net: socket: add __sys_listen() helper; remove in-kernel call to syscall net: socket: add __sys_getsockname() helper; remove in-kernel call to syscall net: socket: add __sys_getpeername() helper; remove in-kernel call to syscall net: socket: add __sys_socketpair() helper; remove in-kernel call to syscall net: socket: add __sys_shutdown() helper; remove in-kernel call to syscall net: socket: add __sys_setsockopt() helper; remove in-kernel call to syscall net: socket: add __sys_getsockopt() helper; remove in-kernel call to syscall net: socket: add do_sys_recvmmsg() helper; remove in-kernel call to syscall net: socket: move check for forbid_cmsg_compat to __sys_...msg() net: socket: replace calls to sys_send() with __sys_sendto() net: socket: replace call to sys_recv() with __sys_recvfrom() net: socket: add __compat_sys_recvfrom() helper; remove in-kernel call to compat syscall net: socket: add __compat_sys_setsockopt() helper; remove in-kernel call to compat syscall net: socket: add __compat_sys_getsockopt() helper; remove in-kernel call to compat syscall net: socket: add __compat_sys_recvmmsg() helper; remove in-kernel call to compat syscall net: socket: add __compat_sys_...msg() helpers; remove in-kernel calls to compat syscalls The changes in ipc/ are limited to this specific subsystem. The wrappers are named ksys_*() to denote that these functions are meant as a drop-in replacement for the syscalls. ipc: add semtimedop syscall/compat_syscall wrappers ipc: add semget syscall wrapper ipc: add semctl syscall/compat_syscall wrappers ipc: add msgget syscall wrapper ipc: add shmget syscall wrapper ipc: add shmdt syscall wrapper ipc: add shmctl syscall/compat_syscall wrappers ipc: add msgctl syscall/compat_syscall wrappers ipc: add msgrcv syscall/compat_syscall wrappers ipc: add msgsnd syscall/compat_syscall wrappers A few mindless conversions in kernel/ and mm/: kernel: add do_getpgid() helper; remove internal call to sys_getpgid() kernel: add do_compat_sigaltstack() helper; remove in-kernel call to compat syscall kernel: provide ksys_*() wrappers for syscalls called by kernel/uid16.c sched: add do_sched_yield() helper; remove in-kernel call to sched_yield() mm: add kernel_migrate_pages() helper, move compat syscall to mm/mempolicy.c mm: add kernel_move_pages() helper, move compat syscall to mm/migrate.c mm: add kernel_mbind() helper; remove in-kernel call to syscall mm: add kernel_[sg]et_mempolicy() helpers; remove in-kernel calls to syscalls Then, let's handle those instances internal to fs/ which call syscalls: fs: add do_readlinkat() helper; remove internal call to sys_readlinkat() fs: add do_pipe2() helper; remove internal call to sys_pipe2() fs: add do_renameat2() helper; remove internal call to sys_renameat2() fs: add do_futimesat() helper; remove internal call to sys_futimesat() fs: add do_epoll_*() helpers; remove internal calls to sys_epoll_*() fs: add do_signalfd4() helper; remove internal calls to sys_signalfd4() fs: add do_eventfd() helper; remove internal call to sys_eventfd() fs: add do_lookup_dcookie() helper; remove in-kernel call to syscall fs: add do_vmsplice() helper; remove in-kernel call to syscall fs: add kern_select() helper; remove in-kernel call to sys_select() fs: add do_compat_fcntl64() helper; remove in-kernel call to compat syscall fs: add do_compat_select() helper; remove in-kernel call to compat syscall fs: add do_compat_signalfd4() helper; remove in-kernel call to compat syscall fs: add do_compat_futimesat() helper; remove in-kernel call to compat syscall inotify: add do_inotify_init() helper; remove in-kernel call to syscall fanotify: add do_fanotify_mark() helper; remove in-kernel call to syscall fs/quota: add kernel_quotactl() helper; remove in-kernel call to syscall fs/quota: use COMPAT_SYSCALL_DEFINE for sys32_quotactl() Several fs- and some mm-related syscalls are called in initramfs, initrd and init, devtmpfs, and pm code. While at least many of these instances should be converted to use proper in-kernel VFS interfaces in future, convert them mindlessly to ksys_*() helpers or wrappers for now. fs: add ksys_mount() helper; remove in-kernel calls to sys_mount() fs: add ksys_umount() helper; remove in-kernel call to sys_umount() fs: add ksys_dup{,3}() helper; remove in-kernel calls to sys_dup{,3}() fs: add ksys_chroot() helper; remove-in kernel calls to sys_chroot() fs: add ksys_write() helper; remove in-kernel calls to sys_write() fs: add ksys_chdir() helper; remove in-kernel calls to sys_chdir() fs: add ksys_unlink() wrapper; remove in-kernel calls to sys_unlink() hostfs: rename do_rmdir() to hostfs_do_rmdir() fs: add ksys_rmdir() wrapper; remove in-kernel calls to sys_rmdir() fs: add do_mkdirat() helper and ksys_mkdir() wrapper; remove in-kernel calls to syscall fs: add do_symlinkat() helper and ksys_symlink() wrapper; remove in-kernel calls to syscall fs: add do_mknodat() helper and ksys_mknod() wrapper; remove in-kernel calls to syscall fs: add do_linkat() helper and ksys_link() wrapper; remove in-kernel calls to syscall fs: add ksys_fchmod() and do_fchmodat() helpers and ksys_chmod() wrapper; remove in-kernel calls to syscall fs: add do_faccessat() helper and ksys_access() wrapper; remove in-kernel calls to syscall fs: add do_fchownat(), ksys_fchown() helpers and ksys_{,l}chown() wrappers fs: add ksys_ftruncate() wrapper; remove in-kernel calls to sys_ftruncate() fs: add ksys_close() wrapper; remove in-kernel calls to sys_close() fs: add ksys_open() wrapper; remove in-kernel calls to sys_open() fs: add ksys_getdents64() helper; remove in-kernel calls to sys_getdents64() fs: add ksys_ioctl() helper; remove in-kernel calls to sys_ioctl() fs: add ksys_lseek() helper; remove in-kernel calls to sys_lseek() fs: add ksys_read() helper; remove in-kernel calls to sys_read() fs: add ksys_sync() helper; remove in-kernel calls to sys_sync() kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare() kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid() To reach the goal to get rid of all in-kernel calls to syscalls for x86, we need to handle a few further syscalls called from compat syscalls in x86 and (mostly) from other architectures. Those could be made generic making use of Al Viro's macro trickery. For v4.17, I'd suggest to keep it simple: fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate() fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate() mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64() mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff() mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead() x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm() Then, throw in two fixes for x86: x86: fix sys_sigreturn() return type to be long, not unsigned long x86/sigreturn: use SYSCALL_DEFINE0 (by Michael Tautschnig) ... and clean up the three places where many syscalls are referenced or prototyped (kernel/sys_ni.c, include/linux/syscalls.h and include/linux/compat.h): kexec: move sys_kexec_load() prototype to syscalls.h syscalls: sort syscall prototypes in include/linux/syscalls.h net: remove compat_sys_*() prototypes from net/compat.h syscalls: sort syscall prototypes in include/linux/compat.h syscalls/x86: auto-create compat_sys_*() prototypes kernel/sys_ni: sort cond_syscall() entries kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions Last but not least, add a patch by Howard McLauchlan to whitelist all syscalls for error injection: bpf: whitelist all syscalls for error injection (by Howard McLauchlan) Tze whole series is available at https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git syscalls-next and I intend to push this upstream early in the v4.17-rc1 cycle. Thanks, Dominik Documentation/process/adding-syscalls.rst | 34 +- arch/alpha/kernel/osf_sys.c | 2 +- arch/arm/kernel/sys_arm.c | 2 +- arch/arm64/kernel/sys.c | 2 +- arch/ia64/kernel/sys_ia64.c | 4 +- arch/m68k/kernel/sys_m68k.c | 2 +- arch/microblaze/kernel/sys_microblaze.c | 6 +- arch/mips/kernel/linux32.c | 22 +- arch/mips/kernel/syscall.c | 6 +- arch/parisc/kernel/sys_parisc.c | 30 +- arch/powerpc/kernel/sys_ppc32.c | 18 +- arch/powerpc/kernel/syscalls.c | 6 +- arch/riscv/kernel/sys_riscv.c | 4 +- arch/s390/kernel/compat_linux.c | 37 +- arch/s390/kernel/sys_s390.c | 2 +- arch/sh/kernel/sys_sh.c | 4 +- arch/sh/kernel/sys_sh32.c | 12 +- arch/sparc/kernel/setup_32.c | 2 +- arch/sparc/kernel/sys_sparc32.c | 26 +- arch/sparc/kernel/sys_sparc_32.c | 6 +- arch/sparc/kernel/sys_sparc_64.c | 2 +- arch/um/kernel/syscall.c | 2 +- arch/x86/entry/syscalls/syscall_32.tbl | 4 +- arch/x86/ia32/ia32_signal.c | 1 - arch/x86/ia32/sys_ia32.c | 50 +- arch/x86/include/asm/sys_ia32.h | 67 -- arch/x86/include/asm/syscalls.h | 3 +- arch/x86/kernel/ioport.c | 7 +- arch/x86/kernel/signal.c | 5 +- arch/x86/kernel/sys_x86_64.c | 2 +- arch/xtensa/kernel/syscall.c | 2 +- drivers/base/devtmpfs.c | 11 +- drivers/tty/sysrq.c | 2 +- drivers/tty/vt/vt_ioctl.c | 6 +- fs/autofs4/dev-ioctl.c | 2 +- fs/binfmt_misc.c | 2 +- fs/dcookies.c | 11 +- fs/eventfd.c | 9 +- fs/eventpoll.c | 23 +- fs/fcntl.c | 12 +- fs/file.c | 17 +- fs/hostfs/hostfs.h | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hostfs/hostfs_user.c | 2 +- fs/internal.h | 14 + fs/ioctl.c | 7 +- fs/namei.c | 61 +- fs/namespace.c | 19 +- fs/notify/fanotify/fanotify_user.c | 14 +- fs/notify/inotify/inotify_user.c | 9 +- fs/open.c | 77 +- fs/pipe.c | 9 +- fs/quota/compat.c | 13 +- fs/quota/quota.c | 10 +- fs/read_write.c | 45 +- fs/readdir.c | 11 +- fs/select.c | 29 +- fs/signalfd.c | 31 +- fs/splice.c | 12 +- fs/stat.c | 12 +- fs/sync.c | 19 +- fs/utimes.c | 25 +- include/linux/compat.h | 644 ++++++------ include/linux/futex.h | 13 +- include/linux/kexec.h | 4 - include/linux/quotaops.h | 3 + include/linux/socket.h | 37 +- include/linux/syscalls.h | 1511 +++++++++++++++++------------ include/net/compat.h | 11 - init/do_mounts.c | 26 +- init/do_mounts.h | 4 +- init/do_mounts_initrd.c | 42 +- init/do_mounts_md.c | 29 +- init/do_mounts_rd.c | 40 +- init/initramfs.c | 52 +- init/main.c | 9 +- init/noinitramfs.c | 6 +- ipc/msg.c | 60 +- ipc/sem.c | 44 +- ipc/shm.c | 28 +- ipc/syscall.c | 58 +- ipc/util.h | 31 + kernel/compat.c | 55 -- kernel/exit.c | 2 +- kernel/fork.c | 11 +- kernel/kexec.c | 52 +- kernel/pid_namespace.c | 6 +- kernel/power/hibernate.c | 2 +- kernel/power/suspend.c | 2 +- kernel/power/user.c | 2 +- kernel/sched/core.c | 8 +- kernel/signal.c | 29 +- kernel/sys.c | 74 +- kernel/sys_ni.c | 617 +++++++----- kernel/uid16.c | 25 +- kernel/uid16.h | 14 + kernel/umh.c | 4 +- mm/fadvise.c | 10 +- mm/mempolicy.c | 92 +- mm/migrate.c | 39 +- mm/mmap.c | 17 +- mm/nommu.c | 17 +- mm/readahead.c | 7 +- net/compat.c | 136 ++- net/socket.c | 234 +++-- 105 files changed, 3129 insertions(+), 1868 deletions(-) delete mode 100644 arch/x86/include/asm/sys_ia32.h create mode 100644 kernel/uid16.h [*] An early, not-yet-ready version and partly untested (i386, x32) of the patches required to implement this on top of this series is available at https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git syscalls-WIP -- 2.16.3
WARNING: multiple messages have this Message-ID (diff)
From: Dominik Brodowski <linux@dominikbrodowski.net> To: linux-kernel@vger.kernel.org Cc: viro@ZenIV.linux.org.uk, torvalds@linux-foundation.org, arnd@arndb.de, linux-arch@vger.kernel.org, hmclauchlan@fb.com, tautschn@amazon.co.uk, Amir Goldstein <amir73il@gmail.com>, Andi Kleen <ak@linux.intel.com>, Andrew Morton <akpm@linux-foundation.org>, Christoph Hellwig <hch@infradead.org>, Darren Hart <dvhart@infradead.org>, "David S . Miller" <davem@davemloft.net>, "Eric W . Biederman" <ebiederm@xmission.com>, "H . Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>, Jaswinder Singh <jaswinder@infradead.org>, Jeff Dike <jdike@addtoit.com>, Jiri Slaby <jslaby@suse.com>, kexec@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, "Luis R . Rodriguez" <mcgrof@kernel.org>, netdev@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, user-mode-linux-devel@lists.sourceforge.net, x86@kernel.org Subject: [PATCH 000/109] remove in-kernel calls to syscalls Date: Thu, 29 Mar 2018 13:22:37 +0200 [thread overview] Message-ID: <20180329112426.23043-1-linux@dominikbrodowski.net> (raw) Message-ID: <20180329112237.hWyA9DLmAHS0KvSHkOOZp0k-PyF_0yXLWAY1sDdYkEk@z> (raw) [ 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 call functions such as sys_xyzzy() or compat_sys_xyzzy() should only be called from userspace via the syscall table, but not from elsewhere in the kernel. 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 to use use a different calling convention for system calls there, where struct pt_regs is decoded on-the-fly in a syscall wrapper which then hands processing over to the actual syscall function. This means that only those parameters which are actually needed for a specific syscall are passed on during syscall entry, instead of filling in six CPU registers with random user space content all the time (which may cause serious trouble down the call chain).[*] Moreover, rules on how data may be accessed may differ between kernel data and user data. This is another reason why calling sys_xyzzy() is generally a bad idea, and -- at most -- acceptable in arch-specific code. This patchset removes all in-kernel calls to syscall functions in the kernel with the exception of arch/. On top of this, it cleans up the three places where many syscalls are referenced or prototyped, namely kernel/sys_ni.c, include/linux/syscalls.h and include/linux/compat.h. Patches 1 to 101 have been sent out earlier, namely - part 1 ( http://lkml.kernel.org/r/20180315190529.20943-1-linux@dominikbrodowski.net ) - part 2 ( http://lkml.kernel.org/r/20180316170614.5392-1-linux@dominikbrodowski.net ) - part 3 ( http://lkml.kernel.org/r/20180322090059.19361-1-linux@dominikbrodowski.net ). Changes since these earlier versions are: - I have added a lot more documentation and improved the commit messages, namely to explain the naming convention and the rationale of this patches. - ACKs/Reviewed-by (thanks!) were added . - Shuffle the patches around to have them grouped together systematically: First goes a patch which defines the goal and explains the rationale: syscalls: define and explain goal to not call syscalls in the kernel A few codepaths can trivially be converted to existing in-kernel interfaces: kernel: use kernel_wait4() instead of sys_wait4() kernel: open-code sys_rt_sigpending() in sys_sigpending() kexec: call do_kexec_load() in compat syscall directly mm: use do_futex() instead of sys_futex() in mm_release() x86: use _do_fork() in compat_sys_x86_clone() x86: remove compat_sys_x86_waitpid() Then follow many patches which only affect specfic subsystems each, and replace sys_*() with internal helpers named __sys_*() or do_sys_*(). Let's start with net/: net: socket: add __sys_recvfrom() helper; remove in-kernel call to syscall net: socket: add __sys_sendto() helper; remove in-kernel call to syscall net: socket: add __sys_accept4() helper; remove in-kernel call to syscall net: socket: add __sys_socket() helper; remove in-kernel call to syscall net: socket: add __sys_bind() helper; remove in-kernel call to syscall net: socket: add __sys_connect() helper; remove in-kernel call to syscall net: socket: add __sys_listen() helper; remove in-kernel call to syscall net: socket: add __sys_getsockname() helper; remove in-kernel call to syscall net: socket: add __sys_getpeername() helper; remove in-kernel call to syscall net: socket: add __sys_socketpair() helper; remove in-kernel call to syscall net: socket: add __sys_shutdown() helper; remove in-kernel call to syscall net: socket: add __sys_setsockopt() helper; remove in-kernel call to syscall net: socket: add __sys_getsockopt() helper; remove in-kernel call to syscall net: socket: add do_sys_recvmmsg() helper; remove in-kernel call to syscall net: socket: move check for forbid_cmsg_compat to __sys_...msg() net: socket: replace calls to sys_send() with __sys_sendto() net: socket: replace call to sys_recv() with __sys_recvfrom() net: socket: add __compat_sys_recvfrom() helper; remove in-kernel call to compat syscall net: socket: add __compat_sys_setsockopt() helper; remove in-kernel call to compat syscall net: socket: add __compat_sys_getsockopt() helper; remove in-kernel call to compat syscall net: socket: add __compat_sys_recvmmsg() helper; remove in-kernel call to compat syscall net: socket: add __compat_sys_...msg() helpers; remove in-kernel calls to compat syscalls The changes in ipc/ are limited to this specific subsystem. The wrappers are named ksys_*() to denote that these functions are meant as a drop-in replacement for the syscalls. ipc: add semtimedop syscall/compat_syscall wrappers ipc: add semget syscall wrapper ipc: add semctl syscall/compat_syscall wrappers ipc: add msgget syscall wrapper ipc: add shmget syscall wrapper ipc: add shmdt syscall wrapper ipc: add shmctl syscall/compat_syscall wrappers ipc: add msgctl syscall/compat_syscall wrappers ipc: add msgrcv syscall/compat_syscall wrappers ipc: add msgsnd syscall/compat_syscall wrappers A few mindless conversions in kernel/ and mm/: kernel: add do_getpgid() helper; remove internal call to sys_getpgid() kernel: add do_compat_sigaltstack() helper; remove in-kernel call to compat syscall kernel: provide ksys_*() wrappers for syscalls called by kernel/uid16.c sched: add do_sched_yield() helper; remove in-kernel call to sched_yield() mm: add kernel_migrate_pages() helper, move compat syscall to mm/mempolicy.c mm: add kernel_move_pages() helper, move compat syscall to mm/migrate.c mm: add kernel_mbind() helper; remove in-kernel call to syscall mm: add kernel_[sg]et_mempolicy() helpers; remove in-kernel calls to syscalls Then, let's handle those instances internal to fs/ which call syscalls: fs: add do_readlinkat() helper; remove internal call to sys_readlinkat() fs: add do_pipe2() helper; remove internal call to sys_pipe2() fs: add do_renameat2() helper; remove internal call to sys_renameat2() fs: add do_futimesat() helper; remove internal call to sys_futimesat() fs: add do_epoll_*() helpers; remove internal calls to sys_epoll_*() fs: add do_signalfd4() helper; remove internal calls to sys_signalfd4() fs: add do_eventfd() helper; remove internal call to sys_eventfd() fs: add do_lookup_dcookie() helper; remove in-kernel call to syscall fs: add do_vmsplice() helper; remove in-kernel call to syscall fs: add kern_select() helper; remove in-kernel call to sys_select() fs: add do_compat_fcntl64() helper; remove in-kernel call to compat syscall fs: add do_compat_select() helper; remove in-kernel call to compat syscall fs: add do_compat_signalfd4() helper; remove in-kernel call to compat syscall fs: add do_compat_futimesat() helper; remove in-kernel call to compat syscall inotify: add do_inotify_init() helper; remove in-kernel call to syscall fanotify: add do_fanotify_mark() helper; remove in-kernel call to syscall fs/quota: add kernel_quotactl() helper; remove in-kernel call to syscall fs/quota: use COMPAT_SYSCALL_DEFINE for sys32_quotactl() Several fs- and some mm-related syscalls are called in initramfs, initrd and init, devtmpfs, and pm code. While at least many of these instances should be converted to use proper in-kernel VFS interfaces in future, convert them mindlessly to ksys_*() helpers or wrappers for now. fs: add ksys_mount() helper; remove in-kernel calls to sys_mount() fs: add ksys_umount() helper; remove in-kernel call to sys_umount() fs: add ksys_dup{,3}() helper; remove in-kernel calls to sys_dup{,3}() fs: add ksys_chroot() helper; remove-in kernel calls to sys_chroot() fs: add ksys_write() helper; remove in-kernel calls to sys_write() fs: add ksys_chdir() helper; remove in-kernel calls to sys_chdir() fs: add ksys_unlink() wrapper; remove in-kernel calls to sys_unlink() hostfs: rename do_rmdir() to hostfs_do_rmdir() fs: add ksys_rmdir() wrapper; remove in-kernel calls to sys_rmdir() fs: add do_mkdirat() helper and ksys_mkdir() wrapper; remove in-kernel calls to syscall fs: add do_symlinkat() helper and ksys_symlink() wrapper; remove in-kernel calls to syscall fs: add do_mknodat() helper and ksys_mknod() wrapper; remove in-kernel calls to syscall fs: add do_linkat() helper and ksys_link() wrapper; remove in-kernel calls to syscall fs: add ksys_fchmod() and do_fchmodat() helpers and ksys_chmod() wrapper; remove in-kernel calls to syscall fs: add do_faccessat() helper and ksys_access() wrapper; remove in-kernel calls to syscall fs: add do_fchownat(), ksys_fchown() helpers and ksys_{,l}chown() wrappers fs: add ksys_ftruncate() wrapper; remove in-kernel calls to sys_ftruncate() fs: add ksys_close() wrapper; remove in-kernel calls to sys_close() fs: add ksys_open() wrapper; remove in-kernel calls to sys_open() fs: add ksys_getdents64() helper; remove in-kernel calls to sys_getdents64() fs: add ksys_ioctl() helper; remove in-kernel calls to sys_ioctl() fs: add ksys_lseek() helper; remove in-kernel calls to sys_lseek() fs: add ksys_read() helper; remove in-kernel calls to sys_read() fs: add ksys_sync() helper; remove in-kernel calls to sys_sync() kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare() kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid() To reach the goal to get rid of all in-kernel calls to syscalls for x86, we need to handle a few further syscalls called from compat syscalls in x86 and (mostly) from other architectures. Those could be made generic making use of Al Viro's macro trickery. For v4.17, I'd suggest to keep it simple: fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate() fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate() mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64() mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff() mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead() x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm() Then, throw in two fixes for x86: x86: fix sys_sigreturn() return type to be long, not unsigned long x86/sigreturn: use SYSCALL_DEFINE0 (by Michael Tautschnig) ... and clean up the three places where many syscalls are referenced or prototyped (kernel/sys_ni.c, include/linux/syscalls.h and include/linux/compat.h): kexec: move sys_kexec_load() prototype to syscalls.h syscalls: sort syscall prototypes in include/linux/syscalls.h net: remove compat_sys_*() prototypes from net/compat.h syscalls: sort syscall prototypes in include/linux/compat.h syscalls/x86: auto-create compat_sys_*() prototypes kernel/sys_ni: sort cond_syscall() entries kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions Last but not least, add a patch by Howard McLauchlan to whitelist all syscalls for error injection: bpf: whitelist all syscalls for error injection (by Howard McLauchlan) Tze whole series is available at https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git syscalls-next and I intend to push this upstream early in the v4.17-rc1 cycle. Thanks, Dominik Documentation/process/adding-syscalls.rst | 34 +- arch/alpha/kernel/osf_sys.c | 2 +- arch/arm/kernel/sys_arm.c | 2 +- arch/arm64/kernel/sys.c | 2 +- arch/ia64/kernel/sys_ia64.c | 4 +- arch/m68k/kernel/sys_m68k.c | 2 +- arch/microblaze/kernel/sys_microblaze.c | 6 +- arch/mips/kernel/linux32.c | 22 +- arch/mips/kernel/syscall.c | 6 +- arch/parisc/kernel/sys_parisc.c | 30 +- arch/powerpc/kernel/sys_ppc32.c | 18 +- arch/powerpc/kernel/syscalls.c | 6 +- arch/riscv/kernel/sys_riscv.c | 4 +- arch/s390/kernel/compat_linux.c | 37 +- arch/s390/kernel/sys_s390.c | 2 +- arch/sh/kernel/sys_sh.c | 4 +- arch/sh/kernel/sys_sh32.c | 12 +- arch/sparc/kernel/setup_32.c | 2 +- arch/sparc/kernel/sys_sparc32.c | 26 +- arch/sparc/kernel/sys_sparc_32.c | 6 +- arch/sparc/kernel/sys_sparc_64.c | 2 +- arch/um/kernel/syscall.c | 2 +- arch/x86/entry/syscalls/syscall_32.tbl | 4 +- arch/x86/ia32/ia32_signal.c | 1 - arch/x86/ia32/sys_ia32.c | 50 +- arch/x86/include/asm/sys_ia32.h | 67 -- arch/x86/include/asm/syscalls.h | 3 +- arch/x86/kernel/ioport.c | 7 +- arch/x86/kernel/signal.c | 5 +- arch/x86/kernel/sys_x86_64.c | 2 +- arch/xtensa/kernel/syscall.c | 2 +- drivers/base/devtmpfs.c | 11 +- drivers/tty/sysrq.c | 2 +- drivers/tty/vt/vt_ioctl.c | 6 +- fs/autofs4/dev-ioctl.c | 2 +- fs/binfmt_misc.c | 2 +- fs/dcookies.c | 11 +- fs/eventfd.c | 9 +- fs/eventpoll.c | 23 +- fs/fcntl.c | 12 +- fs/file.c | 17 +- fs/hostfs/hostfs.h | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hostfs/hostfs_user.c | 2 +- fs/internal.h | 14 + fs/ioctl.c | 7 +- fs/namei.c | 61 +- fs/namespace.c | 19 +- fs/notify/fanotify/fanotify_user.c | 14 +- fs/notify/inotify/inotify_user.c | 9 +- fs/open.c | 77 +- fs/pipe.c | 9 +- fs/quota/compat.c | 13 +- fs/quota/quota.c | 10 +- fs/read_write.c | 45 +- fs/readdir.c | 11 +- fs/select.c | 29 +- fs/signalfd.c | 31 +- fs/splice.c | 12 +- fs/stat.c | 12 +- fs/sync.c | 19 +- fs/utimes.c | 25 +- include/linux/compat.h | 644 ++++++------ include/linux/futex.h | 13 +- include/linux/kexec.h | 4 - include/linux/quotaops.h | 3 + include/linux/socket.h | 37 +- include/linux/syscalls.h | 1511 +++++++++++++++++------------ include/net/compat.h | 11 - init/do_mounts.c | 26 +- init/do_mounts.h | 4 +- init/do_mounts_initrd.c | 42 +- init/do_mounts_md.c | 29 +- init/do_mounts_rd.c | 40 +- init/initramfs.c | 52 +- init/main.c | 9 +- init/noinitramfs.c | 6 +- ipc/msg.c | 60 +- ipc/sem.c | 44 +- ipc/shm.c | 28 +- ipc/syscall.c | 58 +- ipc/util.h | 31 + kernel/compat.c | 55 -- kernel/exit.c | 2 +- kernel/fork.c | 11 +- kernel/kexec.c | 52 +- kernel/pid_namespace.c | 6 +- kernel/power/hibernate.c | 2 +- kernel/power/suspend.c | 2 +- kernel/power/user.c | 2 +- kernel/sched/core.c | 8 +- kernel/signal.c | 29 +- kernel/sys.c | 74 +- kernel/sys_ni.c | 617 +++++++----- kernel/uid16.c | 25 +- kernel/uid16.h | 14 + kernel/umh.c | 4 +- mm/fadvise.c | 10 +- mm/mempolicy.c | 92 +- mm/migrate.c | 39 +- mm/mmap.c | 17 +- mm/nommu.c | 17 +- mm/readahead.c | 7 +- net/compat.c | 136 ++- net/socket.c | 234 +++-- 105 files changed, 3129 insertions(+), 1868 deletions(-) delete mode 100644 arch/x86/include/asm/sys_ia32.h create mode 100644 kernel/uid16.h [*] An early, not-yet-ready version and partly untested (i386, x32) of the patches required to implement this on top of this series is available at https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git syscalls-WIP -- 2.16.3
next reply other threads:[~2018-03-29 11:22 UTC|newest] Thread overview: 232+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-03-29 11:22 Dominik Brodowski [this message] 2018-03-29 11:22 ` [PATCH 000/109] remove in-kernel calls to syscalls Dominik Brodowski 2018-03-29 11:22 ` [PATCH 001/109] syscalls: define and explain goal to not call syscalls in the kernel Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 002/109] kernel: use kernel_wait4() instead of sys_wait4() Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-04-02 16:14 ` Luis R. Rodriguez 2018-04-02 16:14 ` Luis R. Rodriguez 2018-03-29 11:22 ` [PATCH 003/109] kernel: open-code sys_rt_sigpending() in sys_sigpending() Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski [not found] ` <20180329112426.23043-1-linux-X3ehHDuj6sIIGcDfoQAp7OTW4wlIGRCZ@public.gmane.org> 2018-03-29 11:22 ` [PATCH 004/109] kexec: call do_kexec_load() in compat syscall directly Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 102/109] kexec: move sys_kexec_load() prototype to syscalls.h Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 005/109] mm: use do_futex() instead of sys_futex() in mm_release() Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 006/109] x86: use _do_fork() in compat_sys_x86_clone() Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 007/109] x86: remove compat_sys_x86_waitpid() Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 008/109] net: socket: add __sys_recvfrom() helper; remove in-kernel call to syscall Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 009/109] net: socket: add __sys_sendto() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 010/109] net: socket: add __sys_accept4() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 011/109] net: socket: add __sys_socket() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 012/109] net: socket: add __sys_bind() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 013/109] net: socket: add __sys_connect() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 014/109] net: socket: add __sys_listen() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 015/109] net: socket: add __sys_getsockname() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 016/109] net: socket: add __sys_getpeername() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 017/109] net: socket: add __sys_socketpair() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 018/109] net: socket: add __sys_shutdown() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 019/109] net: socket: add __sys_setsockopt() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 020/109] net: socket: add __sys_getsockopt() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 021/109] net: socket: add do_sys_recvmmsg() " Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:22 ` [PATCH 022/109] net: socket: move check for forbid_cmsg_compat to __sys_...msg() Dominik Brodowski 2018-03-29 11:22 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 023/109] net: socket: replace calls to sys_send() with __sys_sendto() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 024/109] net: socket: replace call to sys_recv() with __sys_recvfrom() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 025/109] net: socket: add __compat_sys_recvfrom() helper; remove in-kernel call to compat syscall Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 026/109] net: socket: add __compat_sys_setsockopt() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 027/109] net: socket: add __compat_sys_getsockopt() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 028/109] net: socket: add __compat_sys_recvmmsg() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 029/109] net: socket: add __compat_sys_...msg() helpers; remove in-kernel calls to compat syscalls Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 030/109] ipc: add semtimedop syscall/compat_syscall wrappers Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 031/109] ipc: add semget syscall wrapper Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 032/109] ipc: add semctl syscall/compat_syscall wrappers Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 033/109] ipc: add msgget syscall wrapper Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 034/109] ipc: add shmget " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 035/109] ipc: add shmdt " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 036/109] ipc: add shmctl syscall/compat_syscall wrappers Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 037/109] ipc: add msgctl " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 038/109] ipc: add msgrcv " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 039/109] ipc: add msgsnd " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 040/109] kernel: add do_getpgid() helper; remove internal call to sys_getpgid() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 041/109] kernel: add do_compat_sigaltstack() helper; remove in-kernel call to compat syscall Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 042/109] kernel: provide ksys_*() wrappers for syscalls called by kernel/uid16.c Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 043/109] sched: add do_sched_yield() helper; remove in-kernel call to sched_yield() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:41 ` Peter Zijlstra 2018-03-29 11:41 ` Peter Zijlstra 2018-03-29 11:23 ` [PATCH 044/109] mm: add kernel_migrate_pages() helper, move compat syscall to mm/mempolicy.c Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 045/109] mm: add kernel_move_pages() helper, move compat syscall to mm/migrate.c Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 046/109] mm: add kernel_mbind() helper; remove in-kernel call to syscall Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 047/109] mm: add kernel_[sg]et_mempolicy() helpers; remove in-kernel calls to syscalls Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 048/109] fs: add do_readlinkat() helper; remove internal call to sys_readlinkat() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 049/109] fs: add do_pipe2() helper; remove internal call to sys_pipe2() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 050/109] fs: add do_renameat2() helper; remove internal call to sys_renameat2() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 051/109] fs: add do_futimesat() helper; remove internal call to sys_futimesat() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 052/109] fs: add do_epoll_*() helpers; remove internal calls to sys_epoll_*() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 053/109] fs: add do_signalfd4() helper; remove internal calls to sys_signalfd4() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 054/109] fs: add do_eventfd() helper; remove internal call to sys_eventfd() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 055/109] fs: add do_lookup_dcookie() helper; remove in-kernel call to syscall Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 056/109] fs: add do_vmsplice() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 057/109] fs: add kern_select() helper; remove in-kernel call to sys_select() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 058/109] fs: add do_compat_fcntl64() helper; remove in-kernel call to compat syscall Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 059/109] fs: add do_compat_select() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 060/109] fs: add do_compat_signalfd4() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 061/109] fs: add do_compat_futimesat() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 062/109] inotify: add do_inotify_init() helper; remove in-kernel call to syscall Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 063/109] fanotify: add do_fanotify_mark() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 064/109] fs/quota: add kernel_quotactl() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 065/109] fs/quota: use COMPAT_SYSCALL_DEFINE for sys32_quotactl() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 066/109] fs: add ksys_mount() helper; remove in-kernel calls to sys_mount() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 067/109] fs: add ksys_umount() helper; remove in-kernel call to sys_umount() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 068/109] fs: add ksys_dup{,3}() helper; remove in-kernel calls to sys_dup{,3}() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 069/109] fs: add ksys_chroot() helper; remove-in kernel calls to sys_chroot() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 070/109] fs: add ksys_write() helper; remove in-kernel calls to sys_write() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 071/109] fs: add ksys_chdir() helper; remove in-kernel calls to sys_chdir() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 072/109] fs: add ksys_unlink() wrapper; remove in-kernel calls to sys_unlink() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 073/109] hostfs: rename do_rmdir() to hostfs_do_rmdir() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 074/109] fs: add ksys_rmdir() wrapper; remove in-kernel calls to sys_rmdir() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 075/109] fs: add do_mkdirat() helper and ksys_mkdir() wrapper; remove in-kernel calls to syscall Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 076/109] fs: add do_symlinkat() helper and ksys_symlink() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 077/109] fs: add do_mknodat() helper and ksys_mknod() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 078/109] fs: add do_linkat() helper and ksys_link() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 079/109] fs: add ksys_fchmod() and do_fchmodat() helpers and ksys_chmod() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 080/109] fs: add do_faccessat() helper and ksys_access() " Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 081/109] fs: add do_fchownat(), ksys_fchown() helpers and ksys_{,l}chown() wrappers Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:23 ` [PATCH 082/109] fs: add ksys_ftruncate() wrapper; remove in-kernel calls to sys_ftruncate() Dominik Brodowski 2018-03-29 11:23 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 083/109] fs: add ksys_close() wrapper; remove in-kernel calls to sys_close() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 084/109] fs: add ksys_open() wrapper; remove in-kernel calls to sys_open() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 085/109] fs: add ksys_getdents64() helper; remove in-kernel calls to sys_getdents64() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 086/109] fs: add ksys_ioctl() helper; remove in-kernel calls to sys_ioctl() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 087/109] fs: add ksys_lseek() helper; remove in-kernel calls to sys_lseek() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 088/109] fs: add ksys_read() helper; remove in-kernel calls to sys_read() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 089/109] fs: add ksys_sync() helper; remove in-kernel calls to sys_sync() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 090/109] kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 091/109] kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 092/109] fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 093/109] fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 094/109] fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 095/109] fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 096/109] mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 097/109] mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 098/109] mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 099/109] x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm() Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 100/109] x86: fix sys_sigreturn() return type to be long, not unsigned long Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 101/109] x86/sigreturn: use SYSCALL_DEFINE0 Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 103/109] syscalls: sort syscall prototypes in include/linux/syscalls.h Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 104/109] net: remove compat_sys_*() prototypes from net/compat.h Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 105/109] syscalls: sort syscall prototypes in include/linux/compat.h Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 106/109] syscalls/x86: auto-create compat_sys_*() prototypes Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 107/109] kernel/sys_ni: sort cond_syscall() entries Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 108/109] kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 11:24 ` [PATCH 109/109] bpf: whitelist all syscalls for error injection Dominik Brodowski 2018-03-29 11:24 ` Dominik Brodowski 2018-03-29 14:20 ` [PATCH 000/109] remove in-kernel calls to syscalls Matthew Wilcox 2018-03-29 14:20 ` Matthew Wilcox 2018-03-29 14:42 ` Dominik Brodowski 2018-03-29 14:42 ` Dominik Brodowski 2018-03-29 14:46 ` David Laight 2018-03-29 14:46 ` David Laight 2018-03-29 14:55 ` Dominik Brodowski 2018-03-29 14:55 ` Dominik Brodowski
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180329112426.23043-1-linux@dominikbrodowski.net \ --to=linux-x3ehhduj6siigcdfoqap7otw4wligrcz@public.gmane.org \ --cc=ak-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \ --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \ --cc=amir73il-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=arnd-r2nGTMty4D4@public.gmane.org \ --cc=dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \ --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \ --cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \ --cc=hmclauchlan-b10kYP2dOMg@public.gmane.org \ --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \ --cc=jaswinder-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \ --cc=jdike-OPE4K8JWMJJBDgjK7y7TUQ@public.gmane.org \ --cc=jslaby-IBi9RG/b67k@public.gmane.org \ --cc=kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \ --cc=linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=mcgrof-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \ --cc=tautschn-vV1OtcyAfmbQXOPxS62xeg@public.gmane.org \ --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \ --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \ --cc=user-mode-linux-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \ --cc=viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org \ --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).