uprobes: Teach __create_xol_area() to accept the predefined vaddr
authorOleg Nesterov <oleg@redhat.com>
Sun, 13 Oct 2013 19:18:38 +0000 (21:18 +0200)
committerOleg Nesterov <oleg@redhat.com>
Tue, 29 Oct 2013 17:02:51 +0000 (18:02 +0100)
commitaf0d95af79773f7637107cd3871aaabcb425f15a
tree0d71695828416dd2bf157dccd608434bdffa8bbf
parent6441ec8b7c108b72789d120562b9f1d976e4aaaf
uprobes: Teach __create_xol_area() to accept the predefined vaddr

Currently xol_add_vma() uses get_unmapped_area() for area->vaddr,
but the next patches need to use the fixed address. So this patch
adds the new "vaddr" argument to __create_xol_area() which should
be used as area->vaddr if it is nonzero.

xol_add_vma() doesn't bother to verify that the predefined addr is
not used, insert_vm_struct() should fail if find_vma_links() detects
the overlap with the existing vma.

Also, __create_xol_area() doesn't need __GFP_ZERO to allocate area.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
kernel/events/uprobes.c