mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC PATCH 01/35] syscalls: define goal to not call sys_xyzzy() from within the kernel
Date: Mon, 12 Mar 2018 08:27:49 +0100	[thread overview]
Message-ID: <20180312072749.5kerpqmvmg4gjagh@gmail.com> (raw)
In-Reply-To: <CALCETrV3gUrL3fpr5EEjMyoWtj5t64hpYxjO+qJfUVTq7z1rNQ@mail.gmail.com>


* Andy Lutomirski <luto@kernel.org> wrote:

> On Sun, Mar 11, 2018 at 10:55 AM, Dominik Brodowski
> <linux@dominikbrodowski.net> wrote:
> > 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.
> >
> 
> > +
> > +/*
> > + * The kernel should not use call syscalls (i.e., sys_xyzyyz()) directly.
> > + * Instead, use one of the following functions which work equivalent to
> > + * the syscall they are named for.
> 
> "Instead, use one of the functions which work equivalently, e.g. do_xysyyz()"

The previous sentence has a typo as well, should be:

  * Kernel code should not call syscalls (i.e., sys_xyzyyz()) directly.

or so.

Thanks,

	Ingo

  reply	other threads:[~2018-03-12  7:27 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11 10:55 [RFC PATCH 00/35] remove in-kernel syscall invocations Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 01/35] syscalls: define goal to not call sys_xyzzy() from within the kernel Dominik Brodowski
2018-03-11 15:24   ` Andy Lutomirski
2018-03-12  7:27     ` Ingo Molnar [this message]
2018-03-12 19:14     ` Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 02/35] syscalls: use kernel_wait4() instead of sys_wait4() Dominik Brodowski
2018-03-12  7:29   ` Ingo Molnar
2018-03-11 10:55 ` [RFC PATCH 03/35] syscalls: mm_release(): use do_futex() instead of sys_futex() Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 04/35] syscalls: do not call sys_getpgid() within the kernel Dominik Brodowski
2018-03-12  8:35   ` Christoph Hellwig
2018-03-12 20:01     ` Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 05/35] syscalls: do not call sys_readlinkat() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 06/35] syscalls: do not call sys_pipe2() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 07/35] syscalls: do not call sys_renameat2() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 08/35] syscalls: do not call sys_futimesat() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 09/35] syscalls: do not call sys_epoll_*() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 10/35] syscalls: do not call sys_signalfd4() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 11/35] syscalls: do not call sys_eventfd2() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 12/35] syscalls: do not call sys_rt_sigpending() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 13/35] syscalls: do not call sys_ioperm() " Dominik Brodowski
2018-03-11 15:20   ` Andy Lutomirski
2018-03-15 16:43   ` Greg Kroah-Hartman
2018-03-11 10:55 ` [RFC PATCH 14/35] syscalls: do not call sys_mount() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 15/35] syscalls: do not call sys_umount() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 16/35] syscalls: do not call sys_dup{,3}() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 17/35] syscalls: do not call sys_chroot() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 18/35] syscalls: do not call sys_write() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 19/35] syscalls: do not call sys_unshare() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 20/35] syscalls: do not call sys_fadvise64{,_64}() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 21/35] syscalls: do not call sys_mmap_pgoff() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 22/35] syscalls: do not call sys_chdir() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 23/35] syscalls: do not call sys_sync_file_range() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 24/35] syscalls: do not call sys_unlink() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 25/35] hostfs: rename do_rmdir() to hostfs_do_rmdir() Dominik Brodowski
2018-03-11 11:19   ` Richard Weinberger
2018-03-11 10:55 ` [RFC PATCH 26/35] syscalls: do not call sys_rmdir() within the kernel Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 27/35] syscalls: do not call sys_mkdir{,at}() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 28/35] syscalls: do not call sys_symlink{,at}() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 29/35] syscalls: do not call sys_mknod{,at}() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 30/35] syscalls: do not call sys_link{,at}() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 31/35] syscalls: do not call sys_{f,}chmod{at,}() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 32/35] syscalls: do not call sys_{f,}access{,at}() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 33/35] syscalls: do not call sys_ftruncate() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 34/35] syscalls: do not call sys_{,l,f}chown() " Dominik Brodowski
2018-03-11 10:55 ` [RFC PATCH 35/35] syscalls: do not call sys_close() " Dominik Brodowski
2018-03-12  7:37   ` Ingo Molnar
2018-03-12 19:43     ` Dominik Brodowski
2018-03-13  5:46       ` Ingo Molnar
2018-03-11 20:15 ` [RFC PATCH 00/35] remove in-kernel syscall invocations Linus Torvalds
2018-03-12 21:39   ` Dominik Brodowski
2018-03-12  7:32 ` Ingo Molnar
2018-03-12 19:30   ` Dominik Brodowski
2018-03-13  5:48     ` Ingo Molnar

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=20180312072749.5kerpqmvmg4gjagh@gmail.com \
    --to=mingo@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=luto@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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: link
Be 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

Powered by JetHome