lkml.org 
[lkml]   [2013]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/7] uretprobes: return probe entry, prepare_uretprobe()
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.

Anton.

>
> ri->chained = true;
> ret_vaddr = utask->return_instances->orig_ret_vaddr;
> }
>
> fill-ri-and-add-push-it;
> return;
>
> err:
> kfree(ri);
> return;
>
> Oleg.
>


\
 
 \ /
  Last update: 2013-03-26 10:21    [W:0.247 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site