[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110127102527.GT19725@linux.vnet.ibm.com>
Date: Thu, 27 Jan 2011 15:55:27 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
Linux-mm <linux-mm@...ck.org>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Christoph Hellwig <hch@...radead.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
SystemTap <systemtap@...rces.redhat.com>,
Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Andi Kleen <andi@...stfloor.org>,
LKML <linux-kernel@...r.kernel.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [RFC] [PATCH 2.6.37-rc5-tip 5/20] 5: Uprobes:
register/unregister probes.
* Peter Zijlstra <peterz@...radead.org> [2011-01-27 11:23:37]:
> On Thu, 2011-01-27 at 15:31 +0530, Srikar Dronamraju wrote:
> > > > > - validate that the vma is indeed a map of the right inode
> > > >
> > > > We can add a check in write_opcode( we need to pass the inode to
> > > > write_opcode).
> > >
> > > sure..
> > >
> > > > > - validate that the offset of the probe corresponds with the stored
> > > > > address
> > > >
> > > > I am not clear on this. We would have derived the address from the
> > > > offset. So is that we check for
> > > > (vaddr == vma->vm_start + uprobe->offset)
> > >
> > > Sure, but the vma might have changed since you computed the offset -)
> >
> > If the vma has changed then it would fail the 2nd validation i.e vma
> > corresponds to the uprobe inode right. If the vma was unmapped and
> > mapped back at the same place, then I guess we are okay to probe.
>
> It can be unmapped and mapped back slightly different. A map of the same
> file doesn't need to mean its in the exact same location or has the
> exact same pgoffset.
>
>
If its not at the exact same location, then our third validation of
checking that (vaddr == vma->vm_start + uprobe->offset) should fail
right?
Also should it be (vaddr == uprobe->offset + vma->vm_start -
vma->pgoff << PAGE_SHIFT) ?
--
Thanks and Regards
Srikar
--
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