diff options
author | Jake Burkholder <jake@FreeBSD.org> | 2002-09-01 21:41:24 +0000 |
---|---|---|
committer | Jake Burkholder <jake@FreeBSD.org> | 2002-09-01 21:41:24 +0000 |
commit | f36ba45234e29c86aa1d00093022d2f6c49f9c38 (patch) | |
tree | d075a9970497c96d66b9507960a9e101b7f40fb7 /sys/i386/ibcs2 | |
parent | 0f8a5e9b3f362fbe67a42cbd8c45f873629555a9 (diff) | |
download | src-f36ba45234e29c86aa1d00093022d2f6c49f9c38.tar.gz src-f36ba45234e29c86aa1d00093022d2f6c49f9c38.zip |
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.
Notes
Notes:
svn path=/head/; revision=102808
Diffstat (limited to 'sys/i386/ibcs2')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_sysvec.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/sys/i386/ibcs2/ibcs2_sysvec.c b/sys/i386/ibcs2/ibcs2_sysvec.c index 60dd5ca453d3..d7078efc0a64 100644 --- a/sys/i386/ibcs2/ibcs2_sysvec.c +++ b/sys/i386/ibcs2/ibcs2_sysvec.c @@ -32,6 +32,9 @@ #include <sys/param.h> #include <sys/kernel.h> +#include <sys/systm.h> +#include <sys/exec.h> +#include <sys/imgact.h> #include <sys/lock.h> #include <sys/module.h> #include <sys/sysent.h> @@ -39,6 +42,10 @@ #include <sys/proc.h> #include <sys/sx.h> +#include <vm/vm.h> +#include <vm/pmap.h> +#include <vm/vm_param.h> + #include <i386/ibcs2/ibcs2_syscall.h> #include <i386/ibcs2/ibcs2_signal.h> @@ -48,6 +55,7 @@ extern int bsd_to_ibcs2_errno[]; extern struct sysent ibcs2_sysent[IBCS2_SYS_MAXSYSCALL]; extern int szsigcode; extern char sigcode[]; +static int ibcs2_fixup(register_t **, struct image_params *); struct sysentvec ibcs2_svr3_sysvec = { sizeof (ibcs2_sysent) / sizeof (ibcs2_sysent[0]), @@ -57,18 +65,33 @@ struct sysentvec ibcs2_svr3_sysvec = { bsd_to_ibcs2_sig, ELAST + 1, bsd_to_ibcs2_errno, - 0, /* trap-to-signal translation function */ - 0, /* fixup */ + NULL, /* trap-to-signal translation function */ + ibcs2_fixup, /* fixup */ sendsig, sigcode, /* use generic trampoline */ &szsigcode, /* use generic trampoline size */ - 0, /* prepsyscall */ + NULL, /* prepsyscall */ "IBCS2 COFF", NULL, /* we don't have a COFF coredump function */ NULL, - IBCS2_MINSIGSTKSZ + IBCS2_MINSIGSTKSZ, + PAGE_SIZE, + VM_MIN_ADDRESS, + VM_MAXUSER_ADDRESS, + USRSTACK, + PS_STRINGS, + VM_PROT_ALL, + exec_copyout_strings, + exec_setregs }; +static int +ibcs2_fixup(register_t **stack_base, struct image_params *imgp) +{ + + return (suword(--(*stack_base), imgp->argc)); +} + /* * Create an "ibcs2" module that does nothing but allow checking for * the presence of the subsystem. |