You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Improve memory map tricks
- In `unmap_all`, replace readable pages atomically with mmap + mremap - Create new function `remap_all` to replace pages with equivalent anonymous copies to prevent simple maps name scanning
This commit is contained in:
@@ -106,6 +106,7 @@ static void first_stage_entry() {
|
||||
// Load second stage
|
||||
setenv(INJECT_ENV_2, "1", 1);
|
||||
void *handle = dlopen(path, RTLD_LAZY);
|
||||
remap_all(path);
|
||||
|
||||
// Revert path to 1st stage lib
|
||||
*(strrchr(path, '.') - 1) = '1';
|
||||
|
||||
Reference in New Issue
Block a user