Sugar: Secure GPU Acceleration in Web Browsers
Zhihao Yao, Zongheng Ma, Yingtong Liu, Ardalan Amiri Sani, Aparna Chandramowlishwaran Trustworthy Systems Lab, UC Irvine
1
Sugar: Secure GPU Acceleration in Web Browsers Zhihao Yao , Zongheng - - PowerPoint PPT Presentation
Sugar: Secure GPU Acceleration in Web Browsers Zhihao Yao , Zongheng Ma, Yingtong Liu, Ardalan Amiri Sani, Aparna Chandramowlishwaran Trustworthy Systems Lab, UC Irvine 1 WebGL was released in 2011 Source: https://www.google.com/map 2 WebGL
1
Source: https://www.google.com/map
2
3
47.0% 53.0%
Source: http://webglstats.com (2017)
4
https://www.apple.com/macos/sierra/ http://dlmf.nist.gov https://www.google.com/map https://eyes.nasa.gov/curiosity/
5
6
Native app GL libs Kernel mode GPU driver GPU hardware
7
user space kernel space kernel space hardware
Native app GL libs Native app GL libs Kernel mode GPU driver GPU hardware
function call
8
user space kernel space kernel space hardware
Native app GL libs Native app GL libs Kernel mode GPU driver GPU hardware
syscall
9
user space kernel space kernel space hardware
Web app GL libs Kernel mode GPU driver GPU hardware
10
user space kernel space kernel space hardware
Buggy Compromised Malicious
Web app GL libs Kernel mode GPU driver GPU hardware
11
user space kernel space kernel space hardware
Buggy Compromised Malicious
Web app GL libs Kernel mode GPU driver GPU hardware
12
Buggy Compromised Malicious
user space kernel space kernel space hardware
web app GL libs
Web app GL libs Kernel mode GPU driver GPU hardware
13
user space kernel space kernel space hardware
Buggy Compromised Malicious
14
Kernel mode GPU driver Browser GPU hardware GPU Process Checks GL libs Web app Web app Web app
user space kernel space kernel space hardware
15
Kernel mode GPU driver Browser Web app Web app Web app GPU hardware GPU Process Checks GL libs
IPC
Browser
user space kernel space kernel space hardware
16
Kernel mode GPU driver Browser GPU hardware GPU Process Checks GL libs Web app Web app Web app
user space kernel space kernel space hardware
17
Kernel mode GPU driver Browser GPU hardware GPU Process Checks GL libs Web app Web app Web app 158,000 LoC (GPU Process) 457,000 LoC (GL libraries) 123,000 LoC (GPU driver)
18
Kernel mode GPU driver Browser GPU hardware GPU Process Checks GL libs Web app Web app Web app
19
Kernel mode GPU driver Browser GPU hardware GPU Process Checks GL libs Web app Web app Web app
*Not yet fixed
20
*Not yet fixed
21
22
23
24
25
26
[1] https://www.usenix.org/conference/atc14/technical-sessions/presentation/tian Photo credit: https://www.intel.com/pressroom/archive/releases/2008/20081117comp_sm.htm
27
28
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
29
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
function call
30
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
function call
31
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
32
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
33
34
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
35
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
36
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
37
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
38
34,400 LoC (GPU virtualization)
user space kernel space hardware
39
*Not yet fixed
40
41
Kernel mode GPU 1 driver GPU 1 hardware Browser vGPU GPU 2 hardware Kernel mode GPU 2 driver Web app GL libs vGPU driver GPU process GL libs
42
user space kernel space hardware
Photo credit: https://www.amd.com/zh-tw/products/graphics/desktop/6000/6990
apple.com/macbook-pro dell.com/Inspiron15 store.hp.com/envy
43
Source: https://newsroom.intel.com/news/8th-gen-intel-core-radeon-rx-vega-m-graphics
44
45
WebKit / Blink WebGL frontend WebGL backend GL libs vGPU driver
GPU Process WebGL backend GL libs
46
Ported from GPU process
WebKit / Blink WebGL frontend WebGL backend GL libs vGPU driver
47
function call
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
Mapped registers
48
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
Mapped registers
GPU virtualization layer will emulate
49
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
Interrupt
50
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
Interrupt
51
The virtualization layer delivers as a signal
user space kernel space hardware
Kernel mode GPU driver Browser vGPU GPU hardware Web app GL libs vGPU driver GPU Process GL libs
Interrupt Signal
52
user space kernel space hardware
Main memory GPU
53
DMA
Main memory vGPU
54
DMA
Page table
55
56
57
60 FPS
58
59