From: Prasanna Meda <pmeda@akamai.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ptrace: locked accesss to ptrace last_siginfo
Date: Mon, 22 Nov 2004 19:16:22 -0800 [thread overview]
Message-ID: <41A2AB86.E4324753@akamai.com> (raw)
In-Reply-To: 200411200309.TAA20975@allur.sanmateo.akamai.com
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.
prev parent reply other threads:[~2004-11-23 2:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-20 3:09 [PATCH] ptrace: locked accesss to ptrace last_siginfo pmeda
2004-11-23 3:16 ` Prasanna Meda [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41A2AB86.E4324753@akamai.com \
--to=pmeda@akamai.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.