Skip to main content

drwrap_wrap_flags_t_DRWRAP_REPLACE_RETADDR

Constant drwrap_wrap_flags_t_DRWRAP_REPLACE_RETADDR 

Source
pub const drwrap_wrap_flags_t_DRWRAP_REPLACE_RETADDR: drwrap_wrap_flags_t = 4;
Expand description

If this flag is set, then post-call points are identified by changing the application return address upon entering the callee. This is more efficient than the default method, which requires shared storage and locks and flushing. However, this does violate transparency, and may cause some applications to fail. In particular, detaching on AArchXX requires scanning the stack to find where the return address was stored, which could conceivably replace an integer or non-pointer value that happens to match the sentinel used. Also, the transparency violation may be exposed to the client’s dr_register_kernel_xfer_event() callback if it inspects the mcontext PC on the stack; drwrap_get_retaddr_if_sentinel() may be used to mitigate such cases. Use #DRWRAP_REPLACE_RETADDR at your own risk. Currently is not supported for RISC-V.