diff options
| author | Oleg Nesterov <oleg@redhat.com> | 2014-04-06 17:16:10 +0200 | 
|---|---|---|
| committer | Oleg Nesterov <oleg@redhat.com> | 2014-04-17 21:58:21 +0200 | 
| commit | 8faaed1b9f500d6cf32702716733a645c9b0727a (patch) | |
| tree | 263383a95da17516bc27d18cf3099eb64dd3c9ef /lib/string_helpers.c | |
| parent | 75f9ef0b7f1aae33b7be7ba8d9c23c8cb48c2212 (diff) | |
uprobes/x86: Introduce sizeof_long(), cleanup adjust_ret_addr() and arch_uretprobe_hijack_return_addr()
1. Add the trivial sizeof_long() helper and change other callers of
   is_ia32_task() to use it.
   TODO: is_ia32_task() is not what we actually want, TS_COMPAT does
   not necessarily mean 32bit. Fortunately syscall-like insns can't be
   probed so it actually works, but it would be better to rename and
   use is_ia32_frame().
2. As Jim pointed out "ncopied" in arch_uretprobe_hijack_return_addr()
   and adjust_ret_addr() should be named "nleft". And in fact only the
   last copy_to_user() in arch_uretprobe_hijack_return_addr() actually
   needs to inspect the non-zero error code.
TODO: adjust_ret_addr() should die. We can always calculate the value
we need to write into *regs->sp, just UPROBE_FIX_CALL should record
insn->length.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Jim Keniston <jkenisto@us.ibm.com>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions
