Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nowadays both Intel/AMD CPUs and Arm-based CPUs guarantee that a certain subset of the instructions are executed in constant time.

For an example of a list of such instructions see:

https://www.intel.com/content/www/us/en/developer/articles/t...

However, cooperation from the operating system is necessary, as the constant-time execution mode may need to be enabled by setting certain CPU-control bits in protected registers (e.g. IA32_UARCH_MISC_CTL[DOITM]).

See for instance:

https://www.intel.com/content/www/us/en/developer/articles/t...

CMOV is on the list of instructions with constant-time execution, but the list is valid only with the corresponding control bit set correctly.



> However, cooperation from the operating system is necessary, as the constant-time execution mode may need to be enabled by setting certain CPU-control bits in protected registers (e.g. IA32_UARCH_MISC_CTL[DOITM]).

The way ARM does this is way better, since it doesn't need help from the operating system: user-space can directly set and clear the DIT bit. Operating system cooperation is necessary only to know whether that bit exists (because the ID registers are not directly readable by user mode).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: