From: Peter Zijlstra <peterz@infradead.org>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Will Deacon <will@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Matt Morehouse <mascasa@google.com>
Subject: Re: Process-wide watchpoints
Date: Thu, 4 Feb 2021 14:45:40 +0100 [thread overview]
Message-ID: <YBv6hG0lD8bsiGG/@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CACT4Y+ZbWMa7zsa84dOBZ0C0Qgik2uDST+bzX=TrSU6vFXkkCQ@mail.gmail.com>
On Thu, Feb 04, 2021 at 02:35:36PM +0100, Dmitry Vyukov wrote:
> On Thu, Feb 4, 2021 at 2:10 PM Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > On Thu, Feb 04, 2021 at 01:53:59PM +0100, Dmitry Vyukov wrote:
> > > Humm... I was thinking of perf_event_open(pid == 0).
> > > It does not make sense to send SIGTRAP in a remote process, because it
> > > does not necessarily cooperate with us.
> > >
> > > But is there any problem with clone w/o CLONE_THREAD? Assuming the
> > > current process has setup the signal handler, the child will have the
> > > same handler and the same code/address space. So delivery of SIGTRAP
> > > should work the same way in the child.
> >
> > Nothing should be doing CLONE_VM without CLONE_THREAD. Yes, it's
> > possible, but if you do so, you get to keep the pieces IMO.
> >
> > Current libc either does a full clone (fork) or pthread_create,
> > pthread_create does CLONE_THREAD.
>
> I meant a different thing.
> I meant that we could restrict synchronous SIGTRAP for (1)
> perf_event_open(pid != 0) and (2) disable it after exec.
Ah, I figured a generic means to inherit across a process, but not a
process tree might be useful.
I don't much like magical/implied constraints.
> What is the issue here for clone without CLONE_THREAD?
It's an abomination that's possible and an endless cause of trouble :/
next prev parent reply other threads:[~2021-02-04 13:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 7:46 Dmitry Vyukov
2020-11-12 10:31 ` Peter Zijlstra
2020-11-12 10:43 ` Dmitry Vyukov
[not found] ` <CACT4Y+bW1gpv8bz0vswaVUt-OB07oJ3NBeTi+vchAe8TTWK+mg@mail.gmail.com>
[not found] ` <CACT4Y+ZsKXfAxrzJGQc5mJ+QiP5sAw7zKWtciS+07qZzSf33mw@mail.gmail.com>
2021-02-01 8:50 ` Dmitry Vyukov
2021-02-03 12:29 ` Peter Zijlstra
2021-02-03 12:49 ` Dmitry Vyukov
2021-02-03 12:50 ` Dmitry Vyukov
2021-02-03 13:37 ` Peter Zijlstra
2021-02-04 8:10 ` Dmitry Vyukov
2021-02-04 9:38 ` Peter Zijlstra
2021-02-04 9:54 ` Dmitry Vyukov
2021-02-04 12:09 ` Peter Zijlstra
2021-02-04 12:53 ` Dmitry Vyukov
2021-02-04 13:10 ` Peter Zijlstra
2021-02-04 13:35 ` Dmitry Vyukov
2021-02-04 13:45 ` Peter Zijlstra [this message]
2021-02-04 14:59 ` Peter Zijlstra
2021-02-04 13:33 ` Peter Zijlstra
2021-02-04 13:37 ` Dmitry Vyukov
2021-02-04 13:06 ` Peter Zijlstra
2021-02-03 5:38 ` Namhyung Kim
2021-02-04 8:10 ` Dmitry Vyukov
2021-02-03 12:22 ` Peter Zijlstra
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=YBv6hG0lD8bsiGG/@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=dvyukov@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mascasa@google.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®