From e3e6fb54895d0e5939e2bc9b4bd8fcfccd783e7f Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 21 Dec 2021 23:25:23 +0300 Subject: [PATCH] Don't use vm::preallocated flag in patch enclave allocs --- Utilities/bin_patch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/bin_patch.cpp b/Utilities/bin_patch.cpp index 3a45d6c16a..e83e886b35 100644 --- a/Utilities/bin_patch.cpp +++ b/Utilities/bin_patch.cpp @@ -576,7 +576,7 @@ static usz apply_modification(std::basic_string& applied, const patch_engin const u32 alloc_size = utils::align(static_cast(p.value.long_value) + alloc_at % 4096, 4096); // Allocate map if needed, if allocated flags will indicate that bit 62 is set (unique identifier) - auto alloc_map = vm::reserve_map(vm::any, alloc_at & -0x10000, utils::align(alloc_size, 0x10000), vm::page_size_64k | vm::preallocated | (1ull << 62)); + auto alloc_map = vm::reserve_map(vm::any, alloc_at & -0x10000, utils::align(alloc_size, 0x10000), vm::page_size_64k | (1ull << 62)); u64 flags = vm::alloc_unwritable;