lkml.org 
[lkml]   [2004]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ptrace: locked accesss to ptrace last_siginfo
pmeda@akamai.com wrote:

> ptrace_setsiginfo/ptrace_getsiginfo need to do locked access
> to last_siginfo. ptrace_notify()/ptrace_stop() sets the
> current->last_siginfo and sleeps on schedule(). It can be waked
> up by kill signal from signal_wake_up before debugger wakes it up.
> On return from schedule(), the current->last_siginfo is reset.

Roland's TASK_TRACED state fixes invalidates this claim. Too
early to report. SIGKILLs are queued, and process is not wakedup.

example:
29015: ptrace PTRACE_TRACEME returned:0
State of tracee as seen by tracer:
State: T (tracing stop)
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
Tracer:29014 ptrace(first PTRACE_CONT, 29015) returns 0
Tracer:29014 ptrace(second PTRACE_CONT, 29015) returns -1
ptrace PTRACE_CONT: No such process
Tracer:29014 got notifcation from tracee:29015, i.e. child:29015
Tracer:29014 ptrace(third PTRACE_CONT, 29015) returns 0
Tracer:29014 got notifcation from tracee:29015, i.e. child:29015

State of tracee before killing as seen by middleman:
State: T (tracing stop)
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
29019: kill(29015, SIGCONT) returns 0
State of tracee after killing as seen by middleman:
State: T (tracing stop)
SigPnd: 0000000000000000
ShdPnd: 0000000000020000
29019: kill(29015, SIGKILL) returns 0
State of tracee after killing as seen by middleman:
State: T (tracing stop)
SigPnd: 0000000000000000
ShdPnd: 0000000000020100

29019: kill(29015, probe) returns 0
wait for 29019 ...returns 29019


Thanks,
Prasanna.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.034 / U:2.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site