-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement automated binary re-relativization for AArch32 and AArch64 #4016
Comments
Just checking, but this issue is still only a concern when DR is used in standalone mode right? (in relation to #731) Or are there mangling issues which were recently discovered please? |
This does not impact core DR's basic operations, no. It impacts someone using decode_from_copy() or other decoding operations, which could be standalone or in a client. The workaround of forcing re-encode should ensure there are no problems today except when we have parts of an instr that are not recorded and not recreated on that re-encode: such as this case which we hit recently: #4017. |
Adds rip-relative information tracking at IR levels 1-3 for instruction references on x86, extending the existing tracking for data references. Adds decode_sizeof_ex() and instr_get_rel_data_or_instr_target() to support rip-relative displacement and target handling. Changes decode_from_copy() to preserve raw bits for all instructions, eliminating problems where untracked encoding features are lost such as in #4017. Documents the changes and describes how to avoid the new behavior. Does just that for intra-sequence cti's in the rseq native code copy. Adds test cases to api.ir. Implementing the same thing for AArchXX is left unimplemented, tracked by i#4016. Issue: #731, #3271, #3339, #4016, #4017 Fixes #731 Fixes #3271 Fixes #4017
Adds rip-relative information tracking at IR levels 1-3 for instruction references on x86, extending the existing tracking for data references. Adds decode_sizeof_ex() and instr_get_rel_data_or_instr_target() to support rip-relative displacement and target handling. Changes decode_from_copy() to preserve raw bits for all instructions, eliminating problems where untracked encoding features are lost such as in #4017. Documents the changes and describes how to avoid the new behavior. Does just that for intra-sequence cti's in the rseq native code copy and Windows syscall wrapper copies. Adds test cases to api.ir. Implementing the same thing for AArchXX is left unimplemented, tracked by i#4016. Issue: #731, #3271, #3339, #4016, #4017 Fixes #731 Fixes #3271 Fixes #4017
This is causing loss of encoding fidelity for cases like #7132. |
Xref related issues: #731, #3271, #3339
This issue covers implementing automated binary re-relativization of AArch32 and AArch64 instructions. We will need a different strategy than the x86 approach of storing the location of a 32-bit immediate, due to the varying immediate encodings. For now, decode_from_copy() invalidates the raw bits to force a re-encoding as a workaround for not having this feature.
The text was updated successfully, but these errors were encountered: