Re: [PATCH v4 3.0-rc2-tip 13/22] 13: uprobes: Handing int3 and singlestep exception.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +
> > +cleanup_ret:
> > +       if (u) {
> > +               down_read(&mm->mmap_sem);
> > +               if (!set_orig_insn(current, u, probept, true))
> 
> we try to undo the probe? That doesn't make any sense. I thought you
> meant to return to userspace, let it re-take the trap and try again
> until you do manage to allocate the user resource.

I meant removing the probe itself
https://lkml.org/lkml/2011/4/21/279

We could try reseting and retrying the trap. Just that we might end up
looping under memory pressure.

> 
> This behaviour makes probes totally unreliable under memory pressure. 

Under memory pressure we could be unreliable.

> 
> > +                       atomic_dec(&mm->uprobes_count);
> > +               up_read(&mm->mmap_sem);
> > +               put_uprobe(u);
> > +       } else {
> > +       /*TODO Return SIGTRAP signal */
> > +       }
> > +       if (utask) {
> > +               utask->active_uprobe = NULL;
> > +               utask->state = UTASK_RUNNING;
> > +       }
> > +       set_instruction_pointer(regs, probept);
> > +} 
> 
> Also, there's a scary amount of TODO in there...

All of those deal with delaying the signals. I am working on it at this
moment. 

-- 
Thanks and Regards
Srikar

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]