From: Oleg Nesterov <oleg@redhat.com>
To: Roman Kisel <romank@linux.microsoft.com>
Cc: akpm@linux-foundation.org, apais@microsoft.com,
benhill@microsoft.com, ebiederm@xmission.com,
linux-kernel@vger.kernel.org, ssengar@microsoft.com,
sunilmut@microsoft.com, torvalds@linux-foundation.org,
vdso@hexbites.dev, workingjubilee@gmail.com
Subject: Re: [PATCH 1/1] ptrace: Get tracer PID without reliance on the proc FS
Date: Wed, 11 Sep 2024 21:53:38 +0200 [thread overview]
Message-ID: <20240911195311.GA16757@redhat.com> (raw)
In-Reply-To: <20240911174107.1217693-1-romank@linux.microsoft.com>
Roman,
I can only repeat that we can't understand each other. Quite possibly my bad.
On 09/11, Roman Kisel wrote:
>
> On 09/11, Oleg Nesterov wrote:
>
> > On 09/10, Roman Kisel wrote:
> > >
> > > On 09/09, Oleg wrote:
> > >
> >
> > > > Yet another thing in this discussion I can't understand... sorry, I tried.
> > > > You do not need to teach, say, gdb to recognize this pattern. You can just do
> > > >
> > > > $ gdb -ex 'b please_insert_the_breakpoint_here' ...
> > > >
> > > > Nevermind, as I have already said you can safely ignore me. I still do not
> > > > see any "real" use-case for breakpoint_if_debugging(), but I guess that is
> > > > due to my ignorance and lack of imagination.
> > >
> > > I've started this so let me butt in and take up the gaunlet.
> > >
> > > Lambda's would be the most prominent example to me[1]. The toolchain
> > > doesn't give them the user-accesible type and the name as it does for
> > > the functions.
> >
> > And?
>
> You wanted an example of '"real" use-case for breakpoint_if_debugging()':
Then why does your email explain that c++ lambdas don't have a good name?
Why doesi it mention lambdas at all?
> > > > Nevermind, as I have already said you can safely ignore me. I still do not
> > > > see any "real" use-case for breakpoint_if_debugging(), but I guess that is
> > > > due to my ignorance and lack of imagination.
>
> I have provided them, and illustrated how it is tiresome to set the breakpoint
> in the debugger in these cases so can add a call to breakpoint_if_debugging()
> to these places instead.
Instead of what??? Instead of
#define breakpoint_if_debugging() \
asm volatile ("call please_insert_the_breakpoint_here" : ASM_CALL_CONSTRAINT);
plus -ex 'b please_insert_the_breakpoint_here'???
If you say that this is ugly I won't even argue. But instead of what?
Roman, I am leaving this thread, sorry. But let me try to summarize.
Your patch was buggy and you seem to agree. Feel free to send V2 and I will
be happy to review it correctness-wise. But:
- please keep Eric/Linus cc'ed
- 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.
If possible, please provide a clear/simple/artificial/whatever example
of the (pseudo)code which can justify this feature.
Oleg.
next prev parent reply other threads:[~2024-09-11 19:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 8:45 [PATCH 1/1] ptrace: Get tracer PID without reliance on the proc FS Jubilee Young
2024-09-09 19:37 ` Oleg Nesterov
2024-09-10 15:40 ` Roman Kisel
2024-09-11 14:44 ` Oleg Nesterov
2024-09-11 17:41 ` Roman Kisel
2024-09-11 19:53 ` Oleg Nesterov [this message]
2024-09-11 19:57 ` Linus Torvalds
2024-09-11 20:14 ` Oleg Nesterov
2024-09-11 20:25 ` Roman Kisel
2024-09-10 16:34 ` Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2024-09-05 21:27 [PATCH 0/1] " Roman Kisel
2024-09-05 21:27 ` [PATCH 1/1] ptrace: " Roman Kisel
2024-09-06 11:24 ` Oleg Nesterov
2024-09-06 11:48 ` Oleg Nesterov
2024-09-06 19:09 ` Linus Torvalds
2024-09-06 20:08 ` Roman Kisel
2024-09-06 20:26 ` Linus Torvalds
2024-09-06 21:15 ` Roman Kisel
2024-09-09 16:18 ` Eric W. Biederman
2024-09-09 17:05 ` Oleg Nesterov
2024-09-09 17:34 ` Eric W. Biederman
2024-09-09 17:22 ` Roman Kisel
2024-09-06 20:55 ` Oleg Nesterov
2024-09-06 21:25 ` Roman Kisel
2024-09-08 14:08 ` Oleg Nesterov
2024-09-09 15:19 ` Roman Kisel
2024-09-09 16:42 ` Oleg Nesterov
2024-09-09 17:05 ` Roman Kisel
2024-09-07 19:33 ` kernel test robot
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=20240911195311.GA16757@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=apais@microsoft.com \
--cc=benhill@microsoft.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=romank@linux.microsoft.com \
--cc=ssengar@microsoft.com \
--cc=sunilmut@microsoft.com \
--cc=torvalds@linux-foundation.org \
--cc=vdso@hexbites.dev \
--cc=workingjubilee@gmail.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