Re: [PATCH consolidate sys_ptrace

Christoph Hellwig
2005-11-05T00:19:30Z

On Tue, Nov 01, 2005 at 11:37:54AM +0000, David Howells wrote:
> Christoph Hellwig <hch@lst.de> wrote:
>
> > > The sys_ptrace boilerplate code (everything outside the big switch
> > > statement for the arch-specific requests) is shared by most
> > > architectures. This patch moves it to kernel/ptrace.c and leaves the
> > > arch-specific code as arch_ptrace.
>
> Looks okay to me. I do have a concern about all the extra indirections we're
> acquiring by this mad rush to centralise everything. It's going to slow things
> down and consume more stack space. Is there any way we can:
>
> (1) Make a sys_ptrace() *jump* to arch_ptrace() instead of calling it, thus
> obviating the extra return step.
>
> (2) Drop the use of lock_kernel().
>
> Otherwise, the patch looks valid:

As BKL usage indicates this is a real slowpath. No one cares about one
function call or less here.