[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230418075442.GA19412@redhat.com>
Date: Tue, 18 Apr 2023 09:54:42 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Alejandro Colomar <alx.manpages@...il.com>
Cc: Sergei Zhirikov <sfzhi@...oo.com>, linux-man@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: Checking for support of ptrace(PTRACE_SEIZE,...) on older kernels
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.
Powered by blists - more mailing lists