Top Banner
Ubuntu Application Confinement Or: How I learned to stop worrying and trust application developers Ted Gould [email protected] @tedjgould SMU 3 Sept 2014
40

Ubuntu application confinement

May 25, 2015

Download

Documents

Ted Gould
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ubuntu application confinement

Ubuntu Application Confinement

Or: How I learned to stop worrying and trust application developers

Ted [email protected]@tedjgouldSMU3 Sept 2014

Page 2: Ubuntu application confinement

“I'm more worried about Murphy than I am

Machievilli”

— Michi Henning

Page 3: Ubuntu application confinement

IdealCracker

Page 4: Ubuntu application confinement

Diminished User Experience

Page 5: Ubuntu application confinement

© Andy Armstrong — CC-BY-SA — https://www.flickr.com/photos/andyarmstrong/190078748/

DeadBattery

Page 6: Ubuntu application confinement

© Josh Hallett — CC-BY — https://www.flickr.com/photos/hyku/368912557/

DataProtection

Page 7: Ubuntu application confinement

© Antti T. Nissinen — CC-BY — https://www.flickr.com/photos/54177777@N00/373864777/

PhysicalDestruction

Page 8: Ubuntu application confinement

Phone Usage

http://hbr.org/2013/01/how-people-really-use-mobile/

Page 9: Ubuntu application confinement
Page 10: Ubuntu application confinement

App

App

Page 11: Ubuntu application confinement
Page 12: Ubuntu application confinement
Page 13: Ubuntu application confinement

App Writable Area~/.cache/$(pkg)~/.local/share/$(pkg)~/.config/$(pkg)

App Readable Area/usr/share/icons//bin/sh/usr/bin/qmlscene

App Restricted Area~/.cache/$(other pkg)~/.local/share/address-book~/Documents/

Page 14: Ubuntu application confinement
Page 15: Ubuntu application confinement
Page 16: Ubuntu application confinement
Page 17: Ubuntu application confinement

ApplicationSwitcher

Page 18: Ubuntu application confinement

Presentation Application Switcher

Page 19: Ubuntu application confinement

Infinite App Illusion

Technical User

How many apps can I

run?

1 GB RAM1 GHz Quad Core

Page 20: Ubuntu application confinement
Page 21: Ubuntu application confinement
Page 22: Ubuntu application confinement

UserInteractionOnly!!!

Page 23: Ubuntu application confinement
Page 24: Ubuntu application confinement

Linux KernelOOM Killer

(want to include graphics resources in the future)

Page 25: Ubuntu application confinement
Page 26: Ubuntu application confinement

What happens:App is asked to save state

Graphic buffers grabbed for screenshot

Timeout, then all processes are sent SIGSTOP

Page 27: Ubuntu application confinement

What happens:NOTHING!

Page 28: Ubuntu application confinement

Positive:Ask to save state nicely via life cycleStop using processing when not asked

Negative:SIGSTOP appsSIGKILL apps on OOM killer

Page 29: Ubuntu application confinement
Page 30: Ubuntu application confinement
Page 31: Ubuntu application confinement

DBus

Page 32: Ubuntu application confinement

HeaderType Signal or Method

Destination :0.54 or “com.canonical.Unity”

Path /com/canonical/Unity/Dash

Interface com.canonical.unity.dash

Method ShowAttention

Payload [“foo”, “bar”]

DBus Message

Page 33: Ubuntu application confinement
Page 34: Ubuntu application confinement
Page 35: Ubuntu application confinement
Page 36: Ubuntu application confinement

Request permission at time of use

Page 37: Ubuntu application confinement

Ubuntu Applications are¹:ELF BinariesLink to C libsDraw on an EGL Buffer

Review (1/2)

¹ This is really only from a confinement/lifecycle perspective, we have a really nice QML SDK that makes application author's lives much easier, you should use it if you can.

Page 38: Ubuntu application confinement

Ubuntu Applications are:Confined. By default the applications are restricted from using a lot of functionality that might be expected from a traditional Linux user session.

Managed. The application lifecycle works to keep the user in control of what is draining the battery and using resources.

Have Friends. Trusted helpers provide ways to implement the functionality you need and work with confinement.

Review (2/2)

Page 39: Ubuntu application confinement

Additional Info

http://www.ubuntu.com/phone

https://developer.ubuntu.com

https://wiki.ubuntu.com/Security/AppArmor

https://wiki.ubuntu.com/Mir

Page 40: Ubuntu application confinement

© Stéfan — CC-BY-SA — https://www.flickr.com/photos/st3f4n/143623934