securityx86x86-64speculative-executionintel-tsx

Has Hardware Lock Elision gone forever due to Spectre Mitigation?


Is this correct that Hardware Lock Elision is disabled for all current CPUs due to Spectre mitigation, and any attempt to have a mutex using HLE intrinsics/instructions would result in usual mutex?

Is this likely that there will not be anything like HLE mutexes in future to avoid vulnerabilities like Spectre?


Solution

  • I believe that I have answers to my questions:

    Is this correct that Hardware Lock Elision is disabled for all current CPUs due to Spectre TAA mitigation, and any attempt to have a mutex using HLE intrinsics/instructions would result in usual mutex?

    Yes. It is deprecated. Unless Intel undeprecates it.

    Is this likely that there will not be anything like HLE mutexes in future to avoid vulnerabilities?

    Apparently yes. There is still RTM, but it is effectively disabled either on many recent CPUs.


    TSX is disabled not to mitigate Spectre, but as a part of another vulnerability mitigation, TSX Asynchronous Abort (TAA).

    Here's relevant article on Intel website:

    Which links to two more detailed articles:

    Links contain the following information:

    Ability for above mentioned selectively disabling TSX arrives with microcode update. After such microcode update, ability to control TSX is controlled by IA32_ARCH_CAPABILITIES[TSX_CTRL] (bit 7)=1.

    Now, about HLE. TAA article says:

    Some processors may need to load a microcode update to add support for IA32_TSX_CTRL. The MSR supports disabling the RTM functionality of Intel TSX by setting TSX_CTRL_RTM_DISABLE (bit 0). When this bit is set, all RTM transactions will abort with abort code 0 before any instructions can execute within the transaction, even speculatively. On processors that enumerate IA32_ARCH_CAPABILITIES[TSX_CTRL] (bit 7)=1, HLE prefix hints are always ignored.

    The HLE feature is also marked as removed in Intel® 64 and IA-32 Architectures Software Developer’s Manual:

    2.5 INTEL INSTRUCTION SET ARCHITECTURE AND FEATURES REMOVED

    Intel® Memory Protection Extensions (Intel® MPX) MSR_TEST_CTRL, bit 31 (MSR address 33H) Hardware Lock Elision (HLE)