From 9f54720e7b423efdb76c1538c1dd04a4194c724a Mon Sep 17 00:00:00 2001 From: nganhkhoa Date: Thu, 15 Jun 2023 10:43:35 +0700 Subject: [PATCH] don't remap region to READONLY TODO: Should remap to its original state before fix to READ|WRITE --- research/custom_loader/b.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/research/custom_loader/b.cc b/research/custom_loader/b.cc index 30c7b25..20892c7 100644 --- a/research/custom_loader/b.cc +++ b/research/custom_loader/b.cc @@ -757,9 +757,11 @@ void fix(struct libcache& cache) { printf(" resolved=%llx(%p)\n", *(uint64_t*)fix_at, resolved); } - for (int j = 0; j < npage_rw_fixed; j++) { - uint64_t start_page = page_rw_fixed[j]; - vm_protect_func(mach_task_self_func(), start_page, 0x4000, 0, VM_PROT_READ); + // TODO: Reformat the region as per before, or leave as it + // for (int j = 0; j < npage_rw_fixed; j++) { + // uint64_t start_page = page_rw_fixed[j]; + // vm_protect_func(mach_task_self_func(), start_page, 0x4000, 0, VM_PROT_READ); + // } } }