summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
authorAustin Clements <[email protected]>2010-09-01 16:46:37 -0400
committerAustin Clements <[email protected]>2010-09-01 16:46:37 -0400
commitb1d41d678888fd1a51e4844ab583f7c47f9fb218 (patch)
tree623672a6f55e819aa3db670d7db9ea3311bd4a1c /syscall.c
parent41c4bbb505f4389a5c1660b407cd4073d7a72aab (diff)
downloadxv6-labs-b1d41d678888fd1a51e4844ab583f7c47f9fb218.tar.gz
xv6-labs-b1d41d678888fd1a51e4844ab583f7c47f9fb218.tar.bz2
xv6-labs-b1d41d678888fd1a51e4844ab583f7c47f9fb218.zip
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.
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/syscall.c b/syscall.c
index 9296cff..f8aeae7 100644
--- a/syscall.c
+++ b/syscall.c
@@ -22,8 +22,6 @@ fetchint(struct proc *p, uint addr, int *ip)
return 0;
}
-// XXX should we copy the string?
-
// Fetch the nul-terminated string at addr from process p.
// Doesn't actually copy the string - just sets *pp to point at it.
// Returns length of string, not including nul.
@@ -62,8 +60,7 @@ argptr(int n, char **pp, int size)
return -1;
if((uint)i >= proc->sz || (uint)i+size >= proc->sz)
return -1;
- // *pp = proc->mem + i; // XXXXX
- *pp = (char *) i; // XXXXX
+ *pp = (char *) i;
return 0;
}