Bounds Check Bypass Mitigation
On the software front, Intel recommends inserting a barrier to stop the process of speculation. Speculation, at the heart of the Spectre and Meltdown exploits, allows processors to skip ahead in their execution of code to save time on computing processes – but also potentially enabling malicious code to access a portion of the memory on the chip.
The chip company recommends the LFENCE instruction as this barrier, which could prevent new operations from executing before they are supposed to, said Intel. It is also possible to develop static analysis rules to find places in the software where a speculation barrier like LFENCE might be needed.
"Note that the insertion of LFENCE must be done judiciously; if it is used too liberally, performance may be significantly compromised," said the whitepaper.