linux-IllusionX/kernel/events
Oleg Nesterov f4d6dfe551 uprobes: Fix register_for_each_vma()->vma_address() check
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.vnet.ibm.com>
Cc: Anton Arapov <anton@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20120729182244.GA20362@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-07-30 11:27:24 +02:00
..
callchain.c perf: Don't call release_callchain_buffers() if allocation fails 2012-01-21 09:33:41 +01:00
core.c perf: Introduce perf_pmu_migrate_context() 2012-06-18 12:13:21 +02:00
hw_breakpoint.c Merge branch 'x86/cleanups' into perf/uprobes 2012-03-13 16:33:03 +01:00
internal.h Merge branch 'perf/urgent' into perf/core 2011-12-06 06:43:49 +01:00
Makefile uprobes: Move to kernel/events/ 2012-02-22 11:08:00 +01:00
ring_buffer.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-01-08 13:21:22 -08:00
uprobes.c uprobes: Fix register_for_each_vma()->vma_address() check 2012-07-30 11:27:24 +02:00