Re: [PATCH 4/5] uprobes: kill copy_vma()->uprobe_mmap()

2012-07-13 Thread Srikar Dronamraju
* Oleg Nesterov [2012-07-08 22:30:08]: > Kill copy_vma()->uprobe_mmap(new_vma), it is absolutely wrong. > > This new_vma was just initialized to represent the new unmapped area, > [vm_start, vm_end) was returned by get_unmapped_area() in the caller. > > This means that

Re: [PATCH 4/5] uprobes: kill copy_vma()-uprobe_mmap()

2012-07-13 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-07-08 22:30:08]: Kill copy_vma()-uprobe_mmap(new_vma), it is absolutely wrong. This new_vma was just initialized to represent the new unmapped area, [vm_start, vm_end) was returned by get_unmapped_area() in the caller. This means that

Re: [PATCH 4/5] uprobes: kill copy_vma()->uprobe_mmap()

2012-07-09 Thread Oleg Nesterov
On 07/09, Peter Zijlstra wrote: > > On Sun, 2012-07-08 at 22:30 +0200, Oleg Nesterov wrote: > > And why this uprobe_mmap() was added? I believe the intent was wrong. > > Note that the caller is going to do move_page_tables(), all registered > > uprobes are already faulted in, we only change the

Re: [PATCH 4/5] uprobes: kill copy_vma()->uprobe_mmap()

2012-07-09 Thread Peter Zijlstra
On Sun, 2012-07-08 at 22:30 +0200, Oleg Nesterov wrote: > And why this uprobe_mmap() was added? I believe the intent was wrong. > Note that the caller is going to do move_page_tables(), all registered > uprobes are already faulted in, we only change the virtual addresses. > I think it was

Re: [PATCH 4/5] uprobes: kill copy_vma()-uprobe_mmap()

2012-07-09 Thread Peter Zijlstra
On Sun, 2012-07-08 at 22:30 +0200, Oleg Nesterov wrote: And why this uprobe_mmap() was added? I believe the intent was wrong. Note that the caller is going to do move_page_tables(), all registered uprobes are already faulted in, we only change the virtual addresses. I think it was because of

Re: [PATCH 4/5] uprobes: kill copy_vma()-uprobe_mmap()

2012-07-09 Thread Oleg Nesterov
On 07/09, Peter Zijlstra wrote: On Sun, 2012-07-08 at 22:30 +0200, Oleg Nesterov wrote: And why this uprobe_mmap() was added? I believe the intent was wrong. Note that the caller is going to do move_page_tables(), all registered uprobes are already faulted in, we only change the virtual

[PATCH 4/5] uprobes: kill copy_vma()->uprobe_mmap()

2012-07-08 Thread Oleg Nesterov
Kill copy_vma()->uprobe_mmap(new_vma), it is absolutely wrong. This new_vma was just initialized to represent the new unmapped area, [vm_start, vm_end) was returned by get_unmapped_area() in the caller. This means that uprobe_mmap()->get_user_pages() will fail for sure, simply because find_vma()

[PATCH 4/5] uprobes: kill copy_vma()-uprobe_mmap()

2012-07-08 Thread Oleg Nesterov
Kill copy_vma()-uprobe_mmap(new_vma), it is absolutely wrong. This new_vma was just initialized to represent the new unmapped area, [vm_start, vm_end) was returned by get_unmapped_area() in the caller. This means that uprobe_mmap()-get_user_pages() will fail for sure, simply because find_vma()