summaryrefslogtreecommitdiff
path: root/sys/kern/exec_elf.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-01-20 19:43:22 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-01-20 19:43:22 +0000
commit843caa662411e1f3f1e091acabce370c6a712e79 (patch)
tree5d68f36941775458a22730ff493a8a3c35ae9f91 /sys/kern/exec_elf.c
parentb210c6a192929f24e3f8117e2f39fd32bf98e86c (diff)
Move ps_strings "after" the random stackgap. This makes its location a
per-process value, and therefpore turns the VM_PSSTRINGS sysctl into a per-process one as well. This gets rid of a pointer to the bottom of the stack at a fixed location. Also clears the road for unmapping the stackgap. ok deraadt@
Diffstat (limited to 'sys/kern/exec_elf.c')
-rw-r--r--sys/kern/exec_elf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c
index 4fcedcf6c1e..8954eabca0e 100644
--- a/sys/kern/exec_elf.c
+++ b/sys/kern/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.108 2014/12/22 15:05:24 kettenis Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.109 2015/01/20 19:43:21 kettenis Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -1200,7 +1200,7 @@ ELFNAMEEND(coredump_notes)(struct proc *p, void *iocookie, size_t *sizep)
iov.iov_len = sizeof(pss);
uio.uio_iov = &iov;
uio.uio_iovcnt = 1;
- uio.uio_offset = (off_t)(vaddr_t)PS_STRINGS;
+ uio.uio_offset = (off_t)pr->ps_strings;
uio.uio_resid = sizeof(pss);
uio.uio_segflg = UIO_SYSSPACE;
uio.uio_rw = UIO_READ;