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?
So, TSX may be 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:
IA32_ARCH_CAPABILITIES[TAA_NO]=1
. IA32_ARCH_CAPABILITIES[MDS_NO]=0
), software mitigation for MDS will also mitigate TAAIA32_ARCH_CAPABILITIES[TAA_NO]=0
and IA32_ARCH_CAPABILITIES[MDS_NO]=1
, TAA should be mitigated by one of following:
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 settingTSX_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 enumerateIA32_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)
I believe that I have answers to my questions:
Is this correct that Hardware Lock Elision is disabled for all current CPUs due to
SpectreTAA 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 like Spectre?
No. There is still RTM, which may be not disabled, and it can be used to create mutexes like HLE mutexes. There may also may be future processors not susceptible to TAA, RTM may work for them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With