DynamoRIO / DynamoRIO/dynamorio
better support for clients de-referencing far, PC-relative, or stolen-reg-base app memory values: have DR mangle them
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
Split from #1823
This seems like a more general problem than just an issue with
dr_insert_mbr_instrumentation(). While often inserted code that
de-references app memory is app code, this is not always the case, and we
want to support tool code doing so. Similarly to the stolen register on
ARM, we should at least document that the burden falls on clients to detect
and handle far refs on Linux rather than blindly copying opnds. We should
also add convenience routines if it is too awkward to work around this
using regular API routines.
A similar problem exists with PC-relative memory references: if a tool
blindly copies the operand, is DR supposed to try and mangle it,
potentially spilling a register and maybe messing up the tool's
instrumentation assumptions?
One proposal would be a drutil_insert_get_mem_value() routine in an
extension that handles the corner cases.
Contributor guide
Assessment
This issue has not been assessed yet.