Ben Visness, How does Spectre work?
In a nutshell, Spectre is a class of vulnerabilities that exploit speculative execution, a feature present in modern CPUs to enhance performance. This article by Ben Visness offers an intuitive explanation of how Spectre works and what can be done to mitigate it.
Speculative Execution: The Basics To understand Spectre, one must first comprehend speculative execution and out-of-order execution. Speculative execution is a process where the CPU guesses whether a condition will be true or false and proceeds accordingly to save time if it guesses correctly, with only a minor penalty if it guesses incorrectly. Out-of-order execution is when the CPU executes instructions in an order different from how they are written to achieve better performance, as accessing memory can be significantly slower than comparisons or arithmetic.
...