Commit 39774379 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Revert "[wx] Keep the execute bit while making code writable"

This reverts commit 3094d598.

Reason for revert: Breaks on Mac arm64:
https://ci.chromium.org/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20release/3109

Original change's description:
> [wx] Keep the execute bit while making code writable
>
> Otherwise SMC perturbs the icache too much it seems.
>
> Change-Id: Iceea779a7e3deee90efe29df568732d6ac5bcffa
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2753768
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Auto-Submit: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73355}

Change-Id: I4e85f6308ca22e366cdad4b621d233c3b1e3ed90
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756539
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#73378}
parent 3bb16433
...@@ -408,6 +408,7 @@ class PageAllocator { ...@@ -408,6 +408,7 @@ class PageAllocator {
kNoAccess, kNoAccess,
kRead, kRead,
kReadWrite, kReadWrite,
// TODO(hpayer): Remove this flag. Memory should never be rwx.
kReadWriteExecute, kReadWriteExecute,
kReadExecute, kReadExecute,
// Set this when reserving memory that will later require kReadWriteExecute // Set this when reserving memory that will later require kReadWriteExecute
......
...@@ -91,7 +91,7 @@ void MemoryChunk::SetReadAndWritable() { ...@@ -91,7 +91,7 @@ void MemoryChunk::SetReadAndWritable() {
DCHECK(IsAligned(unprotect_start, page_size)); DCHECK(IsAligned(unprotect_start, page_size));
size_t unprotect_size = RoundUp(area_size(), page_size); size_t unprotect_size = RoundUp(area_size(), page_size);
CHECK(reservation_.SetPermissions(unprotect_start, unprotect_size, CHECK(reservation_.SetPermissions(unprotect_start, unprotect_size,
PageAllocator::kReadWriteExecute)); PageAllocator::kReadWrite));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment