Isolating Programs in Modern Browser Architectures Charles Reis , - - PowerPoint PPT Presentation

isolating programs in modern browser architectures
SMART_READER_LITE
LIVE PREVIEW

Isolating Programs in Modern Browser Architectures Charles Reis , - - PowerPoint PPT Presentation

Isolating Programs in Modern Browser Architectures Charles Reis , Steven D. Gribble University of Washington / Google, Inc. 1 Web is Evolving Pages Programs More complex, active content Browser now in role of OS, but not designed for it


slide-1
SLIDE 1

Isolating Programs in Modern Browser Architectures

Charles Reis, Steven D. Gribble

University of Washington / Google, Inc.

1

slide-2
SLIDE 2

Web is Evolving

More complex, active content Browser now in role of OS, but not designed for it Robustness and performance problems

Pages Programs

2

slide-3
SLIDE 3

Consider OS Landscape

Performance isolation Resource management Failure isolation Clear program abstraction

3

slide-4
SLIDE 4

Browsers Fall Short

Unresponsiveness Jumbled accounting Browser crashes Unclear what a program is!

4

slide-5
SLIDE 5

Outline

5

Looking for Programs New Abstractions Isolation in Chromium Evaluation

slide-6
SLIDE 6

Programs in the Browser

Mail Mail Consider an example browsing session Several independent programs Doc List Doc Doc News Article

6

Blog

slide-7
SLIDE 7

Monolithic Browsers

Mail Mail Most browsers put all pages in one process Poor performance isolation Poor failure isolation Poor security Should re-architect the browser Doc List Doc News Article

7

Blog

slide-8
SLIDE 8

Process per Window?

Breaks pages that directly communicate Shared access to data structures, etc. Fails as a program abstraction Mail Doc List Doc

8

Mail News Article Blog

slide-9
SLIDE 9

Need a Program Abstraction

Aim for new groupings that: Match our intuitions Preserve compatibility Take cues from browser’s existing rules Isolate each grouping in an OS process Will get performance and failure isolation, but not security between sites Doc List Doc

9

slide-10
SLIDE 10

Outline

10

Looking for Programs New Abstractions Isolation in Chromium Evaluation

slide-11
SLIDE 11

Ideal Abstractions

Web Program Set of pages and sub-resources providing a service Web Program Instance Live copy of a web program in the browser Will be isolated in the browser’s architecture

Intuitive, but how to define concretely?

11

slide-12
SLIDE 12

Compatible Abstractions

Three ways to group pages into processes:

  • 1. Site: based on browser’s

access control policies

  • 2. Browsing Instance:

communication channels between pages

  • 3. Site Instance:

intersection of the first two

12

slide-13
SLIDE 13
  • 1. Sites

Same Origin Policy dictates some isolation (host+protocol+port) Pages can change document.domain Registry-controlled domain name limit Site: RCDN + protocol

13

docs.zoho.com docs.zoho.com mail.zoho.com zoho.com zoho.com zoho.com

Mail Doc List Doc Mail News Article Blog

http://bbc.co.uk https://zoho.com http://blogger.com

slide-14
SLIDE 14

Mail Doc List Doc Mail News Article Blog

  • 2. Browsing Instances

Not all pages can talk References between “related” windows Parents and children Lifetime of window Browsing Instance: connected windows, regardless of site

14

window.opener w = w i n d

  • w

.

  • p

e n ( . . . )

slide-15
SLIDE 15
  • 3. Site Instances

Site Instance: Intersection of site & browsing instance Safe to isolate from any other pages Compatible notion of a web program instance

15

Mail Doc List Doc Mail News Article Blog

slide-16
SLIDE 16

Outline

16

Looking for Programs New Abstractions Isolation in Chromium Evaluation

slide-17
SLIDE 17

Multi-Process Browser

Browser Kernel Storage, network, UI Rendering Engines Web program and runtime environment Plug-ins Browser Kernel Plug-in Rendering Engine Rendering Engine

17

Implemented in Chromium

slide-18
SLIDE 18

Chromium Process Models

  • 1. Monolithic
  • 2. Process-per-Browsing-Instance

New window = new renderer process

  • 3. Process-per-Site-Instance (default)

Create renderer process when navigating cross-site

  • 4. Process-per-Site

Combine instances: fewer processes, less isolation

18

Browser Kernel Plug-in Rendering Engine Rendering Engine Browser Kernel Plug-in Rendering Engine

slide-19
SLIDE 19

Outline

19

Looking for Programs New Abstractions Isolation in Chromium Evaluation

slide-20
SLIDE 20

Robustness Benefits

Failure Isolation Accountability Memory Management Some additional security (e.g., Chromium’s sandbox)

20

Browser Kernel Plug-in Rendering Engine

Sandbox

Rendering Engine

Sandbox

slide-21
SLIDE 21

Performance Isolation

Responsive while other web programs working

1,000 2,000 3,000 4,000 With Top 5 Pages With Gmail

6 6 3,307 1,408

Avg Click Delay on Blank Page Time (ms) Monolithic Chromium Multi-Process Chromium

21

slide-22
SLIDE 22

Other Performance Impact

Speedups More work done concurrently, leveraging cores e.g., Session restore of several windows Process Latency 100 ms, but masked by other speedups in practice

22

slide-23
SLIDE 23

Memory Overhead

Robustness benefits do have a cost Reasonable for many real users

23

32.5 65.0 97.5 130.0 1 2 3 4 5 6 7 8 9 10 Memory (MB) Number of Popular Pages Monolithic Chromium Multi-Process Chromium

slide-24
SLIDE 24

Compatibility Evaluation

No known compat bugs due to architecture Some minor behavior changes e.g., Narrower scope of window names: browsing instance, not global

24

“Pandora” “Pandora”

?

slide-25
SLIDE 25

Related Architecture Work

Internet Explorer 8 Multi-process architecture, no program abstractions Gazelle Like Chromium, but values security over compatibility Other research: OP , Tahoma, SubOS Break compatibility (isolation too fine-grained)

25

slide-26
SLIDE 26

Conclusion

Browsers must recognize programs to support them Site Instances capture this Compatible with existing web content Can prevent interference with process isolation

26

Implemented in Chromium