Re: [PATCH v2 00/36] remove in-kernel syscall invocations (part 1)

From: Dominik Brodowski
Date: Fri Mar 16 2018 - 06:38:37 EST


On Fri, Mar 16, 2018 at 09:01:11AM +0000, Zhang, Ning A wrote:
> å 2018-03-15åç 20:04 +0100ïDominik Brodowskiåéï
> > Here is a re-spin of the first set of patches which reduce the number of
> > syscall invocations from within the kernel; the RFC may be found at
> >
> > The rationale for this change is described in patch 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.
>
> I think this is really bad to change syscalls one by one, to do_*
>
> why not change SYSCALL_DEFINEx to define kernel wrappers?

Basically, for two reasons: First, only a subset of all syscalls require
such wrappers -- only about a third of all syscalls are called from within
the kernel at the moment (rough guess). Second, and more important: We want
to reduce the amount of such usage; see, e.g., the messages by Christoph and
Arnd in this thread.

Thanks,
Dominik