Speculation invariance (invarspec): Faster safe execution through program analysis
Name
micro20_1.pdf
Description
Accepted version
Size
400.58 KB
Format
Adobe PDF
Checksum (MD5)
e8df1b2b686a797ef2cade677565e594
Author(s) • • • • • • •
Zhao, ZN
Ji, H
Yan, M
Yu, J
Fletcher, CW
Morrison, A
Marinov, D
Torrellas, J
Date Issued
2020
Journal
Proceedings of the Annual International Symposium on Microarchitecture, MICRO
Publisher
IEEE
Citation
Zhao, ZN, Ji, H, Yan, M, Yu, J, Fletcher, CW et al. 2020. "Speculation invariance (invarspec): Faster safe execution through program analysis." Proceedings of the Annual International Symposium on Microarchitecture, MICRO, 2020-October.
Version
Author's final manuscript
Abstract
© 2020 IEEE Computer Society. All rights reserved. Many hardware-based defense schemes against speculative execution attacks use special mechanisms to protect instructions while speculative, and lift the mechanisms when the instructions turn non-speculative. In this paper, we observe that speculative instructions can sometimes become Speculation Invariant before turning non-speculative. Speculation invariance means that (i) whether the instruction will execute and (ii) the instruction's operands are not a function of speculative state. Hence, we propose to lift the protection mechanisms on these instructions early, when they become speculation invariant, and issue them without protection. As a result, we improve the performance of the defense schemes without changing their security properties. To exploit speculation invariance, we present the InvarSpec framework. InvarSpec includes a program analysis pass that identifies, for each relevant instruction i, the set of older instructions that are Safe for i-i.e., those that do not prevent i from becoming speculation invariant. At runtime, the InvarSpec micro-architecture loads this information and uses it to determine when speculative instructions can be issued without protection. InvarSpec is one of the first defense schemes for speculative execution that combines cooperative compiler and hardware mechanisms. Our evaluation shows that InvarSpec effectively reduces the execution overhead of hardware defense schemes. For example, on SPEC17, it reduces the average execution overhead of fence protections from 195.3% to 108.2%, of Delay-On-Miss from 39.5% to 24.4%, and of InvisiSpec from 15.4% to 10.9%.
MIT Department
Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory
Massachusetts Institute of Technology. Department of Electrical Engineering and Computer Science
Terms of Use
Creative Commons Attribution-Noncommercial-Share Alike
Persistent DSpace Link
DOI of Published Version
https://doi.org/10.1109/MICRO50266.2020.00094