Re: [PATCH v4 1/2] init: add sys-wrapper.h

From: Andrew Morton
Date: Sat Sep 18 2010 - 05:44:31 EST


On Sat, 18 Sep 2010 11:27:46 +0200 Arnd Bergmann <arnd@xxxxxxxx> wrote:

> On Friday 17 September 2010, Andrew Morton wrote:
> > > - int err = sys_mount(name, "/root", fs, flags, data);
> > > + int err = kernel_sys_mount(name, "/root", fs, flags, data);
> >
> > It would be good if we could arrange for all kernel syscalls to use
> > the wrappers. ie: cause a direct call to sys_mount() to not compile?
> >
> > I don't know how practical that would be.
>
> One common reason to call a sys_* function is to implement another
> system call, e.g. sys_socketcall calling sys_socket or
> compat_sys_timer_create calling sys_timer_create.
>
> I think in those cases we don't really want to go through another
> wrapper.

The overhead is zero in the case of sys_socket() and somewhat non-zero
in the case of sys_timer_create(). I can't immediately see a
convenient way of reducing "somewhat" to zero.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/