ubuntu application lifecycle · 2020-06-01 · ubuntu applications are: confined — by default the...

31
Ubuntu Application Lifecycle Or: How I learned to stop worrying and trust application developers Ubuntu Application Lifecycle Or: How I learned to stop worrying and trust application developers Ted Gould [email protected] @tedjgould FOSSETCON 20 Nov 2015

Upload: others

Post on 09-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Ubuntu Application Lifecycle

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

Ubuntu Application Lifecycle

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

Ted [email protected]@tedjgouldFOSSETCON20 Nov 2015

Page 2: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

“I'm more worried about Murphy than I am Machievilli”

— Michi Henning

Page 3: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

IdealCracker

Page 4: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Diminished User Experience

Page 5: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

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

DeadBattery

Page 6: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

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

DataProtection

Page 7: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

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

PhysicalDestruction

Page 8: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Phone Usage

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

Page 9: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

PID

Click Manifest

Desktop File

Helper Config

Unity Screen

AppArmor Profile

Upstart Instance

Page 10: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

App

App

Page 11: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

ApplicationSwitcher

Page 12: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Presentation Application Switcher

Page 13: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Infinite App Illusion

Technical User

How many apps can I run?

1 GB RAM1 GHz Quad Core

Page 14: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Active Application

Paused Apps (RAM)

Stopped Offline

Page 15: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Stateless Stopped

Paused

Active

Page 16: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Stateless Stopped

Paused

Active

UserInteractionOnly!!!

Page 17: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Paused

Active

Stateless Stopped

Page 18: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Stateless

Active

Stopped

Paused Linux KernelOOM Killer

(want to include graphics resources in the future)

Page 19: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Stateless Stopped

Paused

Active

Page 20: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

What happens:● App is asked to save

state● Graphic buffers

grabbed for screenshot● Timeout, then all

processes are sent SIGSTOP

Paused

Active

Stateless Stopped

Page 21: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

What happens:● NOTHING!Stateless

Active

Stopped

Paused

Page 22: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

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

Negative:SIGSTOP appsSIGKILL apps on OOM killer

Page 23: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Like

ly t

o b

e k

illed

Stopped App

Untrusted Helpers

Active Application

Unity

Page 24: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Trusted Helpers

● Download Manager — Downloads content to the device while the application isn't focused.

● Push Messages — Background process that collects JSON messages targeted at app/user

● Location Service — Uses GPS and other sources to establish location continually.

● Content Hub — Shares files between application contexts securely.

● Media Hub — Plays audio files and play lists.

Page 25: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

App

Location

Online Accounts

URL Dispatcher

Address Book

AppArmorTrustedConfined

DBus Trusted Helpers

Page 26: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

App

URL Dispatcher

Upstart

Browser

Unity

USERClick on a link Show the browser

Page 27: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

File Server

Push Message

Download Manager

App

Push Server

Save in App Cache

New File

Simple Sync

Page 28: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Request permission at time of use

Page 29: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

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

Page 30: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

Additional Info

http://www.ubuntu.com/phone

https://developer.ubuntu.com

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

https://wiki.ubuntu.com/Mir

Page 31: Ubuntu Application Lifecycle · 2020-06-01 · Ubuntu Applications are: Confined — By default the applications are restricted from using a lot of functionality that might be expected

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