From ce650f8c333de3130e1beb1e3caa213af385e085 Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 1 Sep 2002 21:41:24 +0000 Subject: Added fields for VM_MIN_ADDRESS, PS_STRINGS and stack protections to sysentvec. Initialized all fields of all sysentvecs, which will allow them to be used instead of constants in more places. Provided stack fixup routines for emulations that previously used the default. --- sys/kern/imgact_aout.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'sys/kern/imgact_aout.c') diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index 9573928..b3beb9f9 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -57,28 +57,46 @@ #include static int exec_aout_imgact(struct image_params *imgp); +static int aout_fixup(register_t **stack_base, struct image_params *imgp); struct sysentvec aout_sysvec = { SYS_MAXSYSCALL, sysent, 0, 0, + NULL, 0, - 0, - 0, - 0, - 0, + NULL, + NULL, + aout_fixup, sendsig, sigcode, &szsigcode, - 0, + NULL, "FreeBSD a.out", aout_coredump, NULL, - MINSIGSTKSZ + MINSIGSTKSZ, + PAGE_SIZE, + VM_MIN_ADDRESS, + VM_MAXUSER_ADDRESS, + USRSTACK, + PS_STRINGS, + VM_PROT_ALL, + exec_copyout_strings, + exec_setregs }; static int +aout_fixup(stack_base, imgp) + register_t **stack_base; + struct image_params *imgp; +{ + + return (suword(--(*stack_base), imgp->argc)); +} + +static int exec_aout_imgact(imgp) struct image_params *imgp; { -- cgit v1.1