lkml.org 
[lkml]   [2009]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectQ: 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.



\
 
 \ /
  Last update: 2009-04-23 17:23    [W:0.051 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site