Commit Graph

7 Commits

Author SHA1 Message Date
ce822389af ucopy: cleanup umoven_peekdata and umovestr_peekdata
* ucopy.c (umoven_peekdata, umovestr_peekdata): Merge aligned
and unaligned tracee address cases.
2017-07-31 18:25:00 +00:00
9688f6a30d ucopy: move legacy fallbacks of umoven and umovestr to separate functions
Move legacy PTRACE_PEEKDATA-based support to separate functions.

* ucopy.c (umoven_peekdata, umovestr_peekdata): New functions.
(umoven, umovestr): Use them.
2017-07-31 18:25:00 +00:00
5edeed4295 ucopy: move process_vm_readv ENOSYS check to vm_read_mem
* ucopy.c (vm_read_mem): Set process_vm_readv_not_supported in case
of ENOSYS.
* ucopy.c (umoven, umovestr): Do not set process_vm_readv_not_supported.
2017-07-31 18:21:56 +00:00
5fe47894af ucopy: refactor the check for invalid tracee addresses
* ucopy.c (tracee_addr_is_invalid): New function.
* ucopy.c (umoven, umovestr): Use it.
2017-07-30 23:40:24 +00:00
5f96feb9b7 ucopy: enhance vm_read_mem error diagnostics
* ucopy.c (umoven, umovestr): Enhance vm_read_mem error diagnostics
to match PTRACE_PEEKDATA case.
2017-07-30 23:28:12 +00:00
ccba47d80a ucopy: skip redundant tracee address truncation check
* ucopy.c (vm_read_mem): Skip raddr != truncated_raddr check
if these variables have the same data size.
2017-07-29 23:27:52 +00:00
429c08130b util: move umoven and umovestr to a separate file
These functions are more kernel-specific compared to all other functions
defined in util.c.

* ucopy.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* util.c (umoven, umovestr): Move to ucopy.c.
2017-07-28 10:24:35 +00:00