1. 20 May, 2022 1 commit
  2. 19 May, 2022 2 commits
  3. 17 May, 2022 2 commits
  4. 13 May, 2022 1 commit
  5. 12 May, 2022 2 commits
  6. 11 May, 2022 1 commit
  7. 05 May, 2022 1 commit
  8. 28 Apr, 2022 1 commit
    • Igor Sheludko's avatar
      Reland "[rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)" · 449ece38
      Igor Sheludko authored
      This is a reland of commit 9d31f866
      There were issues with --future flag implications on M1.
      
      Original change's description:
      > [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)
      >
      > ... for V8 code space. The feature is currently disabled.
      >
      > In order to use fast W^X permission switching we must allocate
      > executable pages with readable writable executable permissions (RWX).
      > However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further
      > permission changing of RWX memory pages. This means that the code page
      > headers must be allocated with RWX permissions too because otherwise
      > it wouldn't be possible to allocate a large code page over the freed
      > regular code page and vice versa.
      >
      > When enabled, the new machinery works as follows:
      >
      > 1) when memory region is reserved for allocating executable pages, the
      >    whole region is committed with RWX permissions and then decommitted,
      > 2) since reconfiguration of RWX page permissions is not allowed on
      >    MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts
      >    to change them,
      > 3) the request to set RWX permissions in the executable page region
      >    just recommits the pages without changing permissions (see (1), they
      >    were already allocated as RWX and then discarded),
      > 4) in order to make executable pages inaccessible one must use
      >    OS::DiscardSystemPages() instead of OS::DecommitPages() or
      >    setting permissions to kNoAccess because the latter two are not
      >    allowed by the MacOS (see (2)).
      > 5) since code space page headers are allocated as RWX pages it's also
      >    necessary to switch between W^X modes when updating the data in the
      >    page headers (i.e. when marking, updating stats, wiring pages in
      >    lists, etc.). The new CodePageHeaderModificationScope class is used
      >    in the respective places. On unrelated configurations it's a no-op.
      >
      > The fast permission switching can't be used for V8 configuration with
      > enabled pointer compression and disabled external code space because
      > a) the pointer compression cage has to be reserved with MAP_JIT flag
      >    which is too expensive,
      > b) in case of shared pointer compression cage if the code range will
      >    be deleted while the cage is still alive then attempt to configure
      >    permissions of pages that were previously set to RWX will fail.
      >
      > This also CL extends the unmapper unit tests with permissions tracking
      > for discarded pages.
      >
      > Bug: v8:12797
      > Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#80238}
      
      Bug: v8:12797
      Change-Id: I0fe86666f31bad37d7074e217555c95900d2afba
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610433Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80259}
      449ece38
  9. 27 Apr, 2022 2 commits
    • Adam Klein's avatar
      Revert "[rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)" · 10807c9f
      Adam Klein authored
      This reverts commit 9d31f866.
      
      Reason for revert: crashes on Mac/arm64 bots:
      https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug/5923/overview
      
      Original change's description:
      > [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)
      >
      > ... for V8 code space. The feature is currently disabled.
      >
      > In order to use fast W^X permission switching we must allocate
      > executable pages with readable writable executable permissions (RWX).
      > However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further
      > permission changing of RWX memory pages. This means that the code page
      > headers must be allocated with RWX permissions too because otherwise
      > it wouldn't be possible to allocate a large code page over the freed
      > regular code page and vice versa.
      >
      > When enabled, the new machinery works as follows:
      >
      > 1) when memory region is reserved for allocating executable pages, the
      >    whole region is committed with RWX permissions and then decommitted,
      > 2) since reconfiguration of RWX page permissions is not allowed on
      >    MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts
      >    to change them,
      > 3) the request to set RWX permissions in the executable page region
      >    just recommits the pages without changing permissions (see (1), they
      >    were already allocated as RWX and then discarded),
      > 4) in order to make executable pages inaccessible one must use
      >    OS::DiscardSystemPages() instead of OS::DecommitPages() or
      >    setting permissions to kNoAccess because the latter two are not
      >    allowed by the MacOS (see (2)).
      > 5) since code space page headers are allocated as RWX pages it's also
      >    necessary to switch between W^X modes when updating the data in the
      >    page headers (i.e. when marking, updating stats, wiring pages in
      >    lists, etc.). The new CodePageHeaderModificationScope class is used
      >    in the respective places. On unrelated configurations it's a no-op.
      >
      > The fast permission switching can't be used for V8 configuration with
      > enabled pointer compression and disabled external code space because
      > a) the pointer compression cage has to be reserved with MAP_JIT flag
      >    which is too expensive,
      > b) in case of shared pointer compression cage if the code range will
      >    be deleted while the cage is still alive then attempt to configure
      >    permissions of pages that were previously set to RWX will fail.
      >
      > This also CL extends the unmapper unit tests with permissions tracking
      > for discarded pages.
      >
      > Bug: v8:12797
      > Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#80238}
      
      Bug: v8:12797
      Change-Id: Ic07948e036db36326d464a2a901d052aa060a406
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3611665
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Auto-Submit: Adam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80239}
      10807c9f
    • Igor Sheludko's avatar
      [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1) · 9d31f866
      Igor Sheludko authored
      ... for V8 code space. The feature is currently disabled.
      
      In order to use fast W^X permission switching we must allocate
      executable pages with readable writable executable permissions (RWX).
      However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further
      permission changing of RWX memory pages. This means that the code page
      headers must be allocated with RWX permissions too because otherwise
      it wouldn't be possible to allocate a large code page over the freed
      regular code page and vice versa.
      
      When enabled, the new machinery works as follows:
      
      1) when memory region is reserved for allocating executable pages, the
         whole region is committed with RWX permissions and then decommitted,
      2) since reconfiguration of RWX page permissions is not allowed on
         MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts
         to change them,
      3) the request to set RWX permissions in the executable page region
         just recommits the pages without changing permissions (see (1), they
         were already allocated as RWX and then discarded),
      4) in order to make executable pages inaccessible one must use
         OS::DiscardSystemPages() instead of OS::DecommitPages() or
         setting permissions to kNoAccess because the latter two are not
         allowed by the MacOS (see (2)).
      5) since code space page headers are allocated as RWX pages it's also
         necessary to switch between W^X modes when updating the data in the
         page headers (i.e. when marking, updating stats, wiring pages in
         lists, etc.). The new CodePageHeaderModificationScope class is used
         in the respective places. On unrelated configurations it's a no-op.
      
      The fast permission switching can't be used for V8 configuration with
      enabled pointer compression and disabled external code space because
      a) the pointer compression cage has to be reserved with MAP_JIT flag
         which is too expensive,
      b) in case of shared pointer compression cage if the code range will
         be deleted while the cage is still alive then attempt to configure
         permissions of pages that were previously set to RWX will fail.
      
      This also CL extends the unmapper unit tests with permissions tracking
      for discarded pages.
      
      Bug: v8:12797
      Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80238}
      9d31f866
  10. 25 Apr, 2022 1 commit
  11. 22 Apr, 2022 1 commit
  12. 20 Apr, 2022 1 commit
  13. 19 Apr, 2022 3 commits
  14. 18 Apr, 2022 1 commit
    • Deepti Gandluri's avatar
      Revert "[rwx][mac] Introduce RwxMemoryWriteScope" · e73757be
      Deepti Gandluri authored
      This reverts commit 4d8e1846.
      
      Reason for revert: Blocks V8 roll, crbug.com/1316800
      
      Original change's description:
      > [rwx][mac] Introduce RwxMemoryWriteScope
      >
      > ... as a single bottleneck that encapsulates the semantics and
      > implementation of fast per-thread W^X permission switching supported
      > by Apple Silicon (arm64 M1).
      > On other architectures this class is a no-op.
      >
      > Bug: v8:12797
      > Change-Id: Ica842ff9f843e20b7f61fd7e80591e7a1fd29771
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3586986
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79994}
      
      Bug: v8:12797
      Change-Id: I81792567839e72b4147d009c0845b0c0de003eb0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3590752
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
      Owners-Override: Deepti Gandluri <gdeepti@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80007}
      e73757be
  15. 14 Apr, 2022 2 commits
  16. 11 Apr, 2022 1 commit
  17. 08 Apr, 2022 2 commits
  18. 06 Apr, 2022 1 commit
    • Clemens Backes's avatar
      Reland "[wasm] --liftoff-only should disable --wasm-dynamic-tiering" · 489f43b4
      Clemens Backes authored
      This is a reland of commit 54e360d1.
      The two WasmGC cctests which require SSE4.1 support in Liftoff are now
      skipped, so we can keep disallowing any bailout (even for missing CPU
      features) in --liftoff-only.
      
      Original change's description:
      > [wasm] --liftoff-only should disable --wasm-dynamic-tiering
      >
      > A Liftoff only configuration should never tier up to TurboFan, hence add
      > a proper implication to disable dynamic tiering if --liftoff-only is
      > set.
      > Also, add a DCHECK to ensure we never accidentally compile with TurboFan
      > if --liftoff-only is set.
      >
      > R=jkummerow@chromium.org
      >
      > Bug: v8:12281
      > Change-Id: Ia9b81add503cc939f59fde3f4d3bb67252facf2c
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3569741
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79779}
      
      Bug: v8:12281
      Change-Id: I334bd81f75c3ef6d31b6117da5ef59a33fb46ae2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3572043Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79813}
      489f43b4
  19. 05 Apr, 2022 1 commit
    • Leszek Swirski's avatar
      [test] Make cctest run one test, with maybe custom platform · 49c507dc
      Leszek Swirski authored
      Remove cctest's ability to run multiple tests (which has long been
      deprecated and mostly broken). We can then make platform & V8
      initialisation be part of running the test's Run method.
      
      In particular, this allows us to inject custom logic into the platform
      initialisation, like setting up a platform wrapper. Add a
      TEST_WITH_PLATFORM which exercises this by registering a platform
      factory on the test, and wrapping the default platform using this
      factory. This allows these tests to guarantee that the lifetime of the
      platform is longer than the lifetime of the isolate.
      
      As a result of this, we can also remove the complexity around draining
      platform state in the TestPlatform (since it will now have a longer
      lifetime than the Isolate using it), and as a drive-by clean up the
      TestPlaform to use a CcTest-global "default platform" instead of trying
      to scope over the "current" platform.
      
      As another drive-by, change the linked-list of CcTests and the linear
      search through it into an std::map of tests.
      
      Change-Id: I610f6312fe042f29f45cc4dfba311e4184bc7759
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3569223Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79772}
      49c507dc
  20. 01 Apr, 2022 1 commit
  21. 31 Mar, 2022 1 commit
    • Manos Koukoutos's avatar
      Reland "[wasm-gc] Implement isorecursive canonicalization" · cfa8d0b3
      Manos Koukoutos authored
      This is a reland of commit e76ad5c6
      
      Changes compared to original:
      - Move invocation of LAZY_INSTANCE_INITIALIZER to a static global
        variable, as some builds were failing with a function-level static.
      - Drive-by: Improve documentation a bit.
      
      Original change's description:
      > [wasm-gc] Implement isorecursive canonicalization
      >
      > This implements isorecursive canonicalization for static types.
      >
      > Not implemented in this CL:
      > - Runtime type canonicalization.
      > - Cross-module signature canonicalization for purposes of call_indirect.
      >
      > Bug: v8:7748
      > Change-Id: I6214f947444eea8d7b15a29b35c94c3d07ddb525
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3541925
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79665}
      
      Bug: v8:7748
      Change-Id: I493fba1906491762f7d8bae50108e3e4a743391d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560480Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79692}
      cfa8d0b3
  22. 30 Mar, 2022 2 commits
  23. 23 Mar, 2022 2 commits
  24. 14 Mar, 2022 1 commit
  25. 08 Mar, 2022 1 commit
  26. 03 Mar, 2022 2 commits
  27. 01 Mar, 2022 1 commit
  28. 25 Feb, 2022 1 commit
  29. 18 Feb, 2022 1 commit