Re: [PATCH 1/1] ptrace: Get tracer PID without reliance on the proc FS
From: Linus Torvalds
Date: Wed Sep 11 2024 - 15:57:56 EST
On Wed, 11 Sept 2024 at 12:54, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> - please try to make your changelog more convincing. And in particular,
> please explain why !!current->ptrace is not enough and this feature
> needs the tracer's pid.
Oleg, I realize you like the simpler patch that only has that
"!!current->ptrace", but my point is that even that simpler patch is
simply WRONG, WRONG, WRONG.
There is simply no valid situation where a "I have a tracer" is a good
thing to test for.
Whether it then gives just that "tracer exists" information, or the
pid of the tracer, or a proper pidfd that is actually reliable, is
then entirely immaterial. The whole feature fails at an earlier and
more fundamental point.
Linus