lkml.org 
[lkml]   [2014]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] uprobes/x86: Simplify riprel_{pre,post}_xol() and make them similar
* Oleg Nesterov <oleg@redhat.com> [2014-04-27 18:52:30]:

> Ignoring the "correction" logic riprel_pre_xol() and riprel_post_xol()
> are very similar but look quite differently.
>
> 1. Add the "UPROBE_FIX_RIP_AX | UPROBE_FIX_RIP_CX" check at the start
> of riprel_pre_xol(), like the same check in riprel_post_xol().
>
> 2. Add the trivial scratch_reg() helper which returns the address of
> scratch register pre_xol/post_xol need to change.
>
> 3. Change these functions to use the new helper and avoid copy-and-paste
> under if/else branches.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>



\
 
 \ /
  Last update: 2014-04-28 09:21    [W:2.003 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site