Re: [PATCH 1/1] ptrace: Get tracer PID without reliance on the proc FS

From: Eric W. Biederman
Date: Mon Sep 09 2024 - 13:58:52 EST


Oleg Nesterov <oleg@xxxxxxxxxx> writes:

> On 09/09, Eric W. Biederman wrote:
>>
>> I suspect the best way to support breakpoint_if_debugging (in the
>> general case) is to make them nop functions,
>
> or may be make it call a single function which can be used as a
> breakpoint placeholder.

That would be much simpler to implement.

> Either way, at least the program with breakpoint_if_debugging() will
> survive under /usr/bin/strace.

Yes, I can't imagine wanting any of that functionality to trigger
when it is just strace using ptrace on a program.

Eric