Module Name: src Committed By: pgoyette Date: Fri Aug 10 21:45:00 UTC 2018
Modified Files: src/sys/arch/i386/i386: linux_syscall.c src/sys/compat/aoutm68k: aoutm68k_exec.c src/sys/compat/freebsd: freebsd_exec.c src/sys/compat/ibcs2: ibcs2_exec.c src/sys/compat/linux/common: linux_exec.c src/sys/compat/linux32/common: linux32_exec.c src/sys/compat/netbsd32: netbsd32_netbsd.c src/sys/compat/osf1: osf1_exec.c src/sys/compat/sunos: sunos_exec.c src/sys/compat/sunos32: sunos32_exec.c src/sys/compat/svr4: svr4_exec.c src/sys/compat/svr4_32: svr4_32_exec.c src/sys/compat/ultrix: ultrix_misc.c src/sys/kern: kern_exec.c kern_syscall.c makesyscalls.sh src/sys/rump/include/rump-sys: kern.h src/sys/rump/kern/lib/libsys_cygwin: sys_cygwin_component.c src/sys/rump/kern/lib/libsys_linux: sys_linux_component.c src/sys/rump/kern/lib/libsys_sunos: sys_sunos_component.c src/sys/rump/librump/rumpkern: emul.c src/sys/sys: proc.h systm.h Log Message: /home/paul/X_nomodbits.commit To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/i386/i386/linux_syscall.c cvs rdiff -u -r1.29 -r1.30 src/sys/compat/aoutm68k/aoutm68k_exec.c cvs rdiff -u -r1.41 -r1.42 src/sys/compat/freebsd/freebsd_exec.c cvs rdiff -u -r1.78 -r1.79 src/sys/compat/ibcs2/ibcs2_exec.c cvs rdiff -u -r1.119 -r1.120 src/sys/compat/linux/common/linux_exec.c cvs rdiff -u -r1.23 -r1.24 src/sys/compat/linux32/common/linux32_exec.c cvs rdiff -u -r1.217 -r1.218 src/sys/compat/netbsd32/netbsd32_netbsd.c cvs rdiff -u -r1.46 -r1.47 src/sys/compat/osf1/osf1_exec.c cvs rdiff -u -r1.56 -r1.57 src/sys/compat/sunos/sunos_exec.c cvs rdiff -u -r1.35 -r1.36 src/sys/compat/sunos32/sunos32_exec.c cvs rdiff -u -r1.68 -r1.69 src/sys/compat/svr4/svr4_exec.c cvs rdiff -u -r1.29 -r1.30 src/sys/compat/svr4_32/svr4_32_exec.c cvs rdiff -u -r1.124 -r1.125 src/sys/compat/ultrix/ultrix_misc.c cvs rdiff -u -r1.459 -r1.460 src/sys/kern/kern_exec.c cvs rdiff -u -r1.16 -r1.17 src/sys/kern/kern_syscall.c cvs rdiff -u -r1.169 -r1.170 src/sys/kern/makesyscalls.sh cvs rdiff -u -r1.3 -r1.4 src/sys/rump/include/rump-sys/kern.h cvs rdiff -u -r1.2 -r1.3 \ src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c cvs rdiff -u -r1.185 -r1.186 src/sys/rump/librump/rumpkern/emul.c cvs rdiff -u -r1.348 -r1.349 src/sys/sys/proc.h cvs rdiff -u -r1.276 -r1.277 src/sys/sys/systm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/i386/i386/linux_syscall.c diff -u src/sys/arch/i386/i386/linux_syscall.c:1.53 src/sys/arch/i386/i386/linux_syscall.c:1.54 --- src/sys/arch/i386/i386/linux_syscall.c:1.53 Sat Aug 12 07:21:57 2017 +++ src/sys/arch/i386/i386/linux_syscall.c Fri Aug 10 21:44:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscall.c,v 1.53 2017/08/12 07:21:57 maxv Exp $ */ +/* $NetBSD: linux_syscall.c,v 1.54 2018/08/10 21:44:58 pgoyette Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscall.c,v 1.53 2017/08/12 07:21:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscall.c,v 1.54 2018/08/10 21:44:58 pgoyette Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal static void linux_syscall(struct trapframe *); extern struct sysent linux_sysent[]; +extern const uint32_t linux_sysent_nomodbits[]; void linux_syscall_intern(struct proc *p) Index: src/sys/compat/aoutm68k/aoutm68k_exec.c diff -u src/sys/compat/aoutm68k/aoutm68k_exec.c:1.29 src/sys/compat/aoutm68k/aoutm68k_exec.c:1.30 --- src/sys/compat/aoutm68k/aoutm68k_exec.c:1.29 Sun May 6 13:40:50 2018 +++ src/sys/compat/aoutm68k/aoutm68k_exec.c Fri Aug 10 21:44:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: aoutm68k_exec.c,v 1.29 2018/05/06 13:40:50 kamil Exp $ */ +/* $NetBSD: aoutm68k_exec.c,v 1.30 2018/08/10 21:44:58 pgoyette Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aoutm68k_exec.c,v 1.29 2018/05/06 13:40:50 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aoutm68k_exec.c,v 1.30 2018/08/10 21:44:58 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -49,6 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: aoutm68k_exe #include <compat/aoutm68k/aoutm68k_syscall.h> extern struct sysent aoutm68k_sysent[]; +extern const uint32_t aoutm68k_sysent_nomodbits[]; extern char sigcode[], esigcode[]; void aoutm68k_syscall_intern(struct proc *); @@ -64,6 +65,7 @@ struct emul emul_netbsd_aoutm68k = { .e_nsysent = AOUTM68K_SYS_NSYSENT, #endif .e_sysent = aoutm68k_sysent, + .e_nomodbits = aoutm68k_sysent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = syscallnames, #endif Index: src/sys/compat/freebsd/freebsd_exec.c diff -u src/sys/compat/freebsd/freebsd_exec.c:1.41 src/sys/compat/freebsd/freebsd_exec.c:1.42 --- src/sys/compat/freebsd/freebsd_exec.c:1.41 Sun May 6 13:40:50 2018 +++ src/sys/compat/freebsd/freebsd_exec.c Fri Aug 10 21:44:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_exec.c,v 1.41 2018/05/06 13:40:50 kamil Exp $ */ +/* $NetBSD: freebsd_exec.c,v 1.42 2018/08/10 21:44:58 pgoyette 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.41 2018/05/06 13:40:50 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: freebsd_exec.c,v 1.42 2018/08/10 21:44:58 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: freebsd_exec #include <compat/freebsd/freebsd_machdep.h> extern struct sysent freebsd_sysent[]; +extern const uint32_t freebsd_sysent_nomodbits[]; extern const char * const freebsd_syscallnames[]; struct uvm_object *emul_freebsd_object; @@ -72,6 +73,7 @@ struct emul emul_freebsd = { .e_nsysent = FREEBSD_SYS_NSYSENT, #endif .e_sysent = freebsd_sysent, + .e_nomodbits = freebsd_sysent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = freebsd_syscallnames, #else Index: src/sys/compat/ibcs2/ibcs2_exec.c diff -u src/sys/compat/ibcs2/ibcs2_exec.c:1.78 src/sys/compat/ibcs2/ibcs2_exec.c:1.79 --- src/sys/compat/ibcs2/ibcs2_exec.c:1.78 Sun May 6 13:40:51 2018 +++ src/sys/compat/ibcs2/ibcs2_exec.c Fri Aug 10 21:44:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_exec.c,v 1.78 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: ibcs2_exec.c,v 1.79 2018/08/10 21:44:58 pgoyette 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.78 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec.c,v 1.79 2018/08/10 21:44:58 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -64,6 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_exec.c static void ibcs2_e_proc_exec(struct proc *, struct exec_package *); extern struct sysent ibcs2_sysent[]; +extern const uint32_t ibcs2_sysent_nomodbits[]; extern const char * const ibcs2_syscallnames[]; extern char ibcs2_sigcode[], ibcs2_esigcode[]; #ifndef __HAVE_SYSCALL_INTERN @@ -86,6 +87,7 @@ struct emul emul_ibcs2 = { .e_nsysent = IBCS2_SYS_NSYSENT, #endif .e_sysent = ibcs2_sysent, + .e_nomodbits = ibcs2_sysent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = ibcs2_syscallnames, #else Index: src/sys/compat/linux/common/linux_exec.c diff -u src/sys/compat/linux/common/linux_exec.c:1.119 src/sys/compat/linux/common/linux_exec.c:1.120 --- src/sys/compat/linux/common/linux_exec.c:1.119 Sun May 6 13:40:51 2018 +++ src/sys/compat/linux/common/linux_exec.c Fri Aug 10 21:44:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.c,v 1.119 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: linux_exec.c,v 1.120 2018/08/10 21:44:58 pgoyette Exp $ */ /*- * Copyright (c) 1994, 1995, 1998, 2000, 2007, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.119 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.120 2018/08/10 21:44:58 pgoyette Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -70,6 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec.c #include <compat/linux/common/linux_emuldata.h> extern struct sysent linux_sysent[]; +extern const uint32_t linux_sysent_nomodbits[]; extern const char * const linux_syscallnames[]; extern char linux_sigcode[], linux_esigcode[]; @@ -89,6 +90,7 @@ struct emul emul_linux = { .e_nsysent = LINUX_SYS_NSYSENT, #endif .e_sysent = linux_sysent, + .e_nomodbits = linux_sysent_nomodbits, .e_syscallnames = linux_syscallnames, .e_sendsig = linux_sendsig, .e_trapsignal = linux_trapsignal, Index: src/sys/compat/linux32/common/linux32_exec.c diff -u src/sys/compat/linux32/common/linux32_exec.c:1.23 src/sys/compat/linux32/common/linux32_exec.c:1.24 --- src/sys/compat/linux32/common/linux32_exec.c:1.23 Sun May 6 13:40:51 2018 +++ src/sys/compat/linux32/common/linux32_exec.c Fri Aug 10 21:44:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_exec.c,v 1.23 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: linux32_exec.c,v 1.24 2018/08/10 21:44:58 pgoyette Exp $ */ /*- * Copyright (c) 1994-2007 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_exec.c,v 1.23 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_exec.c,v 1.24 2018/08/10 21:44:58 pgoyette Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -55,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_exec #include <compat/linux32/linux32_syscall.h> extern struct sysent linux32_sysent[]; +extern const uint32_t linux32_sysent_nomodbits[]; extern const char * const linux32_syscallnames[]; extern char linux32_sigcode[], linux32_esigcode[]; @@ -74,6 +75,7 @@ struct emul emul_linux32 = { .e_nsysent = LINUX32_SYS_NSYSENT, #endif .e_sysent = linux32_sysent, + .e_nomodbits = linux32_sysent_nomodbits, .e_syscallnames = linux32_syscallnames, .e_sendsig = linux32_sendsig, .e_trapsignal = linux_trapsignal, Index: src/sys/compat/netbsd32/netbsd32_netbsd.c diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.217 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.218 --- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.217 Tue Jul 31 21:00:02 2018 +++ src/sys/compat/netbsd32/netbsd32_netbsd.c Fri Aug 10 21:44:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_netbsd.c,v 1.217 2018/07/31 21:00:02 rjs Exp $ */ +/* $NetBSD: netbsd32_netbsd.c,v 1.218 2018/08/10 21:44:58 pgoyette Exp $ */ /* * Copyright (c) 1998, 2001, 2008 Matthew R. Green @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.217 2018/07/31 21:00:02 rjs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.218 2018/08/10 21:44:58 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -90,6 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_net #endif extern struct sysent netbsd32_sysent[]; +extern const uint32_t netbsd32_sysent_nomodbits[]; #ifdef SYSCALL_DEBUG extern const char * const netbsd32_syscallnames[]; #endif @@ -122,6 +123,7 @@ struct emul emul_netbsd32 = { .e_nsysent = NETBSD32_SYS_NSYSENT, #endif .e_sysent = netbsd32_sysent, + .e_nomodbits = netbsd32_sysent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = netbsd32_syscallnames, #else Index: src/sys/compat/osf1/osf1_exec.c diff -u src/sys/compat/osf1/osf1_exec.c:1.46 src/sys/compat/osf1/osf1_exec.c:1.47 --- src/sys/compat/osf1/osf1_exec.c:1.46 Sun May 6 13:40:51 2018 +++ src/sys/compat/osf1/osf1_exec.c Fri Aug 10 21:44:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_exec.c,v 1.46 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: osf1_exec.c,v 1.47 2018/08/10 21:44:58 pgoyette 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.46 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_exec.c,v 1.47 2018/08/10 21:44:58 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -50,6 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: osf1_exec.c, #include <compat/osf1/osf1_cvt.h> extern struct sysent osf1_sysent[]; +extern const uint32_t osf1_sysent_nomodbits[]; extern const char * const osf1_syscallnames[]; extern char osf1_sigcode[], osf1_esigcode[]; #ifdef __HAVE_SYSCALL_INTERN @@ -70,6 +71,7 @@ struct emul emul_osf1 = { .e_nsysent = OSF1_SYS_NSYSENT, #endif .e_sysent = osf1_sysent, + .e_nomodbits = osf1_sysent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = osf1_syscallnames, #else Index: src/sys/compat/sunos/sunos_exec.c diff -u src/sys/compat/sunos/sunos_exec.c:1.56 src/sys/compat/sunos/sunos_exec.c:1.57 --- src/sys/compat/sunos/sunos_exec.c:1.56 Sun May 6 13:40:51 2018 +++ src/sys/compat/sunos/sunos_exec.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunos_exec.c,v 1.56 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: sunos_exec.c,v 1.57 2018/08/10 21:44:59 pgoyette Exp $ */ /* * Copyright (c) 1993 Theo de Raadt @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunos_exec.c,v 1.56 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos_exec.c,v 1.57 2018/08/10 21:44:59 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -52,6 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunos_exec.c extern int nsunos_sysent; extern struct sysent sunos_sysent[]; +extern const uint32_t sunos_sysent_nomodbits[]; #ifdef SYSCALL_DEBUG extern const char * const sunos_syscallnames[]; #endif @@ -72,6 +73,7 @@ struct emul emul_sunos = { .e_nsysent = SUNOS_SYS_NSYSENT, #endif .e_sysent = sunos_sysent, + .e_nomodbits = sunos_sysent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = sunos_syscallnames, #else Index: src/sys/compat/sunos32/sunos32_exec.c diff -u src/sys/compat/sunos32/sunos32_exec.c:1.35 src/sys/compat/sunos32/sunos32_exec.c:1.36 --- src/sys/compat/sunos32/sunos32_exec.c:1.35 Sun May 6 13:40:51 2018 +++ src/sys/compat/sunos32/sunos32_exec.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunos32_exec.c,v 1.35 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: sunos32_exec.c,v 1.36 2018/08/10 21:44:59 pgoyette Exp $ */ /* * Copyright (c) 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunos32_exec.c,v 1.35 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos32_exec.c,v 1.36 2018/08/10 21:44:59 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -50,6 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunos32_exec extern int nsunos32_sysent; extern struct sysent sunos32_sysent[]; +extern const uint32_t sunos32_sysent_nomodbits[]; #ifdef SYSCALL_DEBUG extern const char * const sunos32_syscallnames[]; #endif @@ -71,6 +72,7 @@ struct emul emul_sunos = { .e_nsysent = SUNOS32_SYS_NSYSENT, #endif .e_sysent = sunos32_sysent, + .e_nomodbits = sunos32_sysent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = sunos32_syscallnames, #else Index: src/sys/compat/svr4/svr4_exec.c diff -u src/sys/compat/svr4/svr4_exec.c:1.68 src/sys/compat/svr4/svr4_exec.c:1.69 --- src/sys/compat/svr4/svr4_exec.c:1.68 Sun May 6 13:40:51 2018 +++ src/sys/compat/svr4/svr4_exec.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_exec.c,v 1.68 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: svr4_exec.c,v 1.69 2018/08/10 21:44:59 pgoyette Exp $ */ /*- * Copyright (c) 1994, 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: svr4_exec.c,v 1.68 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_exec.c,v 1.69 2018/08/10 21:44:59 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: svr4_exec.c, extern char svr4_sigcode[], svr4_esigcode[]; extern struct sysent svr4_sysent[]; +extern const uint32_t svr4_sysent_nomodbits[]; extern const char * const svr4_syscallnames[]; #ifndef __HAVE_SYSCALL_INTERN void syscall(void); @@ -70,6 +71,7 @@ struct emul emul_svr4 = { .e_nsysent = SVR4_SYS_NSYSENT, #endif .e_sysent = svr4_sysent, + .e_nomodbits = svr4_systent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = svr4_syscallnames, #else Index: src/sys/compat/svr4_32/svr4_32_exec.c diff -u src/sys/compat/svr4_32/svr4_32_exec.c:1.29 src/sys/compat/svr4_32/svr4_32_exec.c:1.30 --- src/sys/compat/svr4_32/svr4_32_exec.c:1.29 Sun May 6 13:40:51 2018 +++ src/sys/compat/svr4_32/svr4_32_exec.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_exec.c,v 1.29 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: svr4_32_exec.c,v 1.30 2018/08/10 21:44:59 pgoyette Exp $ */ /*- * Copyright (c) 1994, 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec.c,v 1.29 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec.c,v 1.30 2018/08/10 21:44:59 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -56,6 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: svr4_32_exec extern char svr4_32_sigcode[], svr4_32_esigcode[]; extern struct sysent svr4_32_sysent[]; +extern const uint32_t svr4_32_sysent_nomodbits[]; extern const char * const svr4_32_syscallnames[]; #ifndef __HAVE_SYSCALL_INTERN void syscall(void); @@ -73,6 +74,7 @@ struct emul emul_svr4_32 = { .e_nsysent = SVR4_32_SYS_NSYSENT, #endif .e_sysent = svr4_32_sysent, + .e_nomodbits = svr4_32_systent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = svr4_32_syscallnames, #else Index: src/sys/compat/ultrix/ultrix_misc.c diff -u src/sys/compat/ultrix/ultrix_misc.c:1.124 src/sys/compat/ultrix/ultrix_misc.c:1.125 --- src/sys/compat/ultrix/ultrix_misc.c:1.124 Sun May 6 13:40:51 2018 +++ src/sys/compat/ultrix/ultrix_misc.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_misc.c,v 1.124 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: ultrix_misc.c,v 1.125 2018/08/10 21:44:59 pgoyette 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.124 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.125 2018/08/10 21:44:59 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -149,6 +149,7 @@ static int ultrix_to_bsd_flock(struct ul static void bsd_to_ultrix_flock(struct flock *, struct ultrix_flock *); extern struct sysent ultrix_sysent[]; +extern const uint32_t ultrix_sysent_nomodbits[]; extern const char * const ultrix_syscallnames[]; extern char ultrix_sigcode[], ultrix_esigcode[]; @@ -168,6 +169,7 @@ struct emul emul_ultrix = { .e_nsysent = ULTRIX_SYS_NSYSENT, #endif .e_sysent = ultrix_sysent, + .e_nomodbits = ultrix_sysent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = ultrix_syscallnames, #else Index: src/sys/kern/kern_exec.c diff -u src/sys/kern/kern_exec.c:1.459 src/sys/kern/kern_exec.c:1.460 --- src/sys/kern/kern_exec.c:1.459 Mon May 28 11:32:20 2018 +++ src/sys/kern/kern_exec.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.459 2018/05/28 11:32:20 kamil Exp $ */ +/* $NetBSD: kern_exec.c,v 1.460 2018/08/10 21:44:59 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.459 2018/05/28 11:32:20 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.460 2018/08/10 21:44:59 pgoyette Exp $"); #include "opt_exec.h" #include "opt_execfmt.h" @@ -209,6 +209,7 @@ struct emul emul_netbsd = { .e_sc_autoload = netbsd_syscalls_autoload, #endif .e_sysent = sysent, + .e_nomodbits = sysent_nomodbits, #ifdef SYSCALL_DEBUG .e_syscallnames = syscallnames, #else Index: src/sys/kern/kern_syscall.c diff -u src/sys/kern/kern_syscall.c:1.16 src/sys/kern/kern_syscall.c:1.17 --- src/sys/kern/kern_syscall.c:1.16 Fri Mar 24 17:40:44 2017 +++ src/sys/kern/kern_syscall.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_syscall.c,v 1.16 2017/03/24 17:40:44 christos Exp $ */ +/* $NetBSD: kern_syscall.c,v 1.17 2018/08/10 21:44:59 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.16 2017/03/24 17:40:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.17 2018/08/10 21:44:59 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_modular.h" @@ -123,7 +123,10 @@ syscall_establish(const struct emul *em, * on error. */ for (i = 0; sp[i].sp_call != NULL; i++) { - if (sy[sp[i].sp_code].sy_call != sys_nomodule) { + if (sp[i].sp_code >= SYS_NSYSENT) + return EINVAL; + if (sy[sp[i].sp_code].sy_call != sys_nomodule && + sy[sp[i].sp_code].sy_call != sys_nosys) { #ifdef DIAGNOSTIC printf("syscall %d is busy\n", sp[i].sp_code); #endif @@ -142,6 +145,7 @@ int syscall_disestablish(const struct emul *em, const struct syscall_package *sp) { struct sysent *sy; + const uint32_t *sb; uint64_t where; lwp_t *l; int i; @@ -152,14 +156,17 @@ syscall_disestablish(const struct emul * em = &emul_netbsd; } sy = em->e_sysent; + sb = em->e_nomodbits; /* - * First, patch the system calls to sys_nomodule to gate further - * activity. + * First, patch the system calls to sys_nomodule or sys_nosys + * to gate further activity. */ for (i = 0; sp[i].sp_call != NULL; i++) { KASSERT(sy[sp[i].sp_code].sy_call == sp[i].sp_call); - sy[sp[i].sp_code].sy_call = sys_nomodule; + sy[sp[i].sp_code].sy_call = + sb[sp[i].sp_code / 32] & (1 << (sp[i].sp_code % 32)) ? + sys_nomodule : sys_nosys; } /* Index: src/sys/kern/makesyscalls.sh diff -u src/sys/kern/makesyscalls.sh:1.169 src/sys/kern/makesyscalls.sh:1.170 --- src/sys/kern/makesyscalls.sh:1.169 Wed May 10 06:08:56 2017 +++ src/sys/kern/makesyscalls.sh Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -# $NetBSD: makesyscalls.sh,v 1.169 2017/05/10 06:08:56 riastradh Exp $ +# $NetBSD: makesyscalls.sh,v 1.170 2018/08/10 21:44:59 pgoyette Exp $ # # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou # All rights reserved. @@ -855,9 +855,12 @@ function putent(type, compatwrap) { if (argc != 0) { printf("\n\t\tns(struct %s%s_args),", compatwrap_, funcname) > sysent } - if (modular) + if (modular) { wfn = "sys_nomodule"; - else if (compatwrap == "") + idx = int(syscall / 32); + bit = 2 ^ (syscall % 32); + nomodbits[ idx ] += bit; + } else if (compatwrap == "") wfn = funcname; else wfn = compatwrap "(" funcname ")"; @@ -1126,6 +1129,13 @@ END { } maxsyscall = syscall + + # XXX + # XXX The following comparisons with nsysent will produce + # XXX unexpected results if (for example) syscall has a + # XXX value of 900 and nsysent has a value of "1024". We + # XXX probably ought to make nsysent a numeric variable. + # XXX if (nsysent) { if (syscall > nsysent) { printf("%s: line %d: too many syscalls [%d > %d]\n", infile, NR, syscall, nsysent) @@ -1142,6 +1152,16 @@ END { } } printf("};\n") > sysent + printf("\nconst uint32_t %s_nomodbits[] = {\n", switchname) > sysent + printf("};\n") > rumpsysent + printf("\nconst uint32_t rump_sysent_nomodbits[] = {\n") > rumpsysent + for (i = 0; i < syscall / 32; i++) { + printf("\t0x%08x,\t/* syscalls %3d-%3d */\n", + nomodbits[i], i * 32, i * 32 + 31) > sysent + printf("\t0x%08x,\t/* syscalls %3d-%3d */\n", + nomodbits[i], i * 32, i * 32 + 31) > rumpsysent + } + printf("};\n") > sysent printf("};\n") > rumpsysent printf("CTASSERT(__arraycount(rump_sysent) == SYS_NSYSENT);\n") > rumpsysent printf("__strong_alias(rumpns_sysent,rump_sysent);\n") > rumpsysent Index: src/sys/rump/include/rump-sys/kern.h diff -u src/sys/rump/include/rump-sys/kern.h:1.3 src/sys/rump/include/rump-sys/kern.h:1.4 --- src/sys/rump/include/rump-sys/kern.h:1.3 Mon Feb 8 18:18:19 2016 +++ src/sys/rump/include/rump-sys/kern.h Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.h,v 1.3 2016/02/08 18:18:19 pooka Exp $ */ +/* $NetBSD: kern.h,v 1.4 2018/08/10 21:44:59 pgoyette Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -51,6 +51,7 @@ extern int rump_threads; extern struct device rump_rootdev; extern struct sysent rump_sysent[]; +extern const uint32_t rump_sysent_nomodbits[]; enum rump_component_type { RUMP_COMPONENT_DEV, Index: src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c diff -u src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c:1.2 src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c:1.3 --- src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c:1.2 Tue Jan 26 23:12:17 2016 +++ src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_cygwin_component.c,v 1.2 2016/01/26 23:12:17 pooka Exp $ */ +/* $NetBSD: sys_cygwin_component.c,v 1.3 2018/08/10 21:44:59 pgoyette Exp $ */ #include <sys/param.h> #include <sys/proc.h> @@ -10,10 +10,12 @@ #include "rump_cygwin_syscall.h" extern struct sysent rump_cygwin_sysent[]; +extern const uint32_t rump_cygwin_sysent_nomodbits[]; struct emul emul_rump_sys_cygwin = { .e_name = "cygwin-rump", .e_sysent = rump_cygwin_sysent, + .e_nomodbits = rump_cygwin_sysent_nomodbits, #ifndef __HAVE_MINIMAL_EMUL .e_nsysent = RUMP_CYGWIN_SYS_NSYSENT, #endif Index: src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c diff -u src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c:1.3 src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c:1.4 --- src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c:1.3 Tue Jan 26 23:12:17 2016 +++ src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_linux_component.c,v 1.3 2016/01/26 23:12:17 pooka Exp $ */ +/* $NetBSD: sys_linux_component.c,v 1.4 2018/08/10 21:44:59 pgoyette Exp $ */ #include <sys/param.h> #include <sys/proc.h> @@ -12,6 +12,7 @@ #include "rump_linux_syscall.h" extern struct sysent rump_linux_sysent[]; +extern const uint32_t rump_linux_sysent_nomodbits[]; #ifdef __HAVE_SYSCALL_INTERN static void @@ -25,6 +26,7 @@ rumplinux_syscall_intern(struct proc *p) struct emul emul_rump_sys_linux = { .e_name = "linux-rump", .e_sysent = rump_linux_sysent, + .e_nomodbits = rump_linux_sysent_nomodbits, #ifndef __HAVE_MINIMAL_EMUL .e_nsysent = RUMP_LINUX_SYS_NSYSENT, .e_errno = native_to_linux_errno, Index: src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c diff -u src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c:1.2 src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c:1.3 --- src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c:1.2 Tue Jan 26 23:12:17 2016 +++ src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_sunos_component.c,v 1.2 2016/01/26 23:12:17 pooka Exp $ */ +/* $NetBSD: sys_sunos_component.c,v 1.3 2018/08/10 21:44:59 pgoyette Exp $ */ #include <sys/param.h> #include <sys/proc.h> @@ -10,10 +10,12 @@ #include "rump_sunos_syscall.h" extern struct sysent rump_sunos_sysent[]; +extern const uint32_t rump_sunos_sysent_nomodbits[]; struct emul emul_rump_sys_sunos = { .e_name = "sunos-rump", .e_sysent = rump_sunos_sysent, + .e_nomodbits = rump_sunos_sysent_nomodbits, #ifndef __HAVE_MINIMAL_EMUL .e_nsysent = RUMP_SUNOS_SYS_NSYSENT, #endif Index: src/sys/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.185 src/sys/rump/librump/rumpkern/emul.c:1.186 --- src/sys/rump/librump/rumpkern/emul.c:1.185 Tue Nov 21 15:22:06 2017 +++ src/sys/rump/librump/rumpkern/emul.c Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.185 2017/11/21 15:22:06 ozaki-r Exp $ */ +/* $NetBSD: emul.c,v 1.186 2018/08/10 21:44:59 pgoyette Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.185 2017/11/21 15:22:06 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.186 2018/08/10 21:44:59 pgoyette Exp $"); #include <sys/param.h> #include <sys/cprng.h> @@ -119,6 +119,7 @@ struct loadavg averunnable = { struct emul emul_netbsd = { .e_name = "netbsd-rump", .e_sysent = rump_sysent, + .e_nomodbits = rump_sysent_nomodbits, #ifndef __HAVE_MINIMAL_EMUL .e_nsysent = SYS_NSYSENT, #endif Index: src/sys/sys/proc.h diff -u src/sys/sys/proc.h:1.348 src/sys/sys/proc.h:1.349 --- src/sys/sys/proc.h:1.348 Wed May 9 19:55:35 2018 +++ src/sys/sys/proc.h Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.348 2018/05/09 19:55:35 kre Exp $ */ +/* $NetBSD: proc.h,v 1.349 2018/08/10 21:44:59 pgoyette Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -150,6 +150,8 @@ struct emul { int e_nsysent; /* Number of system call entries */ #endif struct sysent *e_sysent; /* System call array */ + const uint32_t *e_nomodbits; /* sys_nosys/sys_nomodule flags + * for syscall_disestablish() */ const char * const *e_syscallnames; /* System call name array */ /* Signal sending function */ struct sc_autoload *e_sc_autoload; /* List of autoloadable syscalls */ Index: src/sys/sys/systm.h diff -u src/sys/sys/systm.h:1.276 src/sys/sys/systm.h:1.277 --- src/sys/sys/systm.h:1.276 Mon May 28 21:04:41 2018 +++ src/sys/sys/systm.h Fri Aug 10 21:44:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.276 2018/05/28 21:04:41 chs Exp $ */ +/* $NetBSD: systm.h,v 1.277 2018/08/10 21:44:59 pgoyette Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -127,6 +127,7 @@ extern struct sysent { /* system call t uint32_t sy_return; /* DTrace return ID for systrace. */ } sysent[]; extern int nsysent; +extern const uint32_t sysent_nomodbits[]; #endif #if BYTE_ORDER == BIG_ENDIAN