aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/imgact_aout.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2022-01-17 16:42:07 +0000
committerMark Johnston <markj@FreeBSD.org>2022-01-17 16:42:07 +0000
commit3fc21fdd5f8a4eeb71f43cc6841f59ef1debaf9a (patch)
tree155862815375048ec6efce0502a2e65764fb5e9e /sys/kern/imgact_aout.c
parent1544f5add8c72c28e939a1557e3e319c6cfe5008 (diff)
downloadsrc-3fc21fdd5f8a4eeb71f43cc6841f59ef1debaf9a.tar.gz
src-3fc21fdd5f8a4eeb71f43cc6841f59ef1debaf9a.zip
sysent: Add a sv_psstringssz field to struct sysentvec
The size of the ps_strings structure varies between ABIs, so this is useful for computing the address of the ps_strings structure relative to the top of the stack when stack address randomization is enabled. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33704
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r--sys/kern/imgact_aout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index f5d5628c05c6..6510488c3edd 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -89,6 +89,7 @@ struct sysentvec aout_sysvec = {
.sv_maxuser = AOUT32_USRSTACK,
.sv_usrstack = AOUT32_USRSTACK,
.sv_psstrings = AOUT32_PS_STRINGS,
+ .sv_psstringssz = sizeof(struct ps_strings),
.sv_stackprot = VM_PROT_ALL,
.sv_copyout_strings = exec_copyout_strings,
.sv_setregs = exec_setregs,
@@ -139,6 +140,7 @@ struct sysentvec aout_sysvec = {
.sv_maxuser = AOUT32_USRSTACK,
.sv_usrstack = AOUT32_USRSTACK,
.sv_psstrings = AOUT32_PS_STRINGS,
+ .sv_psstringssz = sizeof(struct freebsd32_ps_strings),
.sv_stackprot = VM_PROT_ALL,
.sv_copyout_strings = freebsd32_copyout_strings,
.sv_setregs = ia32_setregs,