1
Overhead-free I/O from enclaves
SysTEX'16 Trento, Italy Meni Orenbach
- Prof. Mark Silberstein
Overhead-free I/O from enclaves SysTEX'16 Trento, Italy Meni - - PowerPoint PPT Presentation
Overhead-free I/O from enclaves SysTEX'16 Trento, Italy Meni Orenbach Prof. Mark Silberstein 1 Research Statement: Enclaves are accelerators for secured execution Accelerator system services and Abstractions can be retrofitted Inspire
1
2
3
Traditional CPU Application Host Application GPU Kernel Offload computation to GPU
Partition: GPU and host
4
GPU Kernel GPU Memory
Storage Host Memory Host High Performance Private Memory
Partition: GPU and host Separate GPU Memory
5
GPU Kernel GPU Memory
Storage Host Memory Host
Partition: GPU and host Separate GPU Memory Host manages OS services GPU cannot invoke syscalls
6
GPU Kernel GPU Memory Storage Host Memory Host
Partition: GPU and host Separate GPU Memory Host manages OS services GPU cannot invoke syscalls Host operate on its memory
7
GPU Kernel GPU Memory
Storage Host Memory Host
Partition: GPU and host Separate GPU Memory Host manages OS services GPU cannot invoke syscalls Host operate on its memory Copy data to GPU memory
8
GPU Kernel GPU Memory
Storage Host Memory Host Kernel Launch 5μsec on NVIDIA K40
Partition: GPU and host Separate GPU Memory Host manages OS services GPU cannot invoke syscalls Host operate on its memory Copy data to GPU memory Host-centric management High invocation costs
Host construct kernel Can't Dynamically Load Instructions Can't Dynamically Load Threads Host manages address space
9
GPU Kernel GPU Memory
Storage Host Memory Host
Partition: GPU and host Separate GPU Memory Host manages OS services GPU cannot invoke syscalls Host operate on its memory Copy data to GPU memory Host-centric management High invocation costs GPU execute computation
10
GPU Kernel GPU Memory
Storage Host Memory Host
Partition: GPU and host Separate GPU Memory Host manages OS services GPU cannot invoke syscalls Host operate on its memory Copy data to GPU memory Host-centric management High invocation costs GPU execute computation Copy back to host memory
11
12
Traditional CPU Application Host (Untrusted) Enclave (Trusted) Offload sensitive data to enclaves
Partition:trusted and untrusted Partition:trusted and untrusted Separate GPU Memory Host manages OS services GPU cannot invoke syscalls Host operate on its memory Copy data to GPU memory Host-centric management High invocation costs GPU execute computation Copy back to host memory
13
Enclave Enclave Memory
Storage Host Memory Host Integrity Confidentiality Anti-replay
High latency to host memory (Encrypt/Decrypt) Partition:trusted and untrusted Separate Enclave Memory Separate Enclave Memory Host manages OS services GPU cannot invoke syscalls Host operate on its memory Copy data to GPU memory Host-centric management High invocation costs GPU execute computation Copy back to host memory
14
Storage Host Memory Host
Partition:trusted and untrusted Separate Enclave Memory Host manages OS services Host manages OS services Enclave cannot invoke syscalls Enclave cannot invoke syscalls Host operate on its memory Copy data to GPU memory Host-centric management High invocation costs GPU execute computation Copy back to host memory
Enclave Enclave Memory
15
Storage Host Memory Host
Partition:trusted and untrusted Separate Enclave Memory Host manages OS services Enclave cannot invoke syscalls Host operate on its memory Host operate on its memory Copy data to GPU memory Host-centric management High invocation costs GPU execute computation Copy back to host memory
Enclave Enclave Memory
16
Enclave Memory
Storage Host Memory Host
Partition:trusted and untrusted Separate Enclave Memory Host manages OS services Enclave cannot invoke syscalls Host operate on its memory Copy data to enclave memory Copy data to enclave memory Host-centric management High invocation costs GPU execute computation Copy back to host memory
Enclave
17
Enclave Memory Enclave
Storage Host Memory Host EENTER 3μsec on i7 Skylake
Partition:trusted and untrusted Separate Enclave Memory Host manages OS services Enclave cannot invoke syscalls Host operate on its memory Copy data to enclave memory Host-centric management Host-centric management High invocation costs High invocation costs GPU execute computation Copy back to host memory
Host construct enclave Can't Dynamically Load Instructions (SGX1) Can't Dynamically Load Threads (SGX1) Host manages address space
18
Enclave Memory
Storage Host Memory Host
Partition:trusted and untrusted Separate Enclave Memory Host manages OS services Enclave cannot invoke syscalls Host operate on its memory Copy data to enclave memory Host-centric management High invocation costs Enclave execute computation Enclave execute computation Copy back to host memory
Enclave
19
Enclave Enclave Memory
Storage Host Memory Host
Partition:trusted and untrusted Separate Enclave Memory Host manages OS services Enclave cannot invoke syscalls Host operate on its memory Copy data to enclave memory Host-centric management High invocation costs Enclave execute computation Copy back to host memory Copy back to host memory
20
21
– Network server – Private model & data – Store model in hash table – Clients send 100k random requests to update items – Server issues recv() to get requests and update – Enclave encapsulate recv() in OCALL.
22
1 2 4 8 16 32 64 1 2 3 4 5 6 7 8 9 10 SGX
Number of items updated per request Slowdown factor
23
24
– RPC communication infrastructure
Trusted memory Shared untrusted memory Untrusted memory RPC Queue Enclave Software 'Client' 'Server' untrusted_call() RPC Thread-Pool Exec Unlock Pass request Spinlock
25 1 2 4 8 16 32 64 1 2 3 4 5 6 7 8 9 10
SGX SGXIO
Number of items updated per request Slowdown factor
26
– Latency to host memory
– Atomic instructions shared with the host – Internal management
27
28