Re: [RFC] [PATCH 2.6.37-rc5-tip 14/20] 14: uprobes: Handing int3and singlestep exception.
From: Peter Zijlstra
Date: Wed Jan 26 2011 - 10:29:23 EST
On Wed, 2011-01-26 at 20:44 +0530, Srikar Dronamraju wrote:
> So it simplifies to
>
> down_read(&mm->mmap_sem);
> vma = find_vma(mm, probept);
> if (valid_vma(vma)) {
> u = find_uprobe(vma->vm_file->f_mapping->host,
> probept - vma->vm_start);
> }
> up_read(&mm->mmap_sem);
Almost, the offset within a file is something like:
(address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/