Re: [RFC] [PATCH 2.6.37-rc5-tip 5/20] 5: Uprobes:register/unregister probes.

From: Peter Zijlstra
Date: Thu Jan 27 2011 - 05:30:16 EST

On Thu, 2011-01-27 at 15:31 +0530, Srikar Dronamraju wrote:
> > You can, if only to wreck your thing, you can call mmap() as often as
> > you like (until your virtual memory space runs out) and get many many
> > mapping of the same file.
> >
> > It doesn't need to make sense to the linker, all it needs to do is
> > confuse your code ;-)
> Currently if there are multiple mappings of the same executable
> code, only one mapped area would have the breakpoint inserted.

Right, so you could use it to make debugging harder..

> If the code were to execute from some other mapping, then it would
> work as if there are no probes. However if the code from the
> mapping that had the breakpoint executes then we would see the
> probes.
> If we want to insert breakpoints in each of the maps then we
> would have to extend mm->uprobes_vaddr.
> Do you have any other ideas to tackle this?

Supposing I can get my preemptible mmu patches anywhere.. you could
simply call install_uprobe() while holding the i_mmap_mutex ;-)

> Infact do you think we should be handling this case?

I'm really not sure how often this would happen, but dealing with it
sure makes me feel better..
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at