Messages in this thread | | | Date | Thu, 23 Apr 2009 17:16:33 +0200 | From | Oleg Nesterov <> | Subject | Q: ptrace_signal() && PTRACE_SETSIGINFO (Was: SIGSTOP && ptrace) |
| |
ptrace_signal:
signr = current->exit_code;
/* Update the siginfo structure if the signal has changed. If the debugger wanted something specific in the siginfo structure then it should have updated *info via PTRACE_SETSIGINFO. */
Yes. PTRACE_SETSIGINFO can change *info if debugger wants something special. But then we do:
if (signr != info->si_signo) { info->si_signo = signr; info->si_errno = 0; info->si_code = SI_USER; info->si_pid = task_pid_vnr(current->parent); info->si_uid = task_uid(current->parent); }
Why? If the tracer changes ->exit_code it should know what it does. Why do we reset *info?
But the real question, how can PTRACE_SETSIGINFO change ->si_signo (for example, for do_signal_stop(si_signo)) if this in fact is not allowed?
Oleg.
| |