[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTimuRogA6St5GP0sRd1CY5u=jBABBg@mail.gmail.com>
Date: Tue, 21 Jun 2011 09:21:13 +0200
From: Tejun Heo <tj@...nel.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
torvalds@...ux-foundation.org, hch@...radead.org
Subject: Re: [PATCH 3/7] ptrace: move SIGTRAP on exec(2) logic to ptrace_event()
Hello,
On Mon, Jun 20, 2011 at 10:25 PM, Oleg Nesterov <oleg@...hat.com> wrote:
> Why does this make ptrace_event() smarter?
>
> OK, tracehooks should die. But why should we move this special case
> into ptrace_event? Say, a simple
>
> static inline void ptrace_exec_event(...)
> {
> if (!ptrace_event_enabled(PTRACE_EVENT_EXEC))
> send_sig(SIGTRAP, current, 0);
> else
> ptrace_event(PTRACE_EVENT_EXEC);
> }
>
> in fs/exec.c looks a bit better to me.
The intention is to concentrate ptrace specific logic in
ptrace_event(). We'll have more of them, mostly dependent on
PT_SEIZED and I don't think it's a good idea to scatter them across
the kernel. They're of no interest outside of ptrace after all. I
think it's better to have them collected in one place than scattered
around. The PT_SEIZED ones would probably have some commonalities
among them too.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists