DynamoRIO / DynamoRIO/dynamorio

preserve cs changes from far ctis and iret

Open
#823 6 comments 0 reactions 0 assignees View on GitHub
Migrated OpSys-x64 Priority-Medium Type-Feature
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on June 21, 2012 15:23:39_

this was PR 271317

For 64-bit DR in WOW64 ( issue #49 ) we need to handle application cs changes.
Splitting out from that case.

For common/decode we fail to reproduce the bad-segment fault of a native
lretw (66 cb), and my current SEH64 setup fails to recover from a fault on
only the target of a retw: so for now that test uses a retw. Once we have
faithful cs preservation we can re-enable lretw.

On x64 "push cs" is an invalid instr; for now I'm pushing 0x33. This case
covers fixing that as well.

**\* TODO far cti must exit code cache to update dcontext_t.x86_mode

or can we use last_fragment (but be wary of empty_fragment)? are we
planning on requiring exits to update ibl tls slots?
#ifdef X64
set_x86_mode(dcontext, TEST(FRAG_32_BIT, targetf->flags));
#endif
Note that if we don't require a cache exit on mode switches we need to
change the call to get_reset_exit_stub() to first see what mode of fragment
the thread is suspended inside.

_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=823_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.