From: Oleg Nesterov <oleg@redhat.com>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: mtk.manpages@gmail.com,
Jan Kratochvil <jan.kratochvil@redhat.com>,
linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] man ptrace: add extended description of various ptrace quirks
Date: Thu, 21 Jul 2011 18:51:37 +0200 [thread overview]
Message-ID: <20110721165137.GA21345@redhat.com> (raw)
In-Reply-To: <CAK1hOcPFXMoYsP6N6Hx5Qz3J4xj31TmSj7xo6SRVPegNCbhx7g@mail.gmail.com>
On 07/21, Denys Vlasenko wrote:
>
> Deleted several outright false statements:
> - pid 1 can be traced
> - tracer is not shown as parent in ps output
> - PTRACE_ATTACH is not "the same behavior as if tracee had done
> a PTRACE_TRACEME": PTRACE_ATTACH delivers a SIGSTOP.
> - SIGSTOP _can_ be injected.
Yes, this is correct, thanks.
> +Tracer can not assume that tracee ALWAYS ends its life by reporting
> +WIFEXITED(status) or WIFSIGNALED(status).
> +.LP
> +.\" or can it? Do we include such a promise into ptrace API?
IIRC, we already discussed this... The traced group leader can
disappear during mt-exec, otherwise the tracee can never go away
silently.
> +Tracer can kill a tracee with ptrace(PTRACE_KILL, pid, 0, 0). This
> +operation is deprecated, use kill(SIGKILL) or tgkill(SIGKILL) instead.
> +The problem with this operation is that it requires tracee to be in
> +signal-delivery-stop, otherwise it may not work (may complete
> +successfully but won't kill the tracee),
In short, ptrace(PTRACE_KILL) is more or less ptrace(PTRACE_CONT, SIGKILL),
but it always returns 0. IOW, it never worked as decribed in the man
page. And I guess today nobody can explain why PTRACE_KILL exists.
Oleg.
next prev parent reply other threads:[~2011-07-21 17:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-21 11:09 [PATCH] man ptrace: add extended description of various ptrace quirks Denys Vlasenko
2011-07-21 16:51 ` Oleg Nesterov [this message]
2011-07-21 18:00 ` [PATCH 0/1] (Was: man ptrace: add extended description of various ptrace quirks) Oleg Nesterov
2011-07-21 18:00 ` [PATCH 1/1] ptrace: do_wait(traced_leader_killed_by_mt_exec) can block forever Oleg Nesterov
2011-07-22 8:44 ` Tejun Heo
2011-09-21 5:10 ` [PATCH] man ptrace: add extended description of various ptrace quirks Michael Kerrisk
2011-09-23 9:31 ` Denys Vlasenko
2011-09-25 6:10 ` Michael Kerrisk
2011-09-29 19:08 ` Michael Kerrisk
2011-09-30 14:14 ` Denys Vlasenko
2011-10-03 5:27 ` Michael Kerrisk
2012-02-13 22:02 ` Denys Vlasenko
2012-02-26 18:25 ` Michael Kerrisk
2012-02-26 18:42 ` Michael Kerrisk
2012-02-27 0:58 ` Denys Vlasenko
2012-03-05 17:33 ` Michael Kerrisk (man-pages)
2011-09-30 14:28 ` Denys Vlasenko
2011-10-03 5:35 ` Michael Kerrisk
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=20110721165137.GA21345@redhat.com \
--to=oleg@redhat.com \
--cc=jan.kratochvil@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=tj@kernel.org \
--cc=vda.linux@googlemail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox