diff options
author | John Baldwin <jhb@FreeBSD.org> | 2019-12-03 23:17:54 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2019-12-03 23:17:54 +0000 |
commit | 31174518d2db4950b8bc8ab02e64cdb5e00d34c9 (patch) | |
tree | 2c830969197705d2f745734684051163c5b29ec5 /sys/kern/imgact_aout.c | |
parent | d00066a5f923073113bcb0213ca7a0a9a29b9561 (diff) | |
download | src-31174518d2db4950b8bc8ab02e64cdb5e00d34c9.tar.gz src-31174518d2db4950b8bc8ab02e64cdb5e00d34c9.zip |
Use uintptr_t instead of register_t * for the stack base.
- Use ustringp for the location of the argv and environment strings
and allow destp to travel further down the stack for the stackgap
and auxv regions.
- Update the Linux copyout_strings variants to move destp down the
stack as was done for the native ABIs in r263349.
- Stop allocating a space for a stack gap in the Linux ABIs. This
used to hold translated system call arguments, but hasn't been used
since r159992.
Reviewed by: kib
Tested on: md64 (amd64, i386, linux64), i386 (i386, linux)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D22501
Notes
Notes:
svn path=/head/; revision=355373
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r-- | sys/kern/imgact_aout.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index 0ca39b69d908..fa72a1952b30 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); #endif static int exec_aout_imgact(struct image_params *imgp); -static int aout_fixup(register_t **stack_base, struct image_params *imgp); +static int aout_fixup(uintptr_t *stack_base, struct image_params *imgp); #define AOUT32_USRSTACK 0xbfc00000 @@ -147,11 +147,13 @@ struct sysentvec aout_sysvec = { #endif static int -aout_fixup(register_t **stack_base, struct image_params *imgp) +aout_fixup(uintptr_t *stack_base, struct image_params *imgp) { - *(char **)stack_base -= sizeof(uint32_t); - return (suword32(*stack_base, imgp->args->argc)); + *stack_base -= sizeof(uint32_t); + if (suword32((void *)*stack_base, imgp->args->argc) != 0) + return (EFAULT); + return (0); } static int |