Skip to content
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

Cherry-pick V8 fixes needed for Apple Silicon #35986

Closed
wants to merge 4 commits into from

Conversation

oleavr
Copy link
Contributor

@oleavr oleavr commented Nov 6, 2020

These four cherry-picked commits are needed to run Node.js on Apple
Silicon. Tested on macOS 11.0.1 Beta (20B5012d).

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the v8 engine Issues and PRs related to the V8 dependency. label Nov 6, 2020
@gengjiawen gengjiawen mentioned this pull request Nov 6, 2020
7 tasks
@Trott
Copy link
Member

Trott commented Nov 8, 2020

@nodejs/v8-update

@gengjiawen
Copy link
Member

gengjiawen commented Nov 9, 2020

Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM once updated as indicated by @richardlau

Original commit message:

    [wasm][mac] Support w^x codespaces for Apple Silicon

    Apple's upcoming arm64 devices will prevent rwx access to memory,
    but in turn provide a new per-thread way to switch between write
    and execute permissions. This patch puts that system to use for
    the WebAssembly subsystem.
    The approach relies on CodeSpaceWriteScope objects for now. That
    isn't optimal for background threads (which could stay in "write"
    mode permanently instead of toggling), but its simplicity makes
    it a good first step.

    Background:
    https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon

    Bug: chromium:1117591
    Change-Id: I3b60f0efd34c0fed924dfc71ee2c7805801c5d42
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378307
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69791}
Original commit message:

    [platform] Add Permission::kNoAccessWillJitLater enum value

    This value is unused for now. This CL is part 1 of a 3-step dance.
    Part 2 will be teaching Chrome's Platform implementation to accept
    the new value. Part 3 will then actually use it in V8.

    Bug: chromium:1117591
    Change-Id: Ie3aed20d4cc58f3def3be2a3a03bba4c3a37bf44
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2450056
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70335}
Original commit message:

    [mac] Set MAP_JIT only when necessary

    This is a "minimal" change to achieve the required goal: seeing that
    there is only one place where we need to indicate that memory should
    be reserved with MAP_JIT, we can add a value to the Permissions enum
    instead of adding a second, orthogonal parameter.
    That way we avoid changing public API functions, which makes this CL
    easier to undo once we have platform-independent w^x in Wasm.

    Bug: chromium:1117591
    Change-Id: I6333d69ab29d5900c689f08dcc892a5f1c1159b8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2435365
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70379}
Original commit message:

    [mac-arm64] Fix missing #include

    For an "#if defined(MAP_JIT)" test to work as expected, <sys/mman.h>
    must be included in the compilation unit.

    Bug: chromium:1144200
    Change-Id: Ia0bf35ec1872c02457f1fbc0ee6689c7f7d27d4a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2517689
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70986}
@Trott
Copy link
Member

Trott commented Nov 11, 2020

@richardlau I re-cherry-picked each commit and bumped the v8_embedder_string value each time. PTAL

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Nov 11, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 11, 2020
@nodejs-github-bot
Copy link
Collaborator

@gengjiawen gengjiawen added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 12, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 12, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Nov 12, 2020

@nodejs-github-bot
Copy link
Collaborator

@richardlau richardlau added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 12, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 12, 2020
codebytere pushed a commit that referenced this pull request Nov 22, 2020
Original commit message:

    [wasm][mac] Support w^x codespaces for Apple Silicon

    Apple's upcoming arm64 devices will prevent rwx access to memory,
    but in turn provide a new per-thread way to switch between write
    and execute permissions. This patch puts that system to use for
    the WebAssembly subsystem.
    The approach relies on CodeSpaceWriteScope objects for now. That
    isn't optimal for background threads (which could stay in "write"
    mode permanently instead of toggling), but its simplicity makes
    it a good first step.

    Background:
    https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon

    Bug: chromium:1117591
    Change-Id: I3b60f0efd34c0fed924dfc71ee2c7805801c5d42
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378307
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69791}

PR-URL: #35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
codebytere pushed a commit that referenced this pull request Nov 22, 2020
Original commit message:

    [platform] Add Permission::kNoAccessWillJitLater enum value

    This value is unused for now. This CL is part 1 of a 3-step dance.
    Part 2 will be teaching Chrome's Platform implementation to accept
    the new value. Part 3 will then actually use it in V8.

    Bug: chromium:1117591
    Change-Id: Ie3aed20d4cc58f3def3be2a3a03bba4c3a37bf44
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2450056
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70335}

PR-URL: #35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
codebytere pushed a commit that referenced this pull request Nov 22, 2020
Original commit message:

    [mac] Set MAP_JIT only when necessary

    This is a "minimal" change to achieve the required goal: seeing that
    there is only one place where we need to indicate that memory should
    be reserved with MAP_JIT, we can add a value to the Permissions enum
    instead of adding a second, orthogonal parameter.
    That way we avoid changing public API functions, which makes this CL
    easier to undo once we have platform-independent w^x in Wasm.

    Bug: chromium:1117591
    Change-Id: I6333d69ab29d5900c689f08dcc892a5f1c1159b8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2435365
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70379}

PR-URL: #35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
codebytere pushed a commit that referenced this pull request Nov 22, 2020
Original commit message:

    [mac-arm64] Fix missing #include

    For an "#if defined(MAP_JIT)" test to work as expected, <sys/mman.h>
    must be included in the compilation unit.

    Bug: chromium:1144200
    Change-Id: Ia0bf35ec1872c02457f1fbc0ee6689c7f7d27d4a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2517689
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70986}

PR-URL: #35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@codebytere codebytere mentioned this pull request Nov 22, 2020
bpresles pushed a commit to bpresles/node that referenced this pull request Feb 2, 2021
bpresles pushed a commit to bpresles/node that referenced this pull request Feb 2, 2021
bpresles pushed a commit to bpresles/node that referenced this pull request Feb 2, 2021
a60814billy pushed a commit to a60814billy/node that referenced this pull request Apr 2, 2021
Original commit message:
    deps: V8: cherry-pick 27e1ac1a79ff

        [wasm][mac] Support w^x codespaces for Apple Silicon

        Apple's upcoming arm64 devices will prevent rwx access to memory,
        but in turn provide a new per-thread way to switch between write
        and execute permissions. This patch puts that system to use for
        the WebAssembly subsystem.
        The approach relies on CodeSpaceWriteScope objects for now. That
        isn't optimal for background threads (which could stay in "write"
        mode permanently instead of toggling), but its simplicity makes
        it a good first step.

        Background:
        https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon

        Bug: chromium:1117591
        Change-Id: I3b60f0efd34c0fed924dfc71ee2c7805801c5d42
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378307
        Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
        Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
        Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#69791}

PR-URL: nodejs#35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
a60814billy pushed a commit to a60814billy/node that referenced this pull request Apr 2, 2021
Original commit message:
    deps: V8: cherry-pick 086eecbd96b6

    Original commit message:

        [platform] Add Permission::kNoAccessWillJitLater enum value

        This value is unused for now. This CL is part 1 of a 3-step dance.
        Part 2 will be teaching Chrome's Platform implementation to accept
        the new value. Part 3 will then actually use it in V8.

        Bug: chromium:1117591
        Change-Id: Ie3aed20d4cc58f3def3be2a3a03bba4c3a37bf44
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2450056
        Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
        Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#70335}

    PR-URL: nodejs#35986
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Richard Lau <rlau@redhat.com>
    Reviewed-By: Michael Dawson <midawson@redhat.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Beth Griggs <bgriggs@redhat.com>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
a60814billy pushed a commit to a60814billy/node that referenced this pull request Apr 2, 2021
Original commit message:
    deps: V8: cherry-pick 4e077ff0444a

    Original commit message:

        [mac] Set MAP_JIT only when necessary

        This is a "minimal" change to achieve the required goal: seeing that
        there is only one place where we need to indicate that memory should
        be reserved with MAP_JIT, we can add a value to the Permissions enum
        instead of adding a second, orthogonal parameter.
        That way we avoid changing public API functions, which makes this CL
        easier to undo once we have platform-independent w^x in Wasm.

        Bug: chromium:1117591
        Change-Id: I6333d69ab29d5900c689f08dcc892a5f1c1159b8
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2435365
        Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
        Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
        Reviewed-by: Clemens Backes <clemensb@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#70379}

    PR-URL: nodejs#35986
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Richard Lau <rlau@redhat.com>
    Reviewed-By: Michael Dawson <midawson@redhat.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Beth Griggs <bgriggs@redhat.com>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
a60814billy pushed a commit to a60814billy/node that referenced this pull request Apr 2, 2021
Original commit message:
    deps: V8: cherry-pick 1d0f426311d4

    Original commit message:

        [mac-arm64] Fix missing #include

        For an "#if defined(MAP_JIT)" test to work as expected, <sys/mman.h>
        must be included in the compilation unit.

        Bug: chromium:1144200
        Change-Id: Ia0bf35ec1872c02457f1fbc0ee6689c7f7d27d4a
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2517689
        Reviewed-by: Clemens Backes <clemensb@chromium.org>
        Reviewed-by: Igor Sheludko <ishell@chromium.org>
        Reviewed-by: Nico Weber <thakis@chromium.org>
        Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#70986}

    PR-URL: nodejs#35986
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Richard Lau <rlau@redhat.com>
    Reviewed-By: Michael Dawson <midawson@redhat.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Beth Griggs <bgriggs@redhat.com>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
a60814billy pushed a commit to a60814billy/node that referenced this pull request Apr 2, 2021
Original commit message:

    [platform] Add Permission::kNoAccessWillJitLater enum value

    This value is unused for now. This CL is part 1 of a 3-step dance.
    Part 2 will be teaching Chrome's Platform implementation to accept
    the new value. Part 3 will then actually use it in V8.

    Bug: chromium:1117591
    Change-Id: Ie3aed20d4cc58f3def3be2a3a03bba4c3a37bf44
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2450056
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70335}

PR-URL: nodejs#35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
a60814billy pushed a commit to a60814billy/node that referenced this pull request Apr 2, 2021
Original commit message:

    [mac] Set MAP_JIT only when necessary

    This is a "minimal" change to achieve the required goal: seeing that
    there is only one place where we need to indicate that memory should
    be reserved with MAP_JIT, we can add a value to the Permissions enum
    instead of adding a second, orthogonal parameter.
    That way we avoid changing public API functions, which makes this CL
    easier to undo once we have platform-independent w^x in Wasm.

    Bug: chromium:1117591
    Change-Id: I6333d69ab29d5900c689f08dcc892a5f1c1159b8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2435365
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70379}

PR-URL: nodejs#35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
a60814billy pushed a commit to a60814billy/node that referenced this pull request Apr 2, 2021
Original commit message:

    [mac-arm64] Fix missing #include

    For an "#if defined(MAP_JIT)" test to work as expected, <sys/mman.h>
    must be included in the compilation unit.

    Bug: chromium:1144200
    Change-Id: Ia0bf35ec1872c02457f1fbc0ee6689c7f7d27d4a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2517689
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70986}

PR-URL: nodejs#35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@targos targos added backported-to-v14.x and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Apr 11, 2021
targos pushed a commit that referenced this pull request Apr 11, 2021
Original commit message:

    [wasm][mac] Support w^x codespaces for Apple Silicon

    Apple's upcoming arm64 devices will prevent rwx access to memory,
    but in turn provide a new per-thread way to switch between write
    and execute permissions. This patch puts that system to use for
    the WebAssembly subsystem.
    The approach relies on CodeSpaceWriteScope objects for now. That
    isn't optimal for background threads (which could stay in "write"
    mode permanently instead of toggling), but its simplicity makes
    it a good first step.

    Background:
    https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon

    Bug: chromium:1117591
    Change-Id: I3b60f0efd34c0fed924dfc71ee2c7805801c5d42
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378307
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69791}

Backport-PR-URL: #38051
Co-authored-by: BoHong Li <a60814billy@gmail.com>

PR-URL: #35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
targos pushed a commit that referenced this pull request Apr 11, 2021
Original commit message:

    [platform] Add Permission::kNoAccessWillJitLater enum value

    This value is unused for now. This CL is part 1 of a 3-step dance.
    Part 2 will be teaching Chrome's Platform implementation to accept
    the new value. Part 3 will then actually use it in V8.

    Bug: chromium:1117591
    Change-Id: Ie3aed20d4cc58f3def3be2a3a03bba4c3a37bf44
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2450056
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70335}

Backport-PR-URL: #38051
Co-authored-by: BoHong Li <a60814billy@gmail.com>

PR-URL: #35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
targos pushed a commit that referenced this pull request Apr 11, 2021
Original commit message:

    [mac] Set MAP_JIT only when necessary

    This is a "minimal" change to achieve the required goal: seeing that
    there is only one place where we need to indicate that memory should
    be reserved with MAP_JIT, we can add a value to the Permissions enum
    instead of adding a second, orthogonal parameter.
    That way we avoid changing public API functions, which makes this CL
    easier to undo once we have platform-independent w^x in Wasm.

    Bug: chromium:1117591
    Change-Id: I6333d69ab29d5900c689f08dcc892a5f1c1159b8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2435365
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70379}

Backport-PR-URL: #38051
Co-authored-by: BoHong Li <a60814billy@gmail.com>

PR-URL: #35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
targos pushed a commit that referenced this pull request Apr 11, 2021
Original commit message:

    [mac-arm64] Fix missing #include

    For an "#if defined(MAP_JIT)" test to work as expected, <sys/mman.h>
    must be included in the compilation unit.

    Bug: chromium:1144200
    Change-Id: Ia0bf35ec1872c02457f1fbc0ee6689c7f7d27d4a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2517689
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70986}

Backport-PR-URL: #38051
Co-authored-by: BoHong Li <a60814billy@gmail.com>

PR-URL: #35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@danielleadams danielleadams mentioned this pull request May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet