All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next 00/22] remove in-kernel syscall invocations (part 2 == netdev)
@ 2018-03-16 17:05 Dominik Brodowski
  2018-03-16 17:05 ` [PATCH -next 01/22] net: socket: add __sys_recvfrom() helper; remove in-kernel call to syscall Dominik Brodowski
                   ` (22 more replies)
  0 siblings, 23 replies; 26+ messages in thread
From: Dominik Brodowski @ 2018-03-16 17:05 UTC (permalink / raw)
  To: linux-kernel, torvalds, davem; +Cc: netdev

Here is another series of patches which reduce the number of syscall
invocations from within the kernel. This series is focused solely on
the net/ part of the kernel and get rids of syscall and compat_syscall
invocations from within the kernel completely. It is also available at

	https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git syscalls-net-next

The rationale of this change is described in patch 1 of part 1[*] as follows:

	The syscall entry points to the kernel defined by SYSCALL_DEFINEx()
	and COMPAT_SYSCALL_DEFINEx() should only be called from userspace
	through kernel entry points, but not from the kernel itself. This
	will allow cleanups and optimizations to the entry paths *and* to
	the parts of the kernel code which currently need to pretend to be
	userspace in order to make use of syscalls.

At present, these patches are based on v4.16-rc5; there is one trivial
conflict against net-next. Dave, I presume that you prefer to take them
through net-next? If you want to, I can re-base them against net-next.
If you prefer otherwise, though, I can route them as part of my whole
syscall series.

Thanks,
	Dominik

[*] The cover letter for v2 is available at
    http://lkml.kernel.org/r/20180315190529.20943-1-linux@dominikbrodowski.net ;
    the whole patchset -- in its current, slightly modified form -- is available at
    at https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git syscalls-next	

Dominik Brodowski (22):
  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

 include/linux/socket.h |  37 +++++++-
 net/compat.c           | 136 +++++++++++++++++++---------
 net/socket.c           | 234 ++++++++++++++++++++++++++++++++++---------------
 3 files changed, 291 insertions(+), 116 deletions(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2018-03-16 20:16 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-16 17:05 [PATCH -next 00/22] remove in-kernel syscall invocations (part 2 == netdev) Dominik Brodowski
2018-03-16 17:05 ` [PATCH -next 01/22] net: socket: add __sys_recvfrom() helper; remove in-kernel call to syscall Dominik Brodowski
2018-03-16 17:05 ` [PATCH -next 02/22] net: socket: add __sys_sendto() " Dominik Brodowski
2018-03-16 17:05 ` [PATCH -next 03/22] net: socket: add __sys_accept4() " Dominik Brodowski
2018-03-16 17:05 ` [PATCH -next 04/22] net: socket: add __sys_socket() " Dominik Brodowski
2018-03-16 17:05 ` [PATCH -next 05/22] net: socket: add __sys_bind() " Dominik Brodowski
2018-03-16 17:05 ` [PATCH -next 06/22] net: socket: add __sys_connect() " Dominik Brodowski
2018-03-16 17:05 ` [PATCH -next 07/22] net: socket: add __sys_listen() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 08/22] net: socket: add __sys_getsockname() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 09/22] net: socket: add __sys_getpeername() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 10/22] net: socket: add __sys_socketpair() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 11/22] net: socket: add __sys_shutdown() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 12/22] net: socket: add __sys_setsockopt() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 13/22] net: socket: add __sys_getsockopt() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 14/22] net: socket: add do_sys_recvmmsg() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 15/22] net: socket: move check for forbid_cmsg_compat to __sys_...msg() Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 16/22] net: socket: replace calls to sys_send() with __sys_sendto() Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 17/22] net: socket: replace call to sys_recv() with __sys_recvfrom() Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 18/22] net: socket: add __compat_sys_recvfrom() helper; remove in-kernel call to compat syscall Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 19/22] net: socket: add __compat_sys_setsockopt() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 20/22] net: socket: add __compat_sys_getsockopt() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 21/22] net: socket: add __compat_sys_recvmmsg() " Dominik Brodowski
2018-03-16 17:06 ` [PATCH -next 22/22] net: socket: add __compat_sys_...msg() helpers; remove in-kernel calls to compat syscalls Dominik Brodowski
2018-03-16 18:30 ` [PATCH -next 00/22] remove in-kernel syscall invocations (part 2 == netdev) David Miller
2018-03-16 19:39   ` Dominik Brodowski
2018-03-16 19:42   ` Linus Torvalds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.