Closed Bug 2070199 Opened 2 months ago Closed 1 month ago

Create separate HWInference processes for browser and content initiated workloads

Categories

(Core :: Machine Learning: On Device, task, P2)

task
Points:
5

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: vpollet, Assigned: vpollet)

References

(Blocks 1 open bug)

Details

(Whiteboard: [aiplatform])

Attachments

(3 external files, 2 obsolete files)

The AI runtime powers browser features, meaning that the data that the inference process holds is very privileged (think browsing history, prefs etc.), let's call that "Browser AI". The new utility process added for SpeechRecognition will be executing code on behalf of a WebAPI, which is a very different trust-model to execution on behalf of the browser, call it "Web AI". I believe security would suffer from co-locating execution of those two in the same process, mainly because in the Web AI case, a Web API provides the bytes we're running untrusted third parties on, AND a clean exfiltration channel in the form of the API itself.

As I understand, the current utility process infrastructures mandate 1 kind = 1 instance of the process. Paul proposed a way to "key" utility processes using a string that solved the "1 kind = 1 instance" limitation by changing the invariant to "1 kind x key = 1 instance", which allowed defining "HWInference - Web" for Web AI and "HWInference - Browser" for Browser AI, physically separating them. Nika rejected that approach in review.

This bug is about converging on an acceptable shape for that physical separation.

Whiteboard: [aiplatform]
Duplicate of this bug: 2058344
Attachment #9639818 - Attachment description: WIP: Bug 2070199 - Part 2: Add HWInferenceBrowserProcess, the keep-alive policy for HW_INFERENCE_BROWSER → WIP: Bug 2070199 - Part 2: Add the idle grace pref and keep-alive helpers for HW_INFERENCE_BROWSER
Attachment #9639817 - Attachment is obsolete: true
Attachment #9639818 - Attachment is obsolete: true
Assignee: nobody → vpollet
Attachment #9643662 - Attachment description: WIP: Bug 2070199 - Part 1: Manage PHWInference under PUtilityProcess r?nika,gregtatum → Bug 2070199 - Part 1: Manage PHWInference under PUtilityProcess r?nika,gregtatum
Status: NEW → ASSIGNED
Attachment #9643663 - Attachment description: WIP: Bug 2070199 - Part 2: Let a SandboxingKind have several processes r?nika,gregtatum → Bug 2070199 - Part 2: Let a SandboxingKind have several processes r?nika,gregtatum
Attachment #9643664 - Attachment description: WIP: Bug 2070199 - Part 3: Add HWInferenceProcess and the browser HWInference process r?nika,gregtatum → Bug 2070199 - Part 3: Add HWInferenceProcess and the browser HWInference process r?nika,gregtatum
Pushed by vpollet@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6c9623e436a0 https://hg.mozilla.org/integration/autoland/rev/41d5f0801edb Part 1: Manage PHWInference under PUtilityProcess r=gregtatum,ipc-reviewers,ai-platform-reviewers,jld https://github.com/mozilla-firefox/firefox/commit/63e51d87b90a https://hg.mozilla.org/integration/autoland/rev/5c70e66c7d27 Part 2: Let a SandboxingKind have several processes r=gregtatum,ipc-reviewers,sandbox-reviewers,chutten,jld https://github.com/mozilla-firefox/firefox/commit/96d1247815db https://hg.mozilla.org/integration/autoland/rev/1f09e6557c2a Part 3: Add HWInferenceProcess and the browser HWInference process r=nika,gregtatum,ai-platform-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
QA Whiteboard: [qa-triage-done-c160/b159]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: