lkml.org 
[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Process-wide watchpoints
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.

\
 
 \ /
  Last update: 2021-02-04 14:12    [W:0.170 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site