From: Michael Kerrisk <mtk.manpages@gmail.com>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
Jan Kratochvil <jan.kratochvil@redhat.com>,
linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>,
Michael Kerrisk <mtk.manpages@googlemail.com>
Subject: Re: [PATCH] man ptrace: add extended description of various ptrace quirks
Date: Wed, 21 Sep 2011 07:10:44 +0200 [thread overview]
Message-ID: <CAKgNAkj8STLfO2t5gejct+yPFkFtFtojVkYKJREiE7S2QHSctg@mail.gmail.com> (raw)
In-Reply-To: <20110721165137.GA21345@redhat.com>
Denys,
On Thu, Jul 21, 2011 at 6:51 PM, Oleg Nesterov <oleg@redhat.com> wrote:
> 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.
Does your patch need any revision in the light of Oleg's comments?
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
next prev parent reply other threads:[~2011-09-21 5:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-21 11:09 Denys Vlasenko
2011-07-21 16:51 ` Oleg Nesterov
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 ` Michael Kerrisk [this message]
2011-09-23 9:31 ` [PATCH] man ptrace: add extended description of various ptrace quirks 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=CAKgNAkj8STLfO2t5gejct+yPFkFtFtojVkYKJREiE7S2QHSctg@mail.gmail.com \
--to=mtk.manpages@gmail.com \
--cc=jan.kratochvil@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@googlemail.com \
--cc=oleg@redhat.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
all inboxes | Powered by JetHome®