public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: Oleg Nesterov <oleg@redhat.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: Mon, 17 Apr 2023 20:46:51 +0200	[thread overview]
Message-ID: <88991b38-26f5-e060-3a29-5f17c5fc85df@gmail.com> (raw)
In-Reply-To: <20230417115009.GA906@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 961 bytes --]

Hi Oleg,

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.  Knowing it's intentional, I'm content.

Thanks,

Alex

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-04-17 18:47 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 [this message]
2023-04-18  7:54         ` Oleg Nesterov

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=88991b38-26f5-e060-3a29-5f17c5fc85df@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=oleg@redhat.com \
    --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