diff options
| author | chs <chs@NetBSD.org> | 2003-08-24 17:52:28 +0000 |
|---|---|---|
| committer | chs <chs@NetBSD.org> | 2003-08-24 17:52:28 +0000 |
| commit | 939df36e552ea9012b7b0d0d15080f894ebaaaff (patch) | |
| tree | 2c4be187b10b4d03eedeccd43a6ba2359fa195e0 /sys/compat | |
| parent | 4b28d28d7028d98186f61c78a41660eb73edde00 (diff) | |
add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default. the changes
fall into two basic catagories:
- pmap and trap-handler changes. these are all MD:
= alpha: we already track per-page execute permission with the (software)
PG_EXEC bit, so just have the trap handler pay attention to it.
= i386: use a new GDT segment for %cs for processes that have no
executable mappings above a certain threshold (currently the
bottom of the stack). track per-page execute permission with
the last unused PTE bit.
= powerpc/ibm4xx: just use the hardware exec bit.
= powerpc/oea: we already track per-page exec bits, but the hardware only
implements non-exec mappings at the segment level. so track the
number of executable mappings in each segment and turn on the no-exec
segment bit iff the count is 0. adjust the trap handler to deal.
= sparc (sun4m): fix our use of the hardware protection bits.
fix the trap handler to recognize text faults.
= sparc64: split the existing unified TSB into data and instruction TSBs,
and only load TTEs into the appropriate TSB(s) for the permissions.
fix the trap handler to check for execute permission.
= not yet implemented: amd64, hppa, sh5
- changes in all the emulations that put a signal trampoline on the stack.
instead, we now put the trampoline into a uvm_aobj and map that into
the process separately.
originally from openbsd, adapted for netbsd by me.
Diffstat (limited to 'sys/compat')
| -rw-r--r-- | sys/compat/aout/aout_exec.c | 9 | ||||
| -rw-r--r-- | sys/compat/aoutm68k/aoutm68k_exec.c | 9 | ||||
| -rw-r--r-- | sys/compat/darwin/darwin_exec.c | 7 | ||||
| -rw-r--r-- | sys/compat/freebsd/freebsd_exec.c | 7 | ||||
| -rw-r--r-- | sys/compat/hpux/hpux_exec.c | 7 | ||||
| -rw-r--r-- | sys/compat/ibcs2/ibcs2_exec.c | 7 | ||||
| -rw-r--r-- | sys/compat/irix/irix_exec.c | 5 | ||||
| -rw-r--r-- | sys/compat/irix/irix_exec.h | 3 | ||||
| -rw-r--r-- | sys/compat/linux/arch/i386/linux_machdep.c | 8 | ||||
| -rw-r--r-- | sys/compat/linux/common/linux_exec.c | 8 | ||||
| -rw-r--r-- | sys/compat/mach/mach_exec.c | 7 | ||||
| -rw-r--r-- | sys/compat/netbsd32/netbsd32_netbsd.c | 7 | ||||
| -rw-r--r-- | sys/compat/osf1/osf1_exec.c | 7 | ||||
| -rw-r--r-- | sys/compat/pecoff/pecoff_emul.c | 7 | ||||
| -rw-r--r-- | sys/compat/sunos/sunos_exec.c | 9 | ||||
| -rw-r--r-- | sys/compat/sunos32/sunos32_exec.c | 7 | ||||
| -rw-r--r-- | sys/compat/svr4/svr4_exec.c | 7 | ||||
| -rw-r--r-- | sys/compat/svr4_32/svr4_32_exec.c | 7 | ||||
| -rw-r--r-- | sys/compat/ultrix/ultrix_misc.c | 7 |
19 files changed, 92 insertions, 43 deletions
diff --git a/sys/compat/aout/aout_exec.c b/sys/compat/aout/aout_exec.c index d64203387ef..15c7e56f97c 100644 --- a/sys/compat/aout/aout_exec.c +++ b/sys/compat/aout/aout_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: aout_exec.c,v 1.15 2002/11/01 19:26:21 jdolecek Exp $ */ +/* $NetBSD: aout_exec.c,v 1.16 2003/08/24 17:52:40 chs Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aout_exec.c,v 1.15 2002/11/01 19:26:21 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aout_exec.c,v 1.16 2003/08/24 17:52:40 chs Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -62,7 +62,9 @@ void syscall_intern __P((struct proc *)); void syscall __P((void)); #endif -struct emul emul_netbsd_aout = { +struct uvm_object *emul_netbsd_aout_object; + +const struct emul emul_netbsd_aout = { "netbsd", "/emul/aout", #ifndef __HAVE_MINIMAL_EMUL @@ -81,6 +83,7 @@ struct emul emul_netbsd_aout = { trapsignal, sigcode, esigcode, + &emul_netbsd_aout_object, setregs, NULL, NULL, diff --git a/sys/compat/aoutm68k/aoutm68k_exec.c b/sys/compat/aoutm68k/aoutm68k_exec.c index 80bb5f50088..e7c1df81549 100644 --- a/sys/compat/aoutm68k/aoutm68k_exec.c +++ b/sys/compat/aoutm68k/aoutm68k_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: aoutm68k_exec.c,v 1.12 2002/11/10 20:59:04 jdolecek Exp $ */ +/* $NetBSD: aoutm68k_exec.c,v 1.13 2003/08/24 17:52:40 chs Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aoutm68k_exec.c,v 1.12 2002/11/10 20:59:04 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aoutm68k_exec.c,v 1.13 2003/08/24 17:52:40 chs Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -59,7 +59,9 @@ extern const char * const aoutm68k_syscallnames[]; extern char sigcode[], esigcode[]; void aoutm68k_syscall_intern __P((struct proc *)); -struct emul emul_netbsd_aoutm68k = { +struct uvm_object *emul_netbsd_aoutm68k_object; + +const struct emul emul_netbsd_aoutm68k = { "aoutm68k", "/emul/aout", #ifndef __HAVE_MINIMAL_EMUL @@ -78,6 +80,7 @@ struct emul emul_netbsd_aoutm68k = { trapsignal, sigcode, esigcode, + &emul_netbsd_aoutm68k_object, setregs, NULL, NULL, diff --git a/sys/compat/darwin/darwin_exec.c b/sys/compat/darwin/darwin_exec.c index 1e9f1161b74..257053be570 100644 --- a/sys/compat/darwin/darwin_exec.c +++ b/sys/compat/darwin/darwin_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_exec.c,v 1.16 2003/06/29 22:29:15 fvdl Exp $ */ +/* $NetBSD: darwin_exec.c,v 1.17 2003/08/24 17:52:40 chs Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.16 2003/06/29 22:29:15 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.17 2003/08/24 17:52:40 chs Exp $"); #include "opt_syscall_debug.h" @@ -80,6 +80,8 @@ void syscall(void); void mach_syscall_intern(struct proc *); #endif +struct uvm_object *emul_darwin_object; + const struct emul emul_darwin = { "darwin", "/emul/darwin", @@ -99,6 +101,7 @@ const struct emul emul_darwin = { trapsignal, sigcode, esigcode, + &emul_darwin_object, setregs, darwin_e_proc_exec, darwin_e_proc_fork, diff --git a/sys/compat/freebsd/freebsd_exec.c b/sys/compat/freebsd/freebsd_exec.c index 5bdc2b69947..3e8970dd184 100644 --- a/sys/compat/freebsd/freebsd_exec.c +++ b/sys/compat/freebsd/freebsd_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_exec.c,v 1.19 2002/11/01 19:26:21 jdolecek Exp $ */ +/* $NetBSD: freebsd_exec.c,v 1.20 2003/08/24 17:52:41 chs Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: freebsd_exec.c,v 1.19 2002/11/01 19:26:21 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: freebsd_exec.c,v 1.20 2003/08/24 17:52:41 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -50,6 +50,8 @@ void syscall_intern __P((struct proc *)); void syscall __P((void)); #endif +struct uvm_object *emul_freebsd_object; + const struct emul emul_freebsd = { "freebsd", "/emul/freebsd", @@ -65,6 +67,7 @@ const struct emul emul_freebsd = { trapsignal, freebsd_sigcode, freebsd_esigcode, + &emul_freebsd_object, freebsd_setregs, NULL, NULL, diff --git a/sys/compat/hpux/hpux_exec.c b/sys/compat/hpux/hpux_exec.c index 2725c311074..07aef00ba70 100644 --- a/sys/compat/hpux/hpux_exec.c +++ b/sys/compat/hpux/hpux_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpux_exec.c,v 1.37 2003/06/29 22:29:17 fvdl Exp $ */ +/* $NetBSD: hpux_exec.c,v 1.38 2003/08/24 17:52:41 chs Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpux_exec.c,v 1.37 2003/06/29 22:29:17 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpux_exec.c,v 1.38 2003/08/24 17:52:41 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -108,6 +108,8 @@ void hpux_syscall_intern __P((struct proc *)); void syscall __P((void)); #endif +struct uvm_object *emul_hpux_object; + const struct emul emul_hpux = { "hpux", "/emul/hpux", @@ -123,6 +125,7 @@ const struct emul emul_hpux = { trapsignal, sigcode, esigcode, + &emul_hpux_object, hpux_setregs, NULL, NULL, diff --git a/sys/compat/ibcs2/ibcs2_exec.c b/sys/compat/ibcs2/ibcs2_exec.c index f9f799291e9..19b13519d68 100644 --- a/sys/compat/ibcs2/ibcs2_exec.c +++ b/sys/compat/ibcs2/ibcs2_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_exec.c,v 1.52 2002/12/21 15:48:57 kristerw Exp $ */ +/* $NetBSD: ibcs2_exec.c,v 1.53 2003/08/24 17:52:42 chs Exp $ */ /* * Copyright (c) 1994, 1995, 1998 Scott Bartram @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec.c,v 1.52 2002/12/21 15:48:57 kristerw Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec.c,v 1.53 2003/08/24 17:52:42 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -67,6 +67,8 @@ void syscall __P((void)); int ibcs2_debug = 1; #endif +struct uvm_object *emul_ibcs2_object; + const struct emul emul_ibcs2 = { "ibcs2", "/emul/ibcs2", @@ -82,6 +84,7 @@ const struct emul emul_ibcs2 = { trapsignal, ibcs2_sigcode, ibcs2_esigcode, + &emul_ibcs2_object, ibcs2_setregs, ibcs2_e_proc_exec, NULL, diff --git a/sys/compat/irix/irix_exec.c b/sys/compat/irix/irix_exec.c index 52d291c2bfe..eea32b964e1 100644 --- a/sys/compat/irix/irix_exec.c +++ b/sys/compat/irix/irix_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: irix_exec.c,v 1.29 2003/06/28 08:31:16 he Exp $ */ +/* $NetBSD: irix_exec.c,v 1.30 2003/08/24 17:52:42 chs Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.29 2003/06/28 08:31:16 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.30 2003/08/24 17:52:42 chs Exp $"); #ifdef _KERNEL_OPT #include "opt_syscall_debug.h" @@ -98,6 +98,7 @@ const struct emul emul_irix = { trapsignal, NULL, NULL, + NULL, setregs, irix_e_proc_exec, irix_e_proc_fork, diff --git a/sys/compat/irix/irix_exec.h b/sys/compat/irix/irix_exec.h index b7b1c5c5eac..c8886aba089 100644 --- a/sys/compat/irix/irix_exec.h +++ b/sys/compat/irix/irix_exec.h @@ -1,4 +1,4 @@ -/* $NetBSD: irix_exec.h,v 1.19 2003/06/29 22:29:22 fvdl Exp $ */ +/* $NetBSD: irix_exec.h,v 1.20 2003/08/24 17:52:42 chs Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -107,6 +107,5 @@ int irix_elf64_probe __P((struct proc *, struct exec_package *, void *, void irix_n32_setregs __P((struct lwp *, struct exec_package *, u_long)); extern const struct emul emul_irix; -extern const struct emul emul_irix; #endif /* !_IRIX_EXEC_H_ */ diff --git a/sys/compat/linux/arch/i386/linux_machdep.c b/sys/compat/linux/arch/i386/linux_machdep.c index b6f9497bc8c..245a29af05f 100644 --- a/sys/compat/linux/arch/i386/linux_machdep.c +++ b/sys/compat/linux/arch/i386/linux_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.c,v 1.94 2003/08/21 08:36:56 hannken Exp $ */ +/* $NetBSD: linux_machdep.c,v 1.95 2003/08/24 17:52:43 chs Exp $ */ /*- * Copyright (c) 1995, 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.94 2003/08/21 08:36:56 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.95 2003/08/24 17:52:43 chs Exp $"); #if defined(_KERNEL_OPT) #include "opt_vm86.h" @@ -174,7 +174,7 @@ linux_setregs(l, epp, stack) tf->tf_ecx = 0; tf->tf_eax = 0; tf->tf_eip = epp->ep_entry; - tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL); + tf->tf_cs = GSEL(GUCODEBIG_SEL, SEL_UPL); tf->tf_eflags = PSL_USERSET; tf->tf_esp = stack; tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL); @@ -413,7 +413,7 @@ linux_old_sendsig(sig, mask, code) tf->tf_es = GSEL(GUDATA_SEL, SEL_UPL); tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL); tf->tf_eip = (int)p->p_sigctx.ps_sigcode; - tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL); + tf->tf_cs = GSEL(GUCODEBIG_SEL, SEL_UPL); tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC); tf->tf_esp = (int)fp; tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL); diff --git a/sys/compat/linux/common/linux_exec.c b/sys/compat/linux/common/linux_exec.c index b61cb0f0b0e..8525d570fb3 100644 --- a/sys/compat/linux/common/linux_exec.c +++ b/sys/compat/linux/common/linux_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.c,v 1.64 2003/06/29 22:29:26 fvdl Exp $ */ +/* $NetBSD: linux_exec.c,v 1.65 2003/08/24 17:52:43 chs Exp $ */ /*- * Copyright (c) 1994, 1995, 1998, 2000 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.64 2003/06/29 22:29:26 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.65 2003/08/24 17:52:43 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -111,6 +111,9 @@ linux_sys_execve(l, v, retval) /* * Emulation switch. */ + +struct uvm_object *emul_linux_object; + const struct emul emul_linux = { "linux", "/emul/linux", @@ -126,6 +129,7 @@ const struct emul emul_linux = { linux_trapsignal, linux_sigcode, linux_esigcode, + &emul_linux_object, linux_setregs, linux_e_proc_exec, linux_e_proc_fork, diff --git a/sys/compat/mach/mach_exec.c b/sys/compat/mach/mach_exec.c index 4ddd949d945..cbd572b7c6f 100644 --- a/sys/compat/mach/mach_exec.c +++ b/sys/compat/mach/mach_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: mach_exec.c,v 1.32 2003/06/29 22:29:34 fvdl Exp $ */ +/* $NetBSD: mach_exec.c,v 1.33 2003/08/24 17:52:44 chs Exp $ */ /*- * Copyright (c) 2001-2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mach_exec.c,v 1.32 2003/06/29 22:29:34 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mach_exec.c,v 1.33 2003/08/24 17:52:44 chs Exp $"); #include "opt_syscall_debug.h" @@ -78,6 +78,8 @@ void syscall(void); void mach_syscall_intern(struct proc *); #endif +struct uvm_object *emul_mach_object; + const struct emul emul_mach = { "mach", "/emul/mach", @@ -97,6 +99,7 @@ const struct emul emul_mach = { trapsignal, sigcode, esigcode, + &emul_mach_object, setregs, mach_e_proc_exec, mach_e_proc_fork, diff --git a/sys/compat/netbsd32/netbsd32_netbsd.c b/sys/compat/netbsd32/netbsd32_netbsd.c index 60ed7f75bff..6bacc27ff18 100644 --- a/sys/compat/netbsd32/netbsd32_netbsd.c +++ b/sys/compat/netbsd32/netbsd32_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_netbsd.c,v 1.73 2003/06/29 22:29:39 fvdl Exp $ */ +/* $NetBSD: netbsd32_netbsd.c,v 1.74 2003/08/24 17:52:44 chs Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.73 2003/06/29 22:29:39 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.74 2003/08/24 17:52:44 chs Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -107,6 +107,8 @@ void netbsd32_syscall_intern __P((struct proc *)); void syscall __P((void)); #endif +struct uvm_object *emul_netbsd32_object; + const struct emul emul_netbsd32 = { "netbsd32", "/emul/netbsd32", @@ -126,6 +128,7 @@ const struct emul emul_netbsd32 = { trapsignal, netbsd32_sigcode, netbsd32_esigcode, + &emul_netbsd32_object, netbsd32_setregs, NULL, NULL, diff --git a/sys/compat/osf1/osf1_exec.c b/sys/compat/osf1/osf1_exec.c index 9e614a8b203..3a1d4f74c9b 100644 --- a/sys/compat/osf1/osf1_exec.c +++ b/sys/compat/osf1/osf1_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_exec.c,v 1.31 2002/11/01 19:26:23 jdolecek Exp $ */ +/* $NetBSD: osf1_exec.c,v 1.32 2003/08/24 17:52:44 chs Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: osf1_exec.c,v 1.31 2002/11/01 19:26:23 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_exec.c,v 1.32 2003/08/24 17:52:44 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -52,6 +52,8 @@ void osf1_syscall_intern __P((struct proc *)); void syscall __P((void)); #endif +struct uvm_object *emul_osf1_object; + const struct emul emul_osf1 = { "osf1", "/emul/osf1", @@ -67,6 +69,7 @@ const struct emul emul_osf1 = { trapsignal, osf1_sigcode, osf1_esigcode, + &emul_osf1_object, setregs, NULL, NULL, diff --git a/sys/compat/pecoff/pecoff_emul.c b/sys/compat/pecoff/pecoff_emul.c index 5b8c39e59b3..c974915f657 100644 --- a/sys/compat/pecoff/pecoff_emul.c +++ b/sys/compat/pecoff/pecoff_emul.c @@ -1,4 +1,4 @@ -/* $NetBSD: pecoff_emul.c,v 1.5 2003/06/23 15:10:03 martin Exp $ */ +/* $NetBSD: pecoff_emul.c,v 1.6 2003/08/24 17:52:45 chs Exp $ */ /* * Copyright (c) 2000 Masaru OKI @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pecoff_emul.c,v 1.5 2003/06/23 15:10:03 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pecoff_emul.c,v 1.6 2003/08/24 17:52:45 chs Exp $"); /*#define DEBUG_PECOFF*/ @@ -75,6 +75,8 @@ void syscall_intern(struct proc *); void syscall(void); #endif +struct uvm_object *emul_pecoff_object; + const struct emul emul_pecoff = { "pecoff", "/emul/pecoff", @@ -94,6 +96,7 @@ const struct emul emul_pecoff = { trapsignal, sigcode, esigcode, + &emul_pecoff_object, setregs, NULL, NULL, diff --git a/sys/compat/sunos/sunos_exec.c b/sys/compat/sunos/sunos_exec.c index ed1bbc7863c..eb3280fba40 100644 --- a/sys/compat/sunos/sunos_exec.c +++ b/sys/compat/sunos/sunos_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunos_exec.c,v 1.40 2002/11/10 20:59:03 jdolecek Exp $ */ +/* $NetBSD: sunos_exec.c,v 1.41 2003/08/24 17:52:45 chs Exp $ */ /* * Copyright (c) 1993 Theo de Raadt @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunos_exec.c,v 1.40 2002/11/10 20:59:03 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos_exec.c,v 1.41 2003/08/24 17:52:45 chs Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -57,7 +57,9 @@ void sunos_syscall_intern __P((struct proc *)); void syscall __P((void)); #endif -struct emul emul_sunos = { +struct uvm_object *emul_sunos_object; + +const struct emul emul_sunos = { "sunos", "/emul/sunos", #ifndef __HAVE_MINIMAL_EMUL @@ -76,6 +78,7 @@ struct emul emul_sunos = { trapsignal, sunos_sigcode, sunos_esigcode, + &emul_sunos_object, setregs, NULL, NULL, diff --git a/sys/compat/sunos32/sunos32_exec.c b/sys/compat/sunos32/sunos32_exec.c index f9dfe4a23b4..02c90bd27b9 100644 --- a/sys/compat/sunos32/sunos32_exec.c +++ b/sys/compat/sunos32/sunos32_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunos32_exec.c,v 1.14 2002/11/10 20:59:04 jdolecek Exp $ */ +/* $NetBSD: sunos32_exec.c,v 1.15 2003/08/24 17:52:45 chs Exp $ */ /* * Copyright (c) 2001 Matthew R. Green @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunos32_exec.c,v 1.14 2002/11/10 20:59:04 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos32_exec.c,v 1.15 2003/08/24 17:52:45 chs Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -51,6 +51,8 @@ extern const char * const sunos32_syscallnames[]; extern char sunos_sigcode[], sunos_esigcode[]; void syscall __P((void)); +struct uvm_object *emul_sunos32_object; + const struct emul emul_sunos = { "sunos32", "/emul/sunos", @@ -70,6 +72,7 @@ const struct emul emul_sunos = { trapsignal, sunos_sigcode, sunos_esigcode, + &emul_sunos32_object, sunos32_setregs, NULL, NULL, diff --git a/sys/compat/svr4/svr4_exec.c b/sys/compat/svr4/svr4_exec.c index 71c09069af8..4b0470708f6 100644 --- a/sys/compat/svr4/svr4_exec.c +++ b/sys/compat/svr4/svr4_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_exec.c,v 1.49 2002/11/01 19:26:23 jdolecek Exp $ */ +/* $NetBSD: svr4_exec.c,v 1.50 2003/08/24 17:52:46 chs Exp $ */ /*- * Copyright (c) 1994, 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: svr4_exec.c,v 1.49 2002/11/01 19:26:23 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_exec.c,v 1.50 2003/08/24 17:52:46 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -58,6 +58,8 @@ extern const char * const svr4_syscallnames[]; void syscall __P((void)); #endif +struct uvm_object *emul_svr4_object; + const struct emul emul_svr4 = { "svr4", "/emul/svr4", @@ -73,6 +75,7 @@ const struct emul emul_svr4 = { trapsignal, svr4_sigcode, svr4_esigcode, + &emul_svr4_object, svr4_setregs, NULL, NULL, diff --git a/sys/compat/svr4_32/svr4_32_exec.c b/sys/compat/svr4_32/svr4_32_exec.c index 186c178203e..0ccc85994a7 100644 --- a/sys/compat/svr4_32/svr4_32_exec.c +++ b/sys/compat/svr4_32/svr4_32_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_exec.c,v 1.9 2002/11/01 19:26:24 jdolecek Exp $ */ +/* $NetBSD: svr4_32_exec.c,v 1.10 2003/08/24 17:52:46 chs Exp $ */ /*- * Copyright (c) 1994, 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec.c,v 1.9 2002/11/01 19:26:24 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec.c,v 1.10 2003/08/24 17:52:46 chs Exp $"); #define ELFSIZE 32 /* XXX should die */ @@ -60,6 +60,8 @@ extern const char * const svr4_32_syscallnames[]; void syscall __P((void)); #endif +struct uvm_object *emul_svr4_32_object; + const struct emul emul_svr4_32 = { "svr4_32", "/emul/svr4_32", @@ -75,6 +77,7 @@ const struct emul emul_svr4_32 = { trapsignal, svr4_32_sigcode, svr4_32_esigcode, + &emul_svr4_32_object, svr4_32_setregs, NULL, NULL, diff --git a/sys/compat/ultrix/ultrix_misc.c b/sys/compat/ultrix/ultrix_misc.c index e6dbd80a303..d4fbbea6bef 100644 --- a/sys/compat/ultrix/ultrix_misc.c +++ b/sys/compat/ultrix/ultrix_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_misc.c,v 1.86 2003/08/07 16:30:47 agc Exp $ */ +/* $NetBSD: ultrix_misc.c,v 1.87 2003/08/24 17:52:46 chs Exp $ */ /* * Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author) @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.86 2003/08/07 16:30:47 agc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.87 2003/08/24 17:52:46 chs Exp $"); #if defined(_KERNEL_OPT) #include "opt_nfsserver.h" @@ -156,6 +156,8 @@ void syscall_intern(struct proc *); void syscall __P((void)); #endif +struct uvm_object *emul_ultrix_object; + const struct emul emul_ultrix = { "ultrix", "/emul/ultrix", @@ -171,6 +173,7 @@ const struct emul emul_ultrix = { trapsignal, ultrix_sigcode, ultrix_esigcode, + &emul_ultrix_object, setregs, NULL, NULL, |
