From: Oleg Nesterov <oleg@redhat.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Sergei Zhirikov <sfzhi@yahoo.com>,
linux-man@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Checking for support of ptrace(PTRACE_SEIZE,...) on older kernels
Date: Tue, 18 Apr 2023 09:54:42 +0200 [thread overview]
Message-ID: <20230418075442.GA19412@redhat.com> (raw)
In-Reply-To: <88991b38-26f5-e060-3a29-5f17c5fc85df@gmail.com>
Hi Alejandro,
On 04/17, Alejandro Colomar wrote:
>
> On 4/17/23 13:50, Oleg Nesterov wrote:
> > Well, from https://man7.org/linux/man-pages/man2/ptrace.2.html
> >
> > ESRCH The specified process does not exist, or is not currently
> > being traced by the caller, or is not stopped (for
> > requests that require a stopped tracee).
> >
> > so if the kernel doesn't support PTRACE_SEIZE then ptrace(PTRACE_SEIZE)
> > should fail with -ESRCH as documented.
> >
> > Perhaps this part
> >
> > EIO request is invalid, or ...
> >
> > can be improvef a bit to explain that this happens if the target is already
> > traced by us and stopped.
>
> I'm not sure if it's necessary. When several errors happen at the same time,
> there's usually no documentation about which takes precedence, with few
> exceptions.
Yes, agreed.
I just tried to understand where did this ESRCH/EIO confusion come from.
Oleg.
prev parent reply other threads:[~2023-04-18 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <997950238.3486335.1681414225118.ref@mail.yahoo.com>
[not found] ` <997950238.3486335.1681414225118@mail.yahoo.com>
2023-04-14 19:53 ` Checking for support of ptrace(PTRACE_SEIZE,...) on older kernels Alejandro Colomar
2023-04-17 11:50 ` Oleg Nesterov
2023-04-17 18:46 ` Alejandro Colomar
2023-04-18 7:54 ` Oleg Nesterov [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=20230418075442.GA19412@redhat.com \
--to=oleg@redhat.com \
--cc=alx.manpages@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=sfzhi@yahoo.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