Skip to content
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

i#731,i#3271: Keep IR cti+copied bits valid and re-relativized #4018

Merged
merged 5 commits into from
Jan 16, 2020

Conversation

derekbruening
Copy link
Contributor

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.

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
@derekbruening
Copy link
Contributor Author

(Making sure the CI is green before requesting review since this has potential to break things.)

@derekbruening
Copy link
Contributor Author

All issues resolved. PTAL. See #4017 (comment) for logic behind tackling the full #731.

core/arch/x86/decode.c Outdated Show resolved Hide resolved
core/arch/x86/encode.c Show resolved Hide resolved
suite/tests/api/ir_x86.c Outdated Show resolved Hide resolved
@derekbruening
Copy link
Contributor Author

PTAL. Sorry, I pre-emptively merged in upstream to deal w/ a conflict, so the "changes since last review" button may not be a good view: but selecting just the final commit from the commit selection dropdown on the diff page will show the review changes.

@derekbruening derekbruening merged commit d6f5fca into master Jan 16, 2020
@derekbruening derekbruening deleted the i3271-encode-copied-bytes branch January 16, 2020 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants