[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120726045948.GC3810@linux.vnet.ibm.com>
Date: Thu, 26 Jul 2012 10:29:48 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Anton Arapov <anton@...hat.com>,
Hugh Dickins <hughd@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] uprobes: fix register_for_each_vma()->vma_address()
check
* Oleg Nesterov <oleg@...hat.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@...hat.com>
Acked-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists