Re: [PATCH 3/5] uprobes: fix overflow in vma_address/find_active_uprobe

2012-07-11 Thread Srikar Dronamraju
* Oleg Nesterov [2012-07-09 12:54:45]: > On 07/08, Joe Perches wrote: > > > > On Sun, 2012-07-08 at 22:30 +0200, Oleg Nesterov wrote: > > > @@ -1450,7 +1450,7 @@ static struct uprobe *find_active_uprobe(unsigned > > > long bp_vaddr, int *is_swbp) > > > > > > inode = vma->vm_fil

Re: [PATCH 3/5] uprobes: fix overflow in vma_address/find_active_uprobe

2012-07-09 Thread Oleg Nesterov
On 07/08, Joe Perches wrote: > > On Sun, 2012-07-08 at 22:30 +0200, Oleg Nesterov wrote: > > @@ -1450,7 +1450,7 @@ static struct uprobe *find_active_uprobe(unsigned > > long bp_vaddr, int *is_swbp) > > > > inode = vma->vm_file->f_mapping->host; > > offset =

Re: [PATCH 3/5] uprobes: fix overflow in vma_address/find_active_uprobe

2012-07-08 Thread Joe Perches
On Sun, 2012-07-08 at 22:30 +0200, Oleg Nesterov wrote: > vma->vm_pgoff is "unsigned long", it should be promoted to loff_t > before the multiplication to avoid the overflow. [] > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c [] > @@ -117,7 +117,7 @@ static loff_t vma_address(struc

[PATCH 3/5] uprobes: fix overflow in vma_address/find_active_uprobe

2012-07-08 Thread Oleg Nesterov
vma->vm_pgoff is "unsigned long", it should be promoted to loff_t before the multiplication to avoid the overflow. Signed-off-by: Oleg Nesterov --- kernel/events/uprobes.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.