Re: [RFC] [PATCH 2.6.37-rc5-tip 5/20] 5: Uprobes: register/unregister probes.
From: Peter Zijlstra <peterz@infradead.org>
Date: 2011-01-27 10:29:11
Also in:
lkml
On Thu, 2011-01-27 at 15:31 +0530, Srikar Dronamraju wrote:
quoted
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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>