Re: [PATCH] arch_ptrace_stop

2007-12-16 Thread Oleg Nesterov
Roland, I am sorry for delay, On 12/13, Roland McGrath wrote: > > > Currently ptrace_stop() schedules in TASK_TRACED state even if we have a > > pending SIGKILL. With this patch this is still possible, but unless > > arch_ptrace_stop_needed() is true and thus we will check sigkill_pending(). > > C

Re: [PATCH] arch_ptrace_stop

2007-12-13 Thread Roland McGrath
> How is it possible that SIGKILL is blocked? It is probably not possible here. It's impossible for normal user threads, and kernel threads or ones doing something weird inside the kernel can probably never get here. But I'm just not trying to rely on any fancy guarantees here. In this change I

Re: [PATCH] arch_ptrace_stop

2007-12-13 Thread Oleg Nesterov
On 12/13, Matthew Wilcox wrote: > > On Thu, Dec 13, 2007 at 08:29:26PM +0300, Oleg Nesterov wrote: > > How is it possible that SIGKILL is blocked? > > I *think* it's possible that kernel threads may block SIGKILL. > And I think init (pid 1) gets SIGKILL blocked. Yes. But this shouldn't matter bec

Re: [PATCH] arch_ptrace_stop

2007-12-13 Thread Matthew Wilcox
On Thu, Dec 13, 2007 at 08:29:26PM +0300, Oleg Nesterov wrote: > How is it possible that SIGKILL is blocked? I *think* it's possible that kernel threads may block SIGKILL. And I think init (pid 1) gets SIGKILL blocked. -- Intel are signing my paycheques ... these opinions are still mine "Bill, l

Re: [PATCH] arch_ptrace_stop

2007-12-13 Thread Oleg Nesterov
Roland McGrath wrote: > > +static int sigkill_pending(struct task_struct *tsk) > +{ > + return ((sigismember(&tsk->pending.signal, SIGKILL) || > + sigismember(&tsk->signal->shared_pending.signal, SIGKILL)) && > + !unlikely(sigismember(&tsk->blocked, SIGKILL))); > +} Ho

Re: [PATCH] arch_ptrace_stop

2007-12-12 Thread Roland McGrath
> Mutter. These would be better as static inlines. A macro just invites > variable-unused warnings on non-ia64 and outright compilation errors on > ia64. Speaking from experience... > > static inline void arch_ptrace_stop(int exit_code, siginfo_t *info) > { > } > #define arch_ptrace_stop arch_p

Re: [PATCH] arch_ptrace_stop

2007-12-11 Thread Andrew Morton
On Fri, 7 Dec 2007 17:11:52 -0800 (PST) Roland McGrath <[EMAIL PROTECTED]> wrote: > > This adds support to allow asm/ptrace.h to define two new macros, > arch_ptrace_stop_needed and arch_ptrace_stop. These control special > machine-specific actions to be done before a ptrace stop. The new > c

[PATCH] arch_ptrace_stop

2007-12-07 Thread Roland McGrath
This adds support to allow asm/ptrace.h to define two new macros, arch_ptrace_stop_needed and arch_ptrace_stop. These control special machine-specific actions to be done before a ptrace stop. The new code compiles away to nothing when the new macros are not defined. This is the case on all machi