-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for V8 sandbox in the extension host #202385
Comments
Upstream issue for discussion https://bugs.chromium.org/p/v8/issues/detail?id=14585 |
Please read up on the Background section first. For additional context on the V8 sandbox you can refer to the official blog post. Since Electron v22 we have been floating the patch described in the Solution section with our custom build. However, this is not preferred for the long term for following reasons,
As a step forward, we approached the V8 team to see if a feature to support array buffers with backing stores outside the V8 sandbox could be possible https://issues.chromium.org/issues/42204529. Thanks to the V8 team for being receptive and proposing ideas that we could prototype. A quick summary of the attempted approach,
The idea was to have this feature behind a compile time flag in upstream V8 or maybe even a patch in OSS Electron if the changes were minimal. But as seen in the prototype it is hard to do either. Moreover, once V8 sandbox starts using hardware support, we cannot have external tables with pointer entries that could write outside the sandbox. Based on these learnings, we will adopt the following steps towards removing the allocator patch.
Note: Special thanks to Samuel Groß from the V8 team for being responsive on the CLs and guiding me through the prototype. |
Issue is starting point to reduce the patch set added for #177338 in our internal builds and a way to get electron/electron#37582 into OSS Electron.
Patch at chromium layer is about a way to initialize the configurable pool for the utility process. At the moment, the configurable pool is only meant to be used by V8 array buffer allocations. First step would be to create a discussion with upstream to see if there is interest in exposing the pool for embedder use case.
Second patch at chromium layer disables BRP feature for utility process since the configurable pool does not work with the feature. This can be also be solved as part of 1)
Once the above points are resolved we should be able to move the PR in Electron forward no patch overhead.The text was updated successfully, but these errors were encountered: