diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2021-10-19 17:14:04 +0100 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-10-29 02:59:12 +0000 |
commit | 2b6640734494caeb24cc8f0b839ffcdf1a402c61 (patch) | |
tree | fb530e0d302071bab9b3cbfdfe2e7ce424596520 /runtime | |
parent | 1a6e422b8636244cb801bbb9f1d2ac50a1693e23 (diff) |
Allow PROT_EXEC on the zygote mappings when falling back to ashmem
Because we now protect the mappings before creating the executable one,
we need to also allow PROT_EXEC on an ashmem region.
Test: manually change code to use ashmem, build, see that JIT is
created.
Bug: 202999239
Merged-In: I9f2944c45f4ff607c7e341552c82138bfe13cca4
(cherry picked from commit 8c63ce27d4d3e87f535769976e9b9185fa372b9b)
Change-Id: I8a5e9655e6c40404389344e78c21b0ebd5a1a4b9
(cherry picked from commit 94e2fc9465e9a2c9d62902b09ed9a18d9250ccd8)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/jit/jit_memory_region.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/jit/jit_memory_region.cc b/runtime/jit/jit_memory_region.cc index b0699c42d3..56407f58c0 100644 --- a/runtime/jit/jit_memory_region.cc +++ b/runtime/jit/jit_memory_region.cc @@ -556,7 +556,7 @@ bool JitMemoryRegion::ProtectZygoteMemory(int fd, std::string* error_msg) { return false; } } else { - palette_status_t status = PaletteAshmemSetProtRegion(fd, PROT_READ); + palette_status_t status = PaletteAshmemSetProtRegion(fd, PROT_READ | PROT_EXEC); if (status != PALETTE_STATUS_OK) { CHECK_EQ(status, PALETTE_STATUS_CHECK_ERRNO); std::ostringstream oss; |