Subject: Re: linux-next: add utrace tree

From: Peter Zijlstra <[email-masked]>
Date: Wed, 27 Jan 2010 11:58:06 +0100

On Wed, 2010-01-27 at 11:55 +0100, Peter Zijlstra wrote:
> Right, so there's two aspects:
> 
>  1) concurrency when inserting the probe
>  2) concurrency when hitting the probe
> 
> 1) used to be dealt with by using utrace to stop all threads in the
> process and then writing the instruction. I suggested to CoW the page,
> modify the instruction, set the pagetable and flush tlbs at full speed
> -- the very thing you suggest here. 

Also, since executable maps are typically MAP_PRIVATE, you have to CoW
anyway in order to modify it and I would exclude MAP_SHARED from being
probable because then the modification could seep through into whatever
was backing that thing.