aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/exec.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sys/exec.h')
-rw-r--r--sys/sys/exec.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/exec.h b/sys/sys/exec.h
index ccd7eb0ecd7d..94d2f698bd63 100644
--- a/sys/sys/exec.h
+++ b/sys/sys/exec.h
@@ -77,7 +77,8 @@ struct execsw {
* Prefer the kern.ps_strings or kern.proc.ps_strings sysctls to this constant.
*/
#define PS_STRINGS (USRSTACK - sizeof(struct ps_strings))
-#define PROC_PS_STRINGS(p) ((p)->p_sysent->sv_psstrings)
+#define PROC_PS_STRINGS(p) \
+ ((p)->p_vmspace->vm_stacktop - (p)->p_sysent->sv_psstringssz)
int exec_map_first_page(struct image_params *);
void exec_unmap_first_page(struct image_params *);