On 04/11, Victor Kamensky wrote:
On 10 April 2014 21:36, David Miller davem@davemloft.net wrote:
You really need to pass the proper VMA down to the call site rather than pass NULL, that's extremely ugly and totally unnecesary.
Agreed that VMA is really needed.
I do not ;) but I am still trying to finish my email...
index 04709b6..1ae4563 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -117,6 +117,7 @@ struct xol_area { * the vma go away, and we must handle that reasonably gracefully. */ unsigned long vaddr; /* Page(s) of instruction slots */
- struct vm_area_struct *vma; /* VMA that holds above address */
};
/* @@ -1150,6 +1151,7 @@ static int xol_add_vma(struct mm_struct *mm, struct xol_area *area)
ret = install_special_mapping(mm, area->vaddr, PAGE_SIZE, VM_EXEC|VM_MAYEXEC|VM_DONTCOPY|VM_IO, &area->page);
- area->vma = find_vma(mm, area->vaddr);
No, this can't work. This vma can be unmapped/freed/etc.
Oleg.