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:
Austin Clements 2010-09-01 16:46:37 -04:00
parent 41c4bbb505
commit b1d41d6788
3 changed files with 42 additions and 24 deletions

1
exec.c
View file

@ -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);