diff options
author | Oleg Nesterov <oleg@redhat.com> | 2014-04-27 18:13:31 +0200 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2014-04-30 19:10:41 +0200 |
commit | c90a6950120a7e45f31a22653fe6543507ae64d0 (patch) | |
tree | 1a842e0e6929ad050ddc696bc44c7c5c39af13dd /kernel/trace/trace_uprobe.c | |
parent | 7f55e82bacaaa2c41b8e14d6bc78129b096b67b8 (diff) | |
download | op-kernel-dev-c90a6950120a7e45f31a22653fe6543507ae64d0.zip op-kernel-dev-c90a6950120a7e45f31a22653fe6543507ae64d0.tar.gz |
uprobes/x86: Simplify riprel_{pre,post}_xol() and make them similar
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>
Diffstat (limited to 'kernel/trace/trace_uprobe.c')
0 files changed, 0 insertions, 0 deletions