lkml.org 
[lkml]   [2012]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] uprobes: fix register_for_each_vma()->vma_address() check
* Oleg Nesterov <oleg@redhat.com> [2012-07-12 19:10:20]:

> 1. register_for_each_vma() checks that vma_address() == vaddr but
> this is not enough. We should also ensure that vaddr >= vm_start,
> find_vma() guarantees "vaddr < vm_end" only.
>
> 2. After the prevous changes, register_for_each_vma() is the only
> reason why vma_address() has to return loff_t, all other users
> know that we have the valid mapping at this offset and thus the
> overflow is not possible.
>
> Change the code to use vaddr_to_offset() instead, imho this looks
> more clean/understandable and now we can change vma_address().
>
> 3. While at it, remove the unnecessary type-cast.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>



\
 
 \ /
  Last update: 2012-07-26 07:41    [W:0.074 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site