Skip to content

Commit

Permalink
x86_64: fixed a subtle bug in page context cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Sep 7, 2024
1 parent 1e513de commit 9aab931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/x86_64/cpu/paging.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 9aab931

Please sign in to comment.