The Blavatnik School
- f Computer Science
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache - - PowerPoint PPT Presentation
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy Mengjia Yan, Jiho Choi, Dimitrios Skarlatos, Adam Morrison, Christopher W. Fletcher, and Josep Torrellas University of Illinois at Urbana-Champaign Tel Aviv
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
2
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
3
Existing Attack Sources of Transient Instructions Spectre Control-flow misprediction Meltdown Virtual memory exception L1 Terminal Fault Speculative Store Bypass Address alias between a load and an earlier store Transient Instructions
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
4
Attack Model Sources of Transient Instructions Comprehensive Various events, such as:
Spectre Control-flow misprediction
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
Load reaches head of ROB
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
5
Load is issued to memory
Load is speculative Spectre attack model Comprehensive attack model All prior branches are resolved
unsafe safe unsafe safe
The load becomes unsquashable Visibility Point
mispredictions
load and store
load and load
consistency model violations
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
7
Visibility Point
Delay Issue the load Load could be issued to memory Load reaches head of ROB
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
8
Visibility Point
Probe L1/L2 and hit Load could be issued to memory Load reaches head of ROB
Visibility Point
Probe L1/L2 and miss: Delay Issue the load Load reaches head of ROB Change replacement bits
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
9
Visibility Point
Probe L1/L2. If miss, predict value Load could be issued to memory Load reaches head of ROB Issue the load Compare
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
10
Visibility Point
Untainted: Issue without delay Load could be issued to memory Load reaches head of ROB
Visibility Point
Tainted: Delay until untainted Issue the load Load reaches head of ROB
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
12
Visibility Point
Issue an invisible load request Use the value Make the load visible in cache Load is issued to memory Load reaches head of ROB
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
addition to the register)
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
13
Invisible load request Returned data
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
14
Window of Invisibility Visibility Point
Issue an invisible load request Use the value Make the load visible in cache Load is issued to memory Load reaches head of ROB
Risk of memory consistency violations
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
15
P1 Ld lock Ld counter Wr counter release lock
Ld lock Ld counter
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
16
Ld lock Ld counter Wr counter release lock
Visibility point Ld lock Visibility point Ld counter squash and retry
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
17
Ld X Wr X
Visibility point Ld X
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
conventional machine
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
18
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
19
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
20
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
21
The Blavatnik School
The Raymond and Beverly Sackler Faculty of Exact Sciences Tel Aviv University
InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy
22
Leaves side effects in cache