diff options
author | jake <jake@FreeBSD.org> | 2002-09-21 22:07:17 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-09-21 22:07:17 +0000 |
commit | 2b71a04b1e46f7a598269467b77323fad8f53189 (patch) | |
tree | 5a29a2272e4b65acf468c2f877289cf21786b297 /sys/i386 | |
parent | 5ea401e1a679065a9e8506758d9735855dc7a419 (diff) | |
download | FreeBSD-src-2b71a04b1e46f7a598269467b77323fad8f53189.zip FreeBSD-src-2b71a04b1e46f7a598269467b77323fad8f53189.tar.gz |
Use the fields in the sysentvec and in the vm map header in place of the
constants VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK and PS_STRINGS.
This is mainly so that they can be variable even for the native abi, based
on different machine types. Get stack protections from the sysentvec too.
This makes it trivial to map the stack non-executable for certain abis, on
machines that support it.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/ibcs2/imgact_coff.c | 2 | ||||
-rw-r--r-- | sys/i386/linux/imgact_linux.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c index 8cf4475..fb5f537 100644 --- a/sys/i386/ibcs2/imgact_coff.c +++ b/sys/i386/ibcs2/imgact_coff.c @@ -336,7 +336,7 @@ exec_coff_imgact(imgp) goto fail; } - exec_new_vmspace(imgp, VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK); + exec_new_vmspace(imgp, &ibcs2_svr3_sysvec); vmspace = imgp->proc->p_vmspace; for (i = 0; i < nscns; i++) { diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c index 4b493d1..934902c 100644 --- a/sys/i386/linux/imgact_linux.c +++ b/sys/i386/linux/imgact_linux.c @@ -121,7 +121,7 @@ exec_linux_imgact(imgp) /* * Destroy old process VM and create a new one (with a new stack) */ - exec_new_vmspace(imgp, VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK); + exec_new_vmspace(imgp, &linux_sysvec); vmspace = imgp->proc->p_vmspace; /* |