Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
1052 Discussions

Results under sde64 different from results without sde64.

philiprbrenan
Beginner
788 Views

philiprbrenan_0-1629594339444.png

Please tell me why (in the above) I get a different result running a program under the sde64 emulator than I do without the emulator?  The emulator response is the expected one.  Thanks!

0 Kudos
1 Solution
philiprbrenan
Beginner
730 Views

The code calls Syscall 1 to write the registers contents to the screen.  This call appears to disturb register 11 on Ubuntu 20.  This behavior is not reflected by sde64. Hence the difference.

View solution in original post

3 Replies
AdyT_Intel
Moderator
744 Views

It is hard to tell why there are differences between native run and emulated run.
The main differences is the emulation of the CPUID and XSAVE instructions. 
Currently, when Intel SDE is run without a chip knob (like in your example) it defaults to the Icelake CPU model.

Please note that Intel SDE does not emulate (most of the) instructions supported by the running CPU.

philiprbrenan
Beginner
731 Views

The code calls Syscall 1 to write the registers contents to the screen.  This call appears to disturb register 11 on Ubuntu 20.  This behavior is not reflected by sde64. Hence the difference.

AdyT_Intel
Moderator
722 Views

Intel SDE is based on binary instrumentation technology. This means that the application is undergo translation and registers might have different values then the values in the original run. The translation process makes sure that these changes are isolated from the application, but it is not perfect. There are certain cases where these changes can be leaked/observed by the application.

In your case, before executing a system call, pin (our binary instrumentation system) preserves only part of the registers and not all, and I think that r11 is not preserved in this case. 

Reply