uprobes: Introduce vaddr_to_offset(vma, vaddr)
authorOleg Nesterov <oleg@redhat.com>
Sun, 29 Jul 2012 18:22:42 +0000 (20:22 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 30 Jul 2012 09:27:24 +0000 (11:27 +0200)
commitcb113b47d098185f3f1f67e8300d05ddce842b66
tree86601eb6728a4142e94e4cc3e45697840f6b0768
parent891c39708144bbe401b4aa151bffd0fe41b1dafd
uprobes: Introduce vaddr_to_offset(vma, vaddr)

Add the new helper, vaddr_to_offset(vma, vaddr) which returns
the offset in vma->vm_file this vaddr is mapped at.

Change build_probe_list() and find_active_uprobe() to use the
new helper, the next patch adds another user.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar.vnet.ibm.com>
Cc: Anton Arapov <anton@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20120729182242.GA20355@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/uprobes.c