Re: [PATCH 62] introduce ptrace_rw_siginfo() helper

2009-10-07 Thread Roland McGrath
+static int ptrace_rw_siginfo(struct task_struct *tracee, + struct ptrace_context *context, + siginfo_t *info, bool write) +{ + unsigned long flags; + siginfo_t *context_info; + int err = -ESRCH; + + if

Re: [PATCH 62] introduce ptrace_rw_siginfo() helper

2009-10-07 Thread Roland McGrath
I don't think this can work. context-siginfo can be cleared and then set again in between. If we race with SIGKILL, utrace_get_signal() can dequeue another signal != SIGKILL and start the reporting loop. That's not supposed to be possible. See sigset_t sigkill_only; et al. I guess it is

[PATCH 62] introduce ptrace_rw_siginfo() helper

2009-10-02 Thread Oleg Nesterov
A separate patch to discuss the comments/naming. Introduce the new helper, ptrace_rw_siginfo(), to access context-siginfo. It assumes the tracee must have the valid -siginfo != NULL unless we race with SIGKILL, see the next patches. --- kernel/ptrace.c | 37