Update setup_stack to temporarily fake set-up for a stack to prevent page faults in no arg user programs

This commit is contained in:
sBubshait
2024-11-06 15:48:27 +00:00
parent ab716de0a6
commit fcb7e9e441

View File

@@ -457,7 +457,7 @@ setup_stack (void **esp)
{
success = install_page (((uint8_t *) PHYS_BASE) - PGSIZE, kpage, true);
if (success)
*esp = PHYS_BASE;
*esp = PHYS_BASE - 12;
else
palloc_free_page (kpage);
}