Re: Process-wide watchpoints

From: Peter Zijlstra
Date: Thu Feb 04 2021 - 08:07:51 EST


On Thu, Feb 04, 2021 at 01:09:13PM +0100, Peter Zijlstra wrote:

> And I need to dig into that fcntl() crud again, see if that's capable of
> doing a SIGTRAP and if it's possible to target that to the task raising
> it, instead of doing a process wide signal delivery.

Hmm, so it might be possible to extend SETOWN_EX to allow
{F_OWNER_TID,0} to mean any current thread.

And I think SETSIG can be used to set SIGTRAP, although I don't see it
setting the fields you wanted, not entirely sure that's fixable.