From 9aab9311b7a59c688edda44c0e76331e5f458f2c Mon Sep 17 00:00:00 2001 From: jewelcodes Date: Sat, 7 Sep 2024 13:31:14 -0400 Subject: [PATCH] x86_64: fixed a subtle bug in page context cloning --- src/platform/x86_64/cpu/paging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/x86_64/cpu/paging.c b/src/platform/x86_64/cpu/paging.c index b4039b3..dabe33b 100644 --- a/src/platform/x86_64/cpu/paging.c +++ b/src/platform/x86_64/cpu/paging.c @@ -287,7 +287,7 @@ void *platformCloneUserSpace(uintptr_t parent) { uint64_t ptr = oldPML4[i] & ~(PAGE_SIZE-1); uint64_t flags = oldPML4[i] & (PAGE_SIZE-1); if(oldPML4[i]) { - newPML4[i] = clonePagingLayer(ptr, 1) | flags; + newPML4[i] = clonePagingLayer(ptr, 0) | flags; } }