summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-09-21 22:07:17 +0000
committerjake <jake@FreeBSD.org>2002-09-21 22:07:17 +0000
commit2b71a04b1e46f7a598269467b77323fad8f53189 (patch)
tree5a29a2272e4b65acf468c2f877289cf21786b297 /sys/fs/procfs
parent5ea401e1a679065a9e8506758d9735855dc7a419 (diff)
downloadFreeBSD-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/fs/procfs')
-rw-r--r--sys/fs/procfs/procfs_status.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c
index 6e5711b..9e255ae 100644
--- a/sys/fs/procfs/procfs_status.c
+++ b/sys/fs/procfs/procfs_status.c
@@ -53,6 +53,7 @@
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/sbuf.h>
+#include <sys/sysent.h>
#include <sys/tty.h>
#include <vm/vm.h>
@@ -191,7 +192,8 @@ procfs_doproccmdline(PFS_FILL_ARGS)
if (p != td->td_proc) {
sbuf_printf(sb, "%.*s", MAXCOMLEN, p->p_comm);
} else {
- error = copyin((void*)PS_STRINGS, &pstr, sizeof(pstr));
+ error = copyin((void *)p->p_sysent->sv_psstrings, &pstr,
+ sizeof(pstr));
if (error)
return (error);
for (i = 0; i < pstr.ps_nargvstr; i++) {
OpenPOWER on IntegriCloud