diff options
author | John Baldwin <jhb@FreeBSD.org> | 2019-11-15 18:42:13 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2019-11-15 18:42:13 +0000 |
commit | e353233118b40ad89658630e5effe402c6e81fd7 (patch) | |
tree | 9781427ac5e9ffe63add763415ce7535585e9a3a /sys/sys/sysent.h | |
parent | 310399ac729d85bd35f4e9763f9168eed7c470cc (diff) | |
download | src-e353233118b40ad89658630e5effe402c6e81fd7.tar.gz src-e353233118b40ad89658630e5effe402c6e81fd7.zip |
Add a sv_copyout_auxargs() hook in sysentvec.
Change the FreeBSD ELF ABIs to use this new hook to copyout ELF auxv
instead of doing it in the sv_fixup hook. In particular, this new
hook allows the stack space to be allocated at the same time the auxv
values are copied out to userland. This allows us to avoid wasting
space for unused auxv entries as well as not having to recalculate
where the auxv vector is by walking back up over the argv and
environment vectors.
Reviewed by: brooks, emaste
Tested on: amd64 (amd64 and i386 binaries), i386, mips, mips64
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D22355
Notes
Notes:
svn path=/head/; revision=354741
Diffstat (limited to 'sys/sys/sysent.h')
-rw-r--r-- | sys/sys/sysent.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index e5d3d243a216..4c82c06c8476 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -110,6 +110,7 @@ struct sysentvec { /* function to dump core, or NULL */ int (*sv_imgact_try)(struct image_params *); void (*sv_stackgap)(struct image_params *, u_long *); + void (*sv_copyout_auxargs)(struct image_params *, u_long *); int sv_minsigstksz; /* minimum signal stack size */ vm_offset_t sv_minuser; /* VM_MIN_ADDRESS */ vm_offset_t sv_maxuser; /* VM_MAXUSER_ADDRESS */ |