Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@zarvox
Copy link
Contributor

@zarvox zarvox commented Feb 19, 2020

On Fuchsia, we can now get executable VMOs from trusted backing
filesystems. This allows us to remove the use of replace_as_executable
in favor of opening files with fdio_open_fd_at with the
OPEN_RIGHT_EXECUTABLE flag and getting VMOs by calling
fdio_get_vmo_exec.

By moving the responsibility for executability into the filesystem, we
should be able to remove deprecated-ambient-replace-as-executable from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator).

Test: verified locally that this works on Astro on a _user build with
the runtime allowlist tightened.

On Fuchsia, we can now get executable VMOs from trusted backing
filesystems.  This allows us to remove the use of replace_as_executable
in favor of opening files with `fdio_open_fd_at` with the
`OPEN_RIGHT_EXECUTABLE` flag and getting VMOs by calling
`fdio_get_vmo_exec`.

By moving the responsibility for executability into the filesystem, we
should be able to remove deprecated-ambient-replace-as-executable from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator).

Test: verified locally that this works on Astro on a _user build with
the runtime allowlist tightened.
@zarvox zarvox force-pushed the zarvox-replace-as-executable branch from 0cac653 to e4feef4 Compare February 19, 2020 22:15
@chinmaygarde chinmaygarde merged commit ff921cd into flutter:master Feb 25, 2020
@zarvox zarvox deleted the zarvox-replace-as-executable branch February 25, 2020 21:54
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 26, 2020
dnfield pushed a commit to flutter/flutter that referenced this pull request Feb 26, 2020
* 05dd023 Roll src/third_party/dart 73f6d15665a3..7aa824076c34 (11 commits) (flutter/engine#16780)

* 9f439d9 Roll src/third_party/skia 19304d88c8be..6d927b63a311 (3 commits) (flutter/engine#16782)

* effd8a0 Roll src/third_party/skia 6d927b63a311..a6572f78d084 (3 commits) (flutter/engine#16783)

* af90e8b Manually add third_party/dart/pkg/stagehand to DEPS (flutter/engine#16785)

* ae999f0 Roll fuchsia/sdk/core/mac-amd64 from O6w2L... to 8gjOI... (flutter/engine#16787)

* d0897c3 Roll src/third_party/dart 7aa824076c34..2ce1df76309d (11 commits) (flutter/engine#16788)

* 7af8d3e Roll src/third_party/skia a6572f78d084..c8d092a060ad (1 commits) (flutter/engine#16789)

* fb3dc86 Roll src/third_party/dart 2ce1df76309d..85f6d51c3fd1 (6 commits) (flutter/engine#16792)

* 468b371 Roll src/third_party/skia c8d092a060ad..7a6db4cbf48b (2 commits) (flutter/engine#16795)

* ff921cd fuchsia: remove use of replace_as_executable (flutter/engine#16690)

* d590e98 Evict BitmapCanvas(s) from cache when canvas allocation fails (flutter/engine#16793)

* 52070e3 Fix handler unregistration in C++ channels  (flutter/engine#16794)

* 592b3ff Roll src/third_party/skia 7a6db4cbf48b..d8575452ebf3 (3 commits) (flutter/engine#16799)

* 9ac76ad [web] changing user limits for macos (flutter/engine#16797)

* 7685e08 [web] Guard the remaining calls to window.onPlatformMessage (flutter/engine#16791)

* 3286543 Roll src/third_party/skia d8575452ebf3..adc9bbb2aaca (2 commits) (flutter/engine#16801)

* 29cff9e Roll fuchsia/sdk/core/mac-amd64 from 8gjOI... to 3B3a6... (flutter/engine#16803)

* fc3a15e Roll src/third_party/skia adc9bbb2aaca..7b96793ccc5b (3 commits) (flutter/engine#16804)

* f1a9dc1 Roll src/third_party/skia 7b96793ccc5b..f0a13d04c233 (1 commits) (flutter/engine#16805)

* ecabc10 Roll src/third_party/dart 85f6d51c3fd1..418923733006 (30 commits) (flutter/engine#16813)
iskakaushik pushed a commit to iskakaushik/engine that referenced this pull request Feb 27, 2020
NoamDev pushed a commit to NoamDev/engine that referenced this pull request Feb 27, 2020
On Fuchsia, we can now get executable VMOs from trusted backing
filesystems.  This allows us to remove the use of replace_as_executable
in favor of opening files with `fdio_open_fd_at` with the
`OPEN_RIGHT_EXECUTABLE` flag and getting VMOs by calling
`fdio_get_vmo_exec`.

By moving the responsibility for executability into the filesystem, we
should be able to remove deprecated-ambient-replace-as-executable from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator).

Test: verified locally that this works on Astro on a _user build with
the runtime allowlist tightened.
NoamDev added a commit to NoamDev/engine that referenced this pull request Feb 27, 2020
iskakaushik added a commit that referenced this pull request Feb 27, 2020
zarvox added a commit to zarvox/engine that referenced this pull request Mar 25, 2020
On Fuchsia, we can now get executable VMOs from trusted backing
filesystems.  This allows us to remove the use of replace_as_executable
in favor of opening files with `fdio_open_fd_at` with the
`OPEN_RIGHT_EXECUTABLE` flag and getting VMOs by calling
`fdio_get_vmo_exec`.

By moving the responsibility for executability into the filesystem, we
are able to remove `deprecated-ambient-replace-as-executable` from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator).  It wasn't abundantly clear
whether .cmx files for tests were used purely in AOT runtime
environments or also saw JIT usage, so I left those as-is.

Testing: I verified locally that the flutter product runner works on
Astro, and also successfully ran the Dart JIT example test (which was
the thing blocking the google3 roll with the previous attempt at this
patchset).
zarvox added a commit to zarvox/engine that referenced this pull request Mar 25, 2020
On Fuchsia, we can now get executable VMOs from trusted backing
filesystems.  This allows us to remove the use of replace_as_executable
in favor of opening files with `fdio_open_fd_at` with the
`OPEN_RIGHT_EXECUTABLE` flag and getting VMOs by calling
`fdio_get_vmo_exec`.

By moving the responsibility for executability into the filesystem, we
are able to remove `deprecated-ambient-replace-as-executable` from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator).  It wasn't abundantly clear
whether .cmx files for tests were used purely in AOT runtime
environments or also saw JIT usage, so I left those as-is.

For context: this is a second attempt at flutter#16690, which was reverted
because it broke the Dart JIT runner.  The primary difference is that
this time around, we correctly handle absolute vs relative paths,
depending on whether library loading bottoms out in `fdio_open_fd` or
`fdio_open_fd_at`.  I've added additional assertions to help ensure any
new usages use the correct shape of path.

Testing: I verified locally that the flutter product runner works on
Astro, and also successfully ran the Dart JIT example test (which was
the thing blocking the google3 roll with the previous attempt at this
patchset).
zarvox added a commit that referenced this pull request Mar 25, 2020
On Fuchsia, we can now get executable VMOs from trusted backing
filesystems.  This allows us to remove the use of replace_as_executable
in favor of opening files with `fdio_open_fd_at` with the
`OPEN_RIGHT_EXECUTABLE` flag and getting VMOs by calling
`fdio_get_vmo_exec`.

By moving the responsibility for executability into the filesystem, we
are able to remove `deprecated-ambient-replace-as-executable` from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator).  It wasn't abundantly clear
whether .cmx files for tests were used purely in AOT runtime
environments or also saw JIT usage, so I left those as-is.

For context: this is a second attempt at #16690, which was reverted
because it broke the Dart JIT runner.  The primary difference is that
this time around, we correctly handle absolute vs relative paths,
depending on whether library loading bottoms out in `fdio_open_fd` or
`fdio_open_fd_at`.  I've added additional assertions to help ensure any
new usages use the correct shape of path.

Testing: I verified locally that the flutter product runner works on
Astro, and also successfully ran the Dart JIT example test (which was
the thing blocking the google3 roll with the previous attempt at this
patchset).

Co-authored-by: Drew Fisher <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants