Remove the stack guard page. Processes are now contiguous from 0 to proc->sz, which means our syscall argument validation is correct. Add a pointer validation test and remove the stack test, which tested for the guard page.
This commit is contained in:
parent
41c4bbb505
commit
b1d41d6788
3 changed files with 42 additions and 24 deletions
1
exec.c
1
exec.c
|
|
@ -52,7 +52,6 @@ exec(char *path, char **argv)
|
|||
|
||||
// Allocate and initialize stack at sz
|
||||
sz = PGROUNDUP(sz);
|
||||
sz += PGSIZE; // leave an invalid page
|
||||
if(!allocuvm(pgdir, (char *)sz, PGSIZE))
|
||||
goto bad;
|
||||
mem = uva2ka(pgdir, (char *)sz);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue