Re: [PATCH 4/7] uretprobes: return probe entry, prepare_uretprobe()

From: Anton Arapov
Date: Tue Mar 26 2013 - 04:50:48 EST


On Tue, Mar 26, 2013 at 09:45:33AM +0100, Anton Arapov wrote:
> On Sun, Mar 24, 2013 at 04:26:51PM +0100, Oleg Nesterov wrote:
> > On 03/22, Anton Arapov wrote:
> [snip]
> > And ->dirty looks confusing... perhaps ->chained ?
> >
> > ri = kzalloc(...);
> > if (!ri)
> > return;
> >
> > ret_vaddr = arch_uretprobe_hijack_return_addr(...);
> > if (ret_vaddr == -1)
> > goto err;
> >
> > if (ret_vaddr == trampoline_vaddr) {
> > if (!utask->return_instances) {
> > // This situation is not possible.
> > // (not sure we should send SIGSEGV)
> > pr_warn(...);
> > goto err;
> > }
>
> If we don't send SIGSEGV, does it make sense to restore the original
> return address that was just hijacked? So that we just decline setting
> the breakpoint for this very case.

disregard this one. we have no address to restore at that moment. :)

> Anton.
>
> >
> > ri->chained = true;
> > ret_vaddr = utask->return_instances->orig_ret_vaddr;
> > }
> >
> > fill-ri-and-add-push-it;
> > return;
> >
> > err:
> > kfree(ri);
> > return;
> >
> > Oleg.
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/