Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
1058 Discussions

Results under sde64 different from results without sde64.

philiprbrenan
Beginner
1,004 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
946 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
960 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
947 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
938 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