lkml.org 
[lkml]   [2012]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] uprobes: Ignore unsupported instructions in uprobe_mmap
On 08/02, Srikar Dronamraju wrote:
>
> * Oleg Nesterov <oleg@redhat.com> [2012-08-02 16:17:57]:
>
> > Forgot to mention...
> >
> > On 08/02, Srikar Dronamraju wrote:
> > >
> > > While at it, add a missing put_uprobe() in the path where uprobe_mmap()
> > > races with uprobe_unregister().
> > > ...
> > > @@ -1051,8 +1051,10 @@ int uprobe_mmap(struct vm_area_struct *vma)
> > > if (ret == -EEXIST) {
> > > ret = 0;
> > >
> > > - if (!is_swbp_at_addr(vma->vm_mm, vaddr))
> > > + if (!is_swbp_at_addr(vma->vm_mm, vaddr)) {
> > > + put_uprobe(uprobe);
> > > continue;
> > > + }
> >
> > Yes, this part looks correct.
> >
> > In fact, I think this is not really correct anyway (wrt counter)
> > but we are going to kill it.
> >
> >
>
> Are you expecting the counter to be decreased/increased here?

uprobes_state.count is very wrong, afaics. I'll try to send the fixes
"soon", after we solve the pending problems (this one + stepping).

> This is case where the uprobe_mmap() and uprobe_unregister() raced, and
> by the time install_breakpoint() was called by uprobe_mmap(), there were
> no consumers.

Yes, exactly, and this case doesn't look 100% right too,

> i.e there are no uprobe->consumers and the underlying
> instruction is still not a breakpoint instruction.

Yes, but what if it _IS_ "int3" ?

Yet another reason to move arch_uprobe_analyze_insn/etc to _register.

Oleg.



\
 
 \ /
  Last update: 2012-08-02 20:41    [W:0.058 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site