From 2b71a04b1e46f7a598269467b77323fad8f53189 Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 21 Sep 2002 22:07:17 +0000 Subject: 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. --- sys/fs/procfs/procfs_status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/fs/procfs') 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 #include #include +#include #include #include @@ -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++) { -- cgit v1.1