Skip to content

feat: enable mixed-sandbox mode by default - #15894

Merged
nornagon merged 6 commits into
masterfrom
enable-mixed-sandbox
Jan 22, 2019
Merged

nornagon merged 6 commits into
masterfrom
enable-mixed-sandbox

Conversation

@nornagon

@nornagon nornagon commented Nov 29, 2018 •

Copy link
Copy Markdown
Contributor

Description of Change

Currently, in order to launch some renderers sandboxed, an app must enable mixed-sandbox mode either with the command-line switch --enable-mixed-sandbox or the app.enableMixedSandbox() API. This PR will deprecate that switch, and make mixed-sandbox mode the default. Renderers launched with sandbox: true will now be actually sandboxed, where previously they would only be sandboxed if mixed-sandbox mode was also enabled.

Depends on #15870 for mixed-sandbox mode to be meaningful on Linux.

Checklist

Release Notes

Notes: Mixed-sandbox mode is now enabled by default. enableMixedSandbox and the --enable-mixed-sandbox command-line switch still exist for compatibility, but are deprecated and have no effect.

@nornagon
nornagon requested review from a team November 29, 2018 22:52
@miniak

miniak commented Dec 3, 2018 •

Copy link
Copy Markdown
Contributor

Be aware that

  • GPU process is going to be sandboxed, this should not have any negative effect on apps
  • pepper plugin host processes are going to be sandboxed, this might be a breaking change if apps depend on so-called host-native pepper plugins (should be possible to add an option to opt-out of sandbox for particular plugin / MIME type maybe)

cc @nornagon

@nornagon nornagon mentioned this pull request Dec 3, 2018
2 of 5 tasks
@nornagon
nornagon force-pushed the enable-mixed-sandbox branch from 3f9eaa3 to 7421cc3 Compare December 3, 2018 23:32
@nornagon

nornagon commented Dec 6, 2018

Copy link
Copy Markdown
Contributor Author

Additionally, devtools processes will be sandboxed.

@MarshallOfSound

Copy link
Copy Markdown
Member

@nornagon will that break devtron?

@zcbenz zcbenz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nornagon
After enabling sandbox mode for devtools process, the devtools extension APIs implementation would switch to use remote for Node.js builtin modules instead of using fs module directly.

However currently remote is not fully supported in devtools process. The devtools extensions are loaded as iframes, so there would be multiple frames using remote module in one process, but the current model of remote assumes only the main frame would use remote module. This results in devtools extensions not working correctly with mixed sandbox mode.

I tried to modify remote to be friendly with multi-frames process, but it turns out to be a harder problem than I expect.

I propose disabling sandbox for devtools process in this PR for now, and enable it after we made remote capable of handling multi-frames process. Otherwise this PR would be blocked for quite a while.

@nornagon
nornagon force-pushed the enable-mixed-sandbox branch from 7421cc3 to e7d4d4d Compare December 6, 2018 20:12
@nornagon

nornagon commented Dec 6, 2018

Copy link
Copy Markdown
Contributor Author

Pushed a change which unsandboxes devtools processes.

@zcbenz

zcbenz commented Dec 7, 2018

Copy link
Copy Markdown
Contributor

@nornagon The Linux CI are still failing for devtools tests, it seems that sandbox are still enabled for devtools process because of zygote process?

@nornagon

nornagon commented Dec 7, 2018 •

Copy link
Copy Markdown
Contributor Author

As mentioned in the PR description, this depends on #15870, i think i just need to rebase

@nornagon

nornagon commented Dec 7, 2018

Copy link
Copy Markdown
Contributor Author

hm, actually it looks like that PR is already merged in the base of this PR. I'll investigate.

@nornagon
nornagon force-pushed the enable-mixed-sandbox branch from e7d4d4d to 19e16f7 Compare January 18, 2019 19:23
@nornagon
nornagon requested review from a team January 18, 2019 19:23
@nornagon
nornagon force-pushed the enable-mixed-sandbox branch from 19e16f7 to b597fd9 Compare January 18, 2019 19:43
@nornagon

Copy link
Copy Markdown
Contributor Author

@zcbenz linux tests are now passing; i think the ARM failures are unrelated

@zcbenz zcbenz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nornagon

Copy link
Copy Markdown
Contributor Author

Talked with @miniak and agreed that we can follow up on the ppapi sandboxing stuff during the beta cycle.

@nornagon
nornagon merged commit 92b9525 into master Jan 22, 2019
@release-clerk

release-clerk Bot commented Jan 22, 2019

Copy link
Copy Markdown

Release Notes Persisted

Mixed-sandbox mode is now enabled by default. enableMixedSandbox and the --enable-mixed-sandbox command-line switch still exist for compatibility, but are deprecated and have no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants