CVS commit: [pgoyette-compat] src/sys/sys

2019-01-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan 27 02:37:07 UTC 2019

Modified Files:
src/sys/sys [pgoyette-compat]: param.h

Log Message:
Update version on the branch, too


To generate a diff of this commit:
cvs rdiff -u -r1.557.2.11 -r1.557.2.12 src/sys/sys/param.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/sys/param.h
diff -u src/sys/sys/param.h:1.557.2.11 src/sys/sys/param.h:1.557.2.12
--- src/sys/sys/param.h:1.557.2.11	Sat Jan 26 22:00:37 2019
+++ src/sys/sys/param.h	Sun Jan 27 02:37:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.557.2.11 2019/01/26 22:00:37 pgoyette Exp $	*/
+/*	$NetBSD: param.h,v 1.557.2.12 2019/01/27 02:37:07 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	899003100	/* NetBSD 8.99.31 */
+#define	__NetBSD_Version__	899003200	/* NetBSD 8.99.32 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: [pgoyette-compat] src/doc

2019-01-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan 26 03:37:14 UTC 2019

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Add a note concerning MPSAFE


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.26 src/doc/TODO.compat-module:1.1.2.27
--- src/doc/TODO.compat-module:1.1.2.26	Fri Jan 25 22:56:54 2019
+++ src/doc/TODO.compat-module	Sat Jan 26 03:37:13 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.26 2019/01/25 22:56:54 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.27 2019/01/26 03:37:13 pgoyette Exp $ */
 
 DONE
 
@@ -106,3 +106,11 @@ TODO - Not required for branch merge
 machines which include the consumer of this hook but do not have a
 compat_netbsd32 module (specifically, i386 and sgimips).  This
 should be sorted out sometime soon, but does not block merging.
+
+22. Note that the MPSAFE kernel option is currently not specified for
+building modules, nor is it included in any standard kernel
+configuration files.  If you build a custom kernel with the MPSAFE
+option set, and you also use modules (especially those modules for
+network interface device drivers), you'll need to build custom
+modules, too.  The MPSAFE stuff needs to be extracted out and made
+into "hooks".



CVS commit: [pgoyette-compat] src/doc

2019-01-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 25 22:56:54 UTC 2019

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Note the future need to sort out placement of the netbsd32_machine32_hook


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.25 src/doc/TODO.compat-module:1.1.2.26
--- src/doc/TODO.compat-module:1.1.2.25	Fri Jan 18 05:53:58 2019
+++ src/doc/TODO.compat-module	Fri Jan 25 22:56:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.25 2019/01/18 05:53:58 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.26 2019/01/25 22:56:54 pgoyette Exp $ */
 
 DONE
 
@@ -101,3 +101,8 @@ TODO - Not required for branch merge
 are included in every kernel via 'options COMPAT_UTILS' in file
 sys/conf/std
 
+21. The netbsd32_machine32_hook should be moved out of the main kernel
+and into the compat_netbsd32 module.  Unfortunately there are some
+machines which include the consumer of this hook but do not have a
+compat_netbsd32 module (specifically, i386 and sgimips).  This
+should be sorted out sometime soon, but does not block merging.



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2019-01-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 25 10:13:07 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_sysctl.c

Log Message:
Revert previous change(s).  There's no good reason to use the hook when
the required value is available locally (in the current module).

Thanks mrg@ for pointing this out.


To generate a diff of this commit:
cvs rdiff -u -r1.38.2.5 -r1.38.2.6 src/sys/compat/netbsd32/netbsd32_sysctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_sysctl.c
diff -u src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.5 src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.6
--- src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.5	Thu Jan 24 04:32:41 2019
+++ src/sys/compat/netbsd32/netbsd32_sysctl.c	Fri Jan 25 10:13:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.5 2019/01/24 04:32:41 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.6 2019/01/25 10:13:07 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.5 2019/01/24 04:32:41 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.6 2019/01/25 10:13:07 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -50,7 +50,6 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_sys
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
@@ -123,7 +122,7 @@ void
 netbsd32_sysctl_init(void)
 {
 	const struct sysctlnode *_root = _sysctl_root;
-	const char *m;
+	extern const char machine32[];
 
 	sysctl_createv(_clog, 0, &_root, NULL,
 		   CTLFLAG_PERMANENT,
@@ -171,11 +170,10 @@ netbsd32_sysctl_init(void)
 		   CTLTYPE_INT, "alignbytes", NULL,
 		   NULL, ALIGNBYTES32, NULL, 0,
 		   CTL_HW, HW_ALIGNBYTES, CTL_EOL);
-	MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m);
 	sysctl_createv(_clog, 0, &_root, NULL,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_STRING, "machine", NULL,
-		   NULL, 0, __UNCONST(m), 0,
+		   NULL, 0, __UNCONST(), 0,
 		   CTL_HW, HW_MACHINE, CTL_EOL);
 	sysctl_createv(_clog, 0, &_root, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READONLY,



CVS commit: [pgoyette-compat] src/sys

2019-01-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 25 09:36:09 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32.h netbsd32_mod.c
src/sys/kern [pgoyette-compat]: compat_stub.c
src/sys/sys [pgoyette-compat]: compat_stub.h

Log Message:
Move the netbsd32_machine32_hook into the main kernel with most of
the other hooks.

Although this hook might better belong in compat/netbsd32/ code,
there are some machines without a netbsd32 module (for example, i386
and sgimips) which still have consumers/users of this hook.  :(


To generate a diff of this commit:
cvs rdiff -u -r1.115.2.18 -r1.115.2.19 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.15.2.14 -r1.15.2.15 \
src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.110.14.7 -r1.110.14.8 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.94.12.7 -r1.94.12.8 \
src/sys/compat/linux/common/linux_exec_elf32.c
cvs rdiff -u -r1.116.2.18 -r1.116.2.19 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.13.16.18 -r1.13.16.19 src/sys/compat/netbsd32/netbsd32_mod.c
cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.1.2.54 -r1.1.2.55 src/sys/sys/compat_stub.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/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.18 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.19
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.18	Thu Jan 24 04:08:09 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Fri Jan 25 09:36:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.18 2019/01/24 04:08:09 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.19 2019/01/25 09:36:08 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.18 2019/01/24 04:08:09 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.19 2019/01/25 09:36:08 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -62,6 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_mac
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -969,8 +970,6 @@ netbsd32_vm_default_addr(struct proc *p,
 		return VM_DEFAULT_ADDRESS32_BOTTOMUP(base, sz);
 }
 
-extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
-
 static const char *
 netbsd32_machine32(void)
 {

Index: src/sys/arch/mips/mips/netbsd32_machdep.c
diff -u src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.14 src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.15
--- src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.14	Thu Jan 24 04:08:09 2019
+++ src/sys/arch/mips/mips/netbsd32_machdep.c	Fri Jan 25 09:36:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.15.2.14 2019/01/24 04:08:09 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.15.2.15 2019/01/25 09:36:08 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.14 2019/01/24 04:08:09 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.15 2019/01/25 09:36:08 pgoyette Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_coredump.h"
@@ -51,6 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_mac
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -308,7 +309,6 @@ cpu_coredump32(struct lwp *l, struct cor
 #endif
 
 struct netbsd32_sendsig_hook_t netbsd32_sendsig_hook;
-extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
  
 void
 netbsd32_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)

Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.7 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.8
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.7	Thu Jan 24 04:08:09 2019
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c	Fri Jan 25 09:36:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.110.14.7 2019/01/24 04:08:09 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.110.14.8 2019/01/25 09:36:08 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.7 2019/01/24 04:08:09 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.8 2019/01/25 09:36:08 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -55,6 

CVS commit: [pgoyette-compat] src/sys/arch/sparc/fpu

2019-01-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 25 09:04:51 UTC 2019

Modified Files:
src/sys/arch/sparc/fpu [pgoyette-compat]: fpu.c

Log Message:
Declare the variable which we're using as the return value of the
hook function.


To generate a diff of this commit:
cvs rdiff -u -r1.27.46.5 -r1.27.46.6 src/sys/arch/sparc/fpu/fpu.c

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/sparc/fpu/fpu.c
diff -u src/sys/arch/sparc/fpu/fpu.c:1.27.46.5 src/sys/arch/sparc/fpu/fpu.c:1.27.46.6
--- src/sys/arch/sparc/fpu/fpu.c:1.27.46.5	Tue Jan 22 07:42:40 2019
+++ src/sys/arch/sparc/fpu/fpu.c	Fri Jan 25 09:04:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.27.46.5 2019/01/22 07:42:40 pgoyette Exp $ */
+/*	$NetBSD: fpu.c,v 1.27.46.6 2019/01/25 09:04:51 pgoyette Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.27.46.5 2019/01/22 07:42:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.27.46.6 2019/01/25 09:04:51 pgoyette Exp $");
 
 #include 
 #include 
@@ -141,6 +141,7 @@ fpu_cleanup(
 	struct fpemu fe;
 	u_char *fpu_codes;
 	int code = 0;
+	int ret;
 	const struct emul *sunos_emul;
 
 	MODULE_CALL_HOOK(get_emul_sunos_hook, (_emul), enosys(), ret);



CVS commit: [pgoyette-compat] src/sys/compat/linux32/common

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 06:48:27 UTC 2019

Modified Files:
src/sys/compat/linux32/common [pgoyette-compat]: linux32_mod.c

Log Message:
Restore the MD-vs-REQ requirements structure, just in case


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.4 -r1.11.2.5 \
src/sys/compat/linux32/common/linux32_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux32/common/linux32_mod.c
diff -u src/sys/compat/linux32/common/linux32_mod.c:1.11.2.4 src/sys/compat/linux32/common/linux32_mod.c:1.11.2.5
--- src/sys/compat/linux32/common/linux32_mod.c:1.11.2.4	Thu Jan 24 06:23:26 2019
+++ src/sys/compat/linux32/common/linux32_mod.c	Thu Jan 24 06:48:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_mod.c,v 1.11.2.4 2019/01/24 06:23:26 pgoyette Exp $	*/
+/*	$NetBSD: linux32_mod.c,v 1.11.2.5 2019/01/24 06:48:27 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.11.2.4 2019/01/24 06:23:26 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.11.2.5 2019/01/24 06:48:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -51,11 +51,16 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_mod.
 #include 
 #include 
 
-#define	REQ1	"exec_elf32,compat_netbsd32,compat_linux"
-#define	REQ2	",sysv_ipc,compat_netbsd32_sysvipc,compat_sysv_50"
-#define	REQ3	",compat_netbsd32_50,compat_netbsd32_43"
+#if defined(EXEC_ELF32)
+# define   MD1 ",exec_elf32,compat_netbsd32,compat_netbsd32_sysvipc"
+#else
+# define   MD1 ""
+#endif
+
+#define	REQ1	"compat_linux,sysv_ipc,compat_sysv_50"
+#define	REQ2	",compat_netbsd32_50,compat_netbsd32_43"
 
-MODULE(MODULE_CLASS_EXEC, compat_linux32, REQ1 REQ2 REQ3);
+MODULE(MODULE_CLASS_EXEC, compat_linux32, REQ1 REQ2 MD1);
 
 static struct execsw linux32_execsw[] = {
 #if defined(EXEC_ELF32)



CVS commit: [pgoyette-compat] src/sys/compat/linux32/common

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 06:23:26 UTC 2019

Modified Files:
src/sys/compat/linux32/common [pgoyette-compat]: linux32_mod.c

Log Message:
Clean up and reorganize the requirements for compat_linux32 module


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.3 -r1.11.2.4 \
src/sys/compat/linux32/common/linux32_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux32/common/linux32_mod.c
diff -u src/sys/compat/linux32/common/linux32_mod.c:1.11.2.3 src/sys/compat/linux32/common/linux32_mod.c:1.11.2.4
--- src/sys/compat/linux32/common/linux32_mod.c:1.11.2.3	Wed Sep 12 08:09:23 2018
+++ src/sys/compat/linux32/common/linux32_mod.c	Thu Jan 24 06:23:26 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_mod.c,v 1.11.2.3 2018/09/12 08:09:23 pgoyette Exp $	*/
+/*	$NetBSD: linux32_mod.c,v 1.11.2.4 2019/01/24 06:23:26 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.11.2.3 2018/09/12 08:09:23 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.11.2.4 2019/01/24 06:23:26 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -51,18 +51,11 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_mod.
 #include 
 #include 
 
-#if defined(EXEC_ELF32)
-# define	MD1	",exec_elf32,compat_netbsd32,compat_netbsd32_sysvipc"
-#else
-# define	MD1	""
-#endif
-
-#define	REQ1	"compat_linux,compat_sysv_50"
-#define	REQ2	",compat_netbsd32_43,compat_netbsd32_50,compat_netbsd32_12"
-#define	REQ3	",compat_netbsd32_30,compat_netbsd32_16"
-#define REQ4",compat_ossaudio,sysv_ipc,compat_netbsd32_sysvipc"
+#define	REQ1	"exec_elf32,compat_netbsd32,compat_linux"
+#define	REQ2	",sysv_ipc,compat_netbsd32_sysvipc,compat_sysv_50"
+#define	REQ3	",compat_netbsd32_50,compat_netbsd32_43"
 
-MODULE(MODULE_CLASS_EXEC, compat_linux32, REQ1 REQ2 REQ3 REQ4 MD1);
+MODULE(MODULE_CLASS_EXEC, compat_linux32, REQ1 REQ2 REQ3);
 
 static struct execsw linux32_execsw[] = {
 #if defined(EXEC_ELF32)



CVS commit: [pgoyette-compat] src/sys/compat/linux/common

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 05:06:43 UTC 2019

Modified Files:
src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c

Log Message:
Move the definition around to avoid strange compiler error (something
about trying to set a section attribute on a local variable).


To generate a diff of this commit:
cvs rdiff -u -r1.94.12.6 -r1.94.12.7 \
src/sys/compat/linux/common/linux_exec_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_exec_elf32.c
diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.6 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.7
--- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.6	Thu Jan 24 04:52:58 2019
+++ src/sys/compat/linux/common/linux_exec_elf32.c	Thu Jan 24 05:06:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_exec_elf32.c,v 1.94.12.6 2019/01/24 04:52:58 pgoyette Exp $	*/
+/*	$NetBSD: linux_exec_elf32.c,v 1.94.12.7 2019/01/24 05:06:43 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.6 2019/01/24 04:52:58 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.7 2019/01/24 05:06:43 pgoyette Exp $");
 
 #ifndef ELFSIZE
 /* XXX should die */
@@ -74,6 +74,10 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_e
 #include 
 #include 
 
+#if (ELFSIZE == 32)
+	MODULE_HOOK(netbsd32_machine32_hook, const char *, (void));
+#endif
+
 #define LINUX_GO_RT0_SIGNATURE
 
 #ifdef DEBUG_LINUX
@@ -335,7 +339,6 @@ ELFNAME2(linux,go_rt0_signature)(struct 
 		goto out;
 
 #if (ELFSIZE == 32)
-	MODULE_HOOK(netbsd32_machine32_hook, const char *, (void));
 	extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
 	MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m);
 #else



CVS commit: [pgoyette-compat] src/sys/compat/linux/common

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 04:52:58 UTC 2019

Modified Files:
src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c

Log Message:
revert previous, just define the hook here


To generate a diff of this commit:
cvs rdiff -u -r1.94.12.5 -r1.94.12.6 \
src/sys/compat/linux/common/linux_exec_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_exec_elf32.c
diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.5 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.6
--- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.5	Thu Jan 24 04:41:34 2019
+++ src/sys/compat/linux/common/linux_exec_elf32.c	Thu Jan 24 04:52:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_exec_elf32.c,v 1.94.12.5 2019/01/24 04:41:34 pgoyette Exp $	*/
+/*	$NetBSD: linux_exec_elf32.c,v 1.94.12.6 2019/01/24 04:52:58 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.5 2019/01/24 04:41:34 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.6 2019/01/24 04:52:58 pgoyette Exp $");
 
 #ifndef ELFSIZE
 /* XXX should die */
@@ -73,7 +73,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_e
 
 #include 
 #include 
-#include 
 
 #define LINUX_GO_RT0_SIGNATURE
 
@@ -336,6 +335,7 @@ ELFNAME2(linux,go_rt0_signature)(struct 
 		goto out;
 
 #if (ELFSIZE == 32)
+	MODULE_HOOK(netbsd32_machine32_hook, const char *, (void));
 	extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
 	MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m);
 #else



CVS commit: [pgoyette-compat] src/sys/compat/linux/common

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 04:41:34 UTC 2019

Modified Files:
src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c

Log Message:
And include the definition


To generate a diff of this commit:
cvs rdiff -u -r1.94.12.4 -r1.94.12.5 \
src/sys/compat/linux/common/linux_exec_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_exec_elf32.c
diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.4 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.5
--- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.4	Thu Jan 24 04:37:24 2019
+++ src/sys/compat/linux/common/linux_exec_elf32.c	Thu Jan 24 04:41:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_exec_elf32.c,v 1.94.12.4 2019/01/24 04:37:24 pgoyette Exp $	*/
+/*	$NetBSD: linux_exec_elf32.c,v 1.94.12.5 2019/01/24 04:41:34 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.4 2019/01/24 04:37:24 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.5 2019/01/24 04:41:34 pgoyette Exp $");
 
 #ifndef ELFSIZE
 /* XXX should die */
@@ -73,6 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_e
 
 #include 
 #include 
+#include 
 
 #define LINUX_GO_RT0_SIGNATURE
 



CVS commit: [pgoyette-compat] src/sys/compat/linux/common

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 04:37:24 UTC 2019

Modified Files:
src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c

Log Message:
Make sure we declare the hook variable


To generate a diff of this commit:
cvs rdiff -u -r1.94.12.3 -r1.94.12.4 \
src/sys/compat/linux/common/linux_exec_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_exec_elf32.c
diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.3 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.4
--- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.3	Thu Jan 24 04:08:09 2019
+++ src/sys/compat/linux/common/linux_exec_elf32.c	Thu Jan 24 04:37:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_exec_elf32.c,v 1.94.12.3 2019/01/24 04:08:09 pgoyette Exp $	*/
+/*	$NetBSD: linux_exec_elf32.c,v 1.94.12.4 2019/01/24 04:37:24 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.3 2019/01/24 04:08:09 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.4 2019/01/24 04:37:24 pgoyette Exp $");
 
 #ifndef ELFSIZE
 /* XXX should die */
@@ -335,6 +335,7 @@ ELFNAME2(linux,go_rt0_signature)(struct 
 		goto out;
 
 #if (ELFSIZE == 32)
+	extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
 	MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m);
 #else
 	m = machine;



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 04:32:41 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_sysctl.c

Log Message:
I must be getting tired - use the correct name of the hook


To generate a diff of this commit:
cvs rdiff -u -r1.38.2.4 -r1.38.2.5 src/sys/compat/netbsd32/netbsd32_sysctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_sysctl.c
diff -u src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.4 src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.5
--- src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.4	Thu Jan 24 04:31:19 2019
+++ src/sys/compat/netbsd32/netbsd32_sysctl.c	Thu Jan 24 04:32:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.4 2019/01/24 04:31:19 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.5 2019/01/24 04:32:41 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.4 2019/01/24 04:31:19 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.5 2019/01/24 04:32:41 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -171,7 +171,7 @@ netbsd32_sysctl_init(void)
 		   CTLTYPE_INT, "alignbytes", NULL,
 		   NULL, ALIGNBYTES32, NULL, 0,
 		   CTL_HW, HW_ALIGNBYTES, CTL_EOL);
-	MODULE_CALL_HOOK(netbsd32_machine_32_hook, (), machine, m);
+	MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m);
 	sysctl_createv(_clog, 0, &_root, NULL,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_STRING, "machine", NULL,



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 04:31:19 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_sysctl.c

Log Message:
I wrote this stuff, when will I ever learn to use MODULE_CALL_HOOK
instead of MODULE_HOOK_CALL ?  :)


To generate a diff of this commit:
cvs rdiff -u -r1.38.2.3 -r1.38.2.4 src/sys/compat/netbsd32/netbsd32_sysctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_sysctl.c
diff -u src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.3 src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.4
--- src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.3	Thu Jan 24 04:24:52 2019
+++ src/sys/compat/netbsd32/netbsd32_sysctl.c	Thu Jan 24 04:31:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.3 2019/01/24 04:24:52 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.4 2019/01/24 04:31:19 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.3 2019/01/24 04:24:52 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.4 2019/01/24 04:31:19 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -171,7 +171,7 @@ netbsd32_sysctl_init(void)
 		   CTLTYPE_INT, "alignbytes", NULL,
 		   NULL, ALIGNBYTES32, NULL, 0,
 		   CTL_HW, HW_ALIGNBYTES, CTL_EOL);
-	MODULE_HOOK_CALL(netbsd32_machine_32_hook, (), machine, m);
+	MODULE_CALL_HOOK(netbsd32_machine_32_hook, (), machine, m);
 	sysctl_createv(_clog, 0, &_root, NULL,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_STRING, "machine", NULL,



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 04:24:52 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_sysctl.c

Log Message:
Use the hook to get the value of machine32


To generate a diff of this commit:
cvs rdiff -u -r1.38.2.2 -r1.38.2.3 src/sys/compat/netbsd32/netbsd32_sysctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_sysctl.c
diff -u src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.2 src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.3
--- src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.2	Thu Jan 24 03:41:48 2019
+++ src/sys/compat/netbsd32/netbsd32_sysctl.c	Thu Jan 24 04:24:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.3 2019/01/24 04:24:52 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.3 2019/01/24 04:24:52 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -171,6 +171,7 @@ netbsd32_sysctl_init(void)
 		   CTLTYPE_INT, "alignbytes", NULL,
 		   NULL, ALIGNBYTES32, NULL, 0,
 		   CTL_HW, HW_ALIGNBYTES, CTL_EOL);
+	MODULE_HOOK_CALL(netbsd32_machine_32_hook, (), machine, m);
 	sysctl_createv(_clog, 0, &_root, NULL,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_STRING, "machine", NULL,



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 04:16:03 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_exec_elf32.c

Log Message:
Use correct macro name


To generate a diff of this commit:
cvs rdiff -u -r1.40.14.1 -r1.40.14.2 \
src/sys/compat/netbsd32/netbsd32_exec_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c
diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40.14.1 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40.14.2
--- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40.14.1	Thu Jan 24 03:41:48 2019
+++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c	Thu Jan 24 04:16:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.2 2019/01/24 04:16:03 pgoyette Exp $	*/
 /*	from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
 
 /*
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.2 2019/01/24 04:16:03 pgoyette Exp $");
 
 #define	ELFSIZE		32
 
@@ -112,7 +112,7 @@ ELFNAME2(netbsd32,probe_noteless)(struct
 	const char *m;
 
  	if (itp && epp->ep_interp == NULL) {
-		MODULE_HOOK_CALL(netbsd32_machine32_hook, (), machine, m);
+		MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m);
 		(void)compat_elf_check_interp(epp, itp, m);
 	}
 #ifdef _LP64



CVS commit: [pgoyette-compat] src/sys

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 04:08:10 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32.h netbsd32_mod.c
src/sys/kern [pgoyette-compat]: compat_stub.c
src/sys/sys [pgoyette-compat]: compat_stub.h

Log Message:
Rework placement of the new netbsd32_machine32_hook


To generate a diff of this commit:
cvs rdiff -u -r1.115.2.17 -r1.115.2.18 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.15.2.13 -r1.15.2.14 \
src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.110.14.6 -r1.110.14.7 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.94.12.2 -r1.94.12.3 \
src/sys/compat/linux/common/linux_exec_elf32.c
cvs rdiff -u -r1.116.2.17 -r1.116.2.18 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.13.16.17 -r1.13.16.18 src/sys/compat/netbsd32/netbsd32_mod.c
cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.1.2.53 -r1.1.2.54 src/sys/sys/compat_stub.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/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.17 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.18
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.17	Thu Jan 24 03:27:23 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Thu Jan 24 04:08:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.17 2019/01/24 03:27:23 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.18 2019/01/24 04:08:09 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.17 2019/01/24 03:27:23 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.18 2019/01/24 04:08:09 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -969,6 +969,8 @@ netbsd32_vm_default_addr(struct proc *p,
 		return VM_DEFAULT_ADDRESS32_BOTTOMUP(base, sz);
 }
 
+extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
+
 static const char *
 netbsd32_machine32(void)
 {

Index: src/sys/arch/mips/mips/netbsd32_machdep.c
diff -u src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.13 src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.14
--- src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.13	Thu Jan 24 03:27:23 2019
+++ src/sys/arch/mips/mips/netbsd32_machdep.c	Thu Jan 24 04:08:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.15.2.13 2019/01/24 03:27:23 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.15.2.14 2019/01/24 04:08:09 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.13 2019/01/24 03:27:23 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.14 2019/01/24 04:08:09 pgoyette Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_coredump.h"
@@ -308,6 +308,7 @@ cpu_coredump32(struct lwp *l, struct cor
 #endif
 
 struct netbsd32_sendsig_hook_t netbsd32_sendsig_hook;
+extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
  
 void
 netbsd32_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)

Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.6 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.7
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.6	Thu Jan 24 03:27:24 2019
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c	Thu Jan 24 04:08:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.110.14.6 2019/01/24 03:27:24 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.110.14.7 2019/01/24 04:08:09 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.6 2019/01/24 03:27:24 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.7 2019/01/24 04:08:09 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1023,6 +1023,8 @@ netbsd32_machine32(void)
 	return machine32;
 }
 
+extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
+
 void 
 netbsd32_machdep_md_init(void) 
 {

Index: src/sys/compat/linux/common/linux_exec_elf32.c
diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.2 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.3
--- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.2	Thu Jan 24 03:27:24 2019
+++ 

CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 03:41:48 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_exec_elf32.c
netbsd32_sysctl.c

Log Message:
Found a couple other consumers of machine32 - adapt them to use the hook


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.40.14.1 src/sys/compat/netbsd32/netbsd32_exec_elf32.c
cvs rdiff -u -r1.38.2.1 -r1.38.2.2 src/sys/compat/netbsd32/netbsd32_sysctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c
diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40.14.1
--- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40	Sat Aug  6 15:13:13 2016
+++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c	Thu Jan 24 03:41:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_exec_elf32.c,v 1.40 2016/08/06 15:13:13 maxv Exp $	*/
+/*	$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $	*/
 /*	from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
 
 /*
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40 2016/08/06 15:13:13 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $");
 
 #define	ELFSIZE		32
 
@@ -72,6 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_exe
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -108,9 +109,11 @@ int
 ELFNAME2(netbsd32,probe_noteless)(struct lwp *l, struct exec_package *epp,
   void *eh, char *itp, vaddr_t *pos)
 {
+	const char *m;
+
  	if (itp && epp->ep_interp == NULL) {
-		extern const char machine32[];
-		(void)compat_elf_check_interp(epp, itp, machine32);
+		MODULE_HOOK_CALL(netbsd32_machine32_hook, (), machine, m);
+		(void)compat_elf_check_interp(epp, itp, m);
 	}
 #ifdef _LP64
 	epp->ep_flags |= EXEC_32 | EXEC_FORCEAUX;

Index: src/sys/compat/netbsd32/netbsd32_sysctl.c
diff -u src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.1 src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.2
--- src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.1	Mon Jun 25 07:25:48 2018
+++ src/sys/compat/netbsd32/netbsd32_sysctl.c	Thu Jan 24 03:41:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.1 2018/06/25 07:25:48 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.1 2018/06/25 07:25:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -50,6 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_sys
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -122,7 +123,7 @@ void
 netbsd32_sysctl_init(void)
 {
 	const struct sysctlnode *_root = _sysctl_root;
-	extern const char machine32[];
+	const char *m;
 
 	sysctl_createv(_clog, 0, &_root, NULL,
 		   CTLFLAG_PERMANENT,
@@ -173,7 +174,7 @@ netbsd32_sysctl_init(void)
 	sysctl_createv(_clog, 0, &_root, NULL,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_STRING, "machine", NULL,
-		   NULL, 0, __UNCONST(), 0,
+		   NULL, 0, __UNCONST(m), 0,
 		   CTL_HW, HW_MACHINE, CTL_EOL);
 	sysctl_createv(_clog, 0, &_root, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READONLY,



CVS commit: [pgoyette-compat] src/sys

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 03:27:24 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c
src/sys/kern [pgoyette-compat]: compat_stub.c
src/sys/sys [pgoyette-compat]: compat_stub.h

Log Message:
Replace weak symbol definition for machine32 with a hook.  Our in-kernel
linker doesn't handle weak symbols, so this prevented us from loading the
compat_linux32 module.

XXX There don't seem to be any other consumers of machine32 (nor does
XXX there seem to be any consumers of machine_arch32), even though it
XXX is defined for aarch64, arm32, and riscv).


To generate a diff of this commit:
cvs rdiff -u -r1.115.2.16 -r1.115.2.17 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.15.2.12 -r1.15.2.13 \
src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.110.14.5 -r1.110.14.6 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.94.12.1 -r1.94.12.2 \
src/sys/compat/linux/common/linux_exec_elf32.c
cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.1.2.52 -r1.1.2.53 src/sys/sys/compat_stub.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/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.16 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.17
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.16	Tue Jan 22 07:42:40 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Thu Jan 24 03:27:23 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.16 2019/01/22 07:42:40 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.17 2019/01/24 03:27:23 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.16 2019/01/22 07:42:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.17 2019/01/24 03:27:23 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -969,16 +969,23 @@ netbsd32_vm_default_addr(struct proc *p,
 		return VM_DEFAULT_ADDRESS32_BOTTOMUP(base, sz);
 }
 
+static const char *
+netbsd32_machine32(void)
+{
+
+	return machine32;
+}
+
 void
 netbsd32_machdep_md_init(void)
 {
 
-	/* nothing to do */
+	MODULE_SET_HOOK(netbsd32_machine32_hook, "mach32", netbsd32_machine32);
 }
 
 void
 netbsd32_machdep_md_fini(void)
 {
 
-	/* nothing to do */
+	MODULE_UNSET_HOOK(netbsd32_machine32_hook);
 }

Index: src/sys/arch/mips/mips/netbsd32_machdep.c
diff -u src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.12 src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.13
--- src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.12	Tue Jan 22 07:42:40 2019
+++ src/sys/arch/mips/mips/netbsd32_machdep.c	Thu Jan 24 03:27:23 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.15.2.12 2019/01/22 07:42:40 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.15.2.13 2019/01/24 03:27:23 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.12 2019/01/22 07:42:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.13 2019/01/24 03:27:23 pgoyette Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_coredump.h"
@@ -317,16 +317,25 @@ netbsd32_sendsig(const ksiginfo_t *ksi, 
 	netbsd32_sendsig_siginfo(ksi, mask));
 }
 
-void
-netbsd32_machdep_md_init(void)
-{   
-
-	/* nothing to do */
-}   
-
-void
+static const char *
+netbsd32_machine32(void)
+{
+
+	return machine32;
+}
+
+void 
+netbsd32_machdep_md_init(void) 
+{
+
+	MODULE_SET_HOOK(netbsd32_machine32_hook, "mach32", netbsd32_machine32);
+}
+
+void
 netbsd32_machdep_md_fini(void)
-{   
+{
 
-	/* nothing to do */
+	MODULE_UNSET_HOOK(netbsd32_machine32_hook);
 }
+
+

Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.5 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.6
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.5	Tue Jan 22 07:42:40 2019
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c	Thu Jan 24 03:27:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.110.14.5 2019/01/22 07:42:40 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.110.14.6 2019/01/24 03:27:24 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.5 2019/01/22 07:42:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: 

CVS commit: [pgoyette-compat] src/sys/dev/raidframe

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 02:09:56 UTC 2019

Modified Files:
src/sys/dev/raidframe [pgoyette-compat]: rf_compat80.c

Log Message:
Need sys/module.h here


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.7 -r1.2.2.8 src/sys/dev/raidframe/rf_compat80.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/raidframe/rf_compat80.c
diff -u src/sys/dev/raidframe/rf_compat80.c:1.2.2.7 src/sys/dev/raidframe/rf_compat80.c:1.2.2.8
--- src/sys/dev/raidframe/rf_compat80.c:1.2.2.7	Thu Jan 24 02:06:34 2019
+++ src/sys/dev/raidframe/rf_compat80.c	Thu Jan 24 02:09:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_compat80.c,v 1.2.2.7 2019/01/24 02:06:34 pgoyette Exp $	*/
+/*	$NetBSD: rf_compat80.c,v 1.2.2.8 2019/01/24 02:09:56 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2017 Matthew R. Green
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 



CVS commit: [pgoyette-compat] src/sys

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 02:06:35 UTC 2019

Modified Files:
src/sys/dev/raidframe [pgoyette-compat]: rf_compat50.c rf_compat80.c
src/sys/modules/compat_raid_50 [pgoyette-compat]: Makefile
src/sys/modules/compat_raid_80 [pgoyette-compat]: Makefile
Removed Files:
src/sys/compat/common [pgoyette-compat]: compat_raid_50.c
compat_raid_80.c

Log Message:
The raidframe compat code lives in sys/dev/raidframe/ so move all the
module stuff there.  Update the Makefiles appropriately.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r0 src/sys/compat/common/compat_raid_50.c
cvs rdiff -u -r1.1.2.1 -r0 src/sys/compat/common/compat_raid_80.c
cvs rdiff -u -r1.3.2.8 -r1.3.2.9 src/sys/dev/raidframe/rf_compat50.c
cvs rdiff -u -r1.2.2.6 -r1.2.2.7 src/sys/dev/raidframe/rf_compat80.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/modules/compat_raid_50/Makefile
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/modules/compat_raid_80/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/raidframe/rf_compat50.c
diff -u src/sys/dev/raidframe/rf_compat50.c:1.3.2.8 src/sys/dev/raidframe/rf_compat50.c:1.3.2.9
--- src/sys/dev/raidframe/rf_compat50.c:1.3.2.8	Wed Jan 23 09:33:47 2019
+++ src/sys/dev/raidframe/rf_compat50.c	Thu Jan 24 02:06:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_compat50.c,v 1.3.2.8 2019/01/23 09:33:47 pgoyette Exp $	*/
+/*	$NetBSD: rf_compat50.c,v 1.3.2.9 2019/01/24 02:06:34 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -254,10 +254,10 @@ raidframe_50_fini(void)
 	MODULE_UNSET_HOOK(raidframe50_ioctl_hook);
 }
 
-MODULE(MODULE_CLASS_EXEC, raid_50, "raid,compat_50");
+MODULE(MODULE_CLASS_EXEC, compat_raid_50, "raid,compat_50,compat_raid_80");
 
 static int
-raid_50_modcmd(modcmd_t cmd, void *arg)
+compat_raid_50_modcmd(modcmd_t cmd, void *arg)
 {
 
 	switch (cmd) {

Index: src/sys/dev/raidframe/rf_compat80.c
diff -u src/sys/dev/raidframe/rf_compat80.c:1.2.2.6 src/sys/dev/raidframe/rf_compat80.c:1.2.2.7
--- src/sys/dev/raidframe/rf_compat80.c:1.2.2.6	Wed Jan 23 20:19:47 2019
+++ src/sys/dev/raidframe/rf_compat80.c	Thu Jan 24 02:06:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_compat80.c,v 1.2.2.6 2019/01/23 20:19:47 pgoyette Exp $	*/
+/*	$NetBSD: rf_compat80.c,v 1.2.2.7 2019/01/24 02:06:34 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2017 Matthew R. Green
@@ -277,3 +277,21 @@ raidframe_80_fini(void)
  
 	MODULE_UNSET_HOOK(raidframe80_ioctl_hook);
 }
+
+MODULE(MODULE_CLASS_EXEC, compat_raid_80, "raid,compat_80");
+
+static int
+compat_raid_80_modcmd(modcmd_t cmd, void *arg)
+{
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+		raidframe_80_init();
+		return 0;
+	case MODULE_CMD_FINI:
+		raidframe_80_fini();
+		return 0;
+	default:
+		return ENOTTY;
+	}
+}

Index: src/sys/modules/compat_raid_50/Makefile
diff -u src/sys/modules/compat_raid_50/Makefile:1.1.2.2 src/sys/modules/compat_raid_50/Makefile:1.1.2.3
--- src/sys/modules/compat_raid_50/Makefile:1.1.2.2	Sun Sep 23 01:33:26 2018
+++ src/sys/modules/compat_raid_50/Makefile	Thu Jan 24 02:06:35 2019
@@ -1,9 +1,7 @@
-#	$NetBSD: Makefile,v 1.1.2.2 2018/09/23 01:33:26 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.3 2019/01/24 02:06:35 pgoyette Exp $
 
 .include "../Makefile.inc"
 
-.PATH:	${S}/compat/common
-
 KMOD=	compat_raid_50
 
 .PATH:	${S}/dev/raidframe

Index: src/sys/modules/compat_raid_80/Makefile
diff -u src/sys/modules/compat_raid_80/Makefile:1.1.2.2 src/sys/modules/compat_raid_80/Makefile:1.1.2.3
--- src/sys/modules/compat_raid_80/Makefile:1.1.2.2	Thu Oct  4 01:55:17 2018
+++ src/sys/modules/compat_raid_80/Makefile	Thu Jan 24 02:06:35 2019
@@ -1,11 +1,8 @@
-#	$NetBSD: Makefile,v 1.1.2.2 2018/10/04 01:55:17 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.3 2019/01/24 02:06:35 pgoyette Exp $
 
 .include "../Makefile.inc"
 
-.PATH:	${S}/compat/common
-
-KMOD=	compat_raid_80
-
+KMOD=		compat_raid_80
 CPPFLAGS+=	-DCOMPAT_80
 
 .PATH:	${S}/dev/raidframe



CVS commit: [pgoyette-compat] src/sys/compat/linux/common

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 02:05:16 UTC 2019

Modified Files:
src/sys/compat/linux/common [pgoyette-compat]: linux_mod.c

Log Message:
Reduce the list of required modules to what is really needed


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.3 -r1.10.2.4 src/sys/compat/linux/common/linux_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_mod.c
diff -u src/sys/compat/linux/common/linux_mod.c:1.10.2.3 src/sys/compat/linux/common/linux_mod.c:1.10.2.4
--- src/sys/compat/linux/common/linux_mod.c:1.10.2.3	Thu Oct 18 22:09:56 2018
+++ src/sys/compat/linux/common/linux_mod.c	Thu Jan 24 02:05:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mod.c,v 1.10.2.3 2018/10/18 22:09:56 pgoyette Exp $	*/
+/*	$NetBSD: linux_mod.c,v 1.10.2.4 2019/01/24 02:05:16 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.10.2.3 2018/10/18 22:09:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.10.2.4 2019/01/24 02:05:16 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -67,7 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mod.c,
 #endif
 
 #define REQ1"compat_ossaudio,sysv_ipc,compat_util"
-#define REQ2",compat_12,compat_30,compat_50,compat_43,compat_sysv_50"
+#define REQ2",compat_50,compat_43"
 
 MODULE(MODULE_CLASS_EXEC, compat_linux, REQ1 REQ2 MD1 MD2 MD3);
 



CVS commit: [pgoyette-compat] src/sys/arch/amd64/conf

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 24 00:26:32 UTC 2019

Modified Files:
src/sys/arch/amd64/conf [pgoyette-compat]: NOCOMPAT

Log Message:
Disable more COMPAT_xx stuff for the NOCOMPAT config
cvs: --


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/amd64/conf/NOCOMPAT

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/amd64/conf/NOCOMPAT
diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.8 src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.9
--- src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.8	Tue Jan 22 21:24:01 2019
+++ src/sys/arch/amd64/conf/NOCOMPAT	Thu Jan 24 00:26:32 2019
@@ -1,18 +1,19 @@
 include "arch/amd64/conf/GENERIC"
 
-#ident		"NOCOMPAT-$Revision: 1.1.2.8 $"
+#ident		"NOCOMPAT-$Revision: 1.1.2.9 $"
 
 no options 	SYSVMSG		# System V-like message queues
 no options 	SYSVSEM		# System V-like semaphores
 no options 	SYSVSHM		# System V-like memory sharing
- 
+
+no options	COMPAT_43
+no options	COMPAT_44
+no options	COMPAT_BSDPTY
+
 # We only to use ``no options COMPAT_15'' because only COMPAT_15 is
 # explicitly enabled.  (The others are pulled in by statements in
 # sys/conf/files)
 
-#no options	COMPAT_43
-#no options	COMPAT_44
-#no options	COMPAT_BSDPTY
 #no options	COMPAT_09
 #no options	COMPAT_10
 #no options	COMPAT_11



CVS commit: [pgoyette-compat] src/sys/dev/raidframe

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 23 20:19:47 UTC 2019

Modified Files:
src/sys/dev/raidframe [pgoyette-compat]: rf_compat80.c

Log Message:
Another missing semicolon.  gr.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.5 -r1.2.2.6 src/sys/dev/raidframe/rf_compat80.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/raidframe/rf_compat80.c
diff -u src/sys/dev/raidframe/rf_compat80.c:1.2.2.5 src/sys/dev/raidframe/rf_compat80.c:1.2.2.6
--- src/sys/dev/raidframe/rf_compat80.c:1.2.2.5	Wed Jan 23 03:34:14 2019
+++ src/sys/dev/raidframe/rf_compat80.c	Wed Jan 23 20:19:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_compat80.c,v 1.2.2.5 2019/01/23 03:34:14 pgoyette Exp $	*/
+/*	$NetBSD: rf_compat80.c,v 1.2.2.6 2019/01/23 20:19:47 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2017 Matthew R. Green
@@ -275,5 +275,5 @@ void
 raidframe_80_fini(void)
 {
  
-	MODULE_UNSET_HOOK(raidframe80_ioctl_hook)
+	MODULE_UNSET_HOOK(raidframe80_ioctl_hook);
 }



CVS commit: [pgoyette-compat] src/sys/dev/raidframe

2019-01-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 23 09:33:47 UTC 2019

Modified Files:
src/sys/dev/raidframe [pgoyette-compat]: rf_compat50.c

Log Message:
Ooops, missed a semicolon - add it back


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.7 -r1.3.2.8 src/sys/dev/raidframe/rf_compat50.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/raidframe/rf_compat50.c
diff -u src/sys/dev/raidframe/rf_compat50.c:1.3.2.7 src/sys/dev/raidframe/rf_compat50.c:1.3.2.8
--- src/sys/dev/raidframe/rf_compat50.c:1.3.2.7	Wed Jan 23 03:34:14 2019
+++ src/sys/dev/raidframe/rf_compat50.c	Wed Jan 23 09:33:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_compat50.c,v 1.3.2.7 2019/01/23 03:34:14 pgoyette Exp $	*/
+/*	$NetBSD: rf_compat50.c,v 1.3.2.8 2019/01/23 09:33:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -251,7 +251,7 @@ void
 raidframe_50_fini(void)
 {
 
-	MODULE_UNSET_HOOK(raidframe50_ioctl_hook)
+	MODULE_UNSET_HOOK(raidframe50_ioctl_hook);
 }
 
 MODULE(MODULE_CLASS_EXEC, raid_50, "raid,compat_50");



CVS commit: [pgoyette-compat] src/sys/sys

2019-01-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 23 03:40:08 UTC 2019

Modified Files:
src/sys/sys [pgoyette-compat]: module_hook.h

Log Message:
Improve a comment


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/sys/module_hook.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/sys/module_hook.h
diff -u src/sys/sys/module_hook.h:1.1.2.15 src/sys/sys/module_hook.h:1.1.2.16
--- src/sys/sys/module_hook.h:1.1.2.15	Wed Jan 23 03:34:15 2019
+++ src/sys/sys/module_hook.h	Wed Jan 23 03:40:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: module_hook.h,v 1.1.2.15 2019/01/23 03:34:15 pgoyette Exp $	*/
+/* $NetBSD: module_hook.h,v 1.1.2.16 2019/01/23 03:40:08 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -86,7 +86,10 @@ do {\
 	/* Prevent new localcount_acquire calls.  */		\
 	hook.hooked = false;	\
 \
-	/* Wait for existing localcount_acquire calls to finish.  */ \
+	/*			\
+	 * Wait for localcount_acquire calls already under way	\
+	 * to finish.		\
+	 */			\
 	pserialize_perform(hook.psz);\
 \
 	/* Wait for existing localcount references to drain.  */\



CVS commit: [pgoyette-compat] src/sys

2019-01-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 23 03:34:15 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep_16.c
src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep_16.c
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep_16.c
src/sys/compat/common [pgoyette-compat]: bio_30.c ccd_60.c
clockctl_50.c compat_sysv_50_mod.c ieee80211_20.c if43_20.c if_43.c
if_spppsubr50.c kern_mod_80.c rndpseudo_50.c rtsock_14.c
rtsock_50.c rtsock_70.c sysmon_power_40.c tty_60.c
uipc_syscalls_40.c uipc_syscalls_50.c uipc_usrreq_70.c
usb_subr_30.c vfs_syscalls_10.c vnd_30.c vnd_50.c
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_50.c
netbsd32_compat_80.c netbsd32_kern_proc.c
src/sys/compat/sunos [pgoyette-compat]: sunos_mod.c
src/sys/compat/sunos32 [pgoyette-compat]: sunos32_mod.c
src/sys/dev/raidframe [pgoyette-compat]: rf_compat50.c rf_compat80.c
src/sys/dev/wscons [pgoyette-compat]: wsevent_50.c
src/sys/fs/puffs [pgoyette-compat]: puffs_compat.c
src/sys/opencrypto [pgoyette-compat]: ocryptodev.c
src/sys/sys [pgoyette-compat]: module_hook.h

Log Message:
Convert the macros for setting and unsetting a hook to generate
in-line code rather than using an intermediary hook##set routine.
Hooks are set and unset only in one place, so the intermediary
routine provides no benefit.  IMHO using the macro at the point-
of-call is more readable than using it elsewhere in the code and
then calling the generated intermediary routine (for which you
won't even find its declaration or definition unless you remember
to search for the HOOK_SET macro instead).

NFC intended, will verify with a bulk build and an atf test run.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 \
src/sys/arch/amd64/amd64/netbsd32_machdep_16.c
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 \
src/sys/arch/mips/mips/netbsd32_machdep_16.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/bio_30.c \
src/sys/compat/common/clockctl_50.c src/sys/compat/common/if43_20.c \
src/sys/compat/common/vfs_syscalls_10.c src/sys/compat/common/vnd_30.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/compat/common/ccd_60.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/compat_sysv_50_mod.c \
src/sys/compat/common/ieee80211_20.c src/sys/compat/common/vnd_50.c
cvs rdiff -u -r1.14.2.14 -r1.14.2.15 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/if_spppsubr50.c
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/compat/common/kern_mod_80.c
cvs rdiff -u -r1.2.38.2 -r1.2.38.3 src/sys/compat/common/rndpseudo_50.c
cvs rdiff -u -r1.5.14.6 -r1.5.14.7 src/sys/compat/common/rtsock_14.c
cvs rdiff -u -r1.6.2.6 -r1.6.2.7 src/sys/compat/common/rtsock_50.c
cvs rdiff -u -r1.2.2.4 -r1.2.2.5 src/sys/compat/common/rtsock_70.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/common/sysmon_power_40.c
cvs rdiff -u -r1.4.16.6 -r1.4.16.7 src/sys/compat/common/tty_60.c
cvs rdiff -u -r1.15.2.12 -r1.15.2.13 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.3.56.12 -r1.3.56.13 src/sys/compat/common/uipc_syscalls_50.c
cvs rdiff -u -r1.1.20.5 -r1.1.20.6 src/sys/compat/common/uipc_usrreq_70.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/compat/common/usb_subr_30.c
cvs rdiff -u -r1.32.16.15 -r1.32.16.16 \
src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/netbsd32/netbsd32_compat_80.c
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/compat/netbsd32/netbsd32_kern_proc.c
cvs rdiff -u -r1.3.28.2 -r1.3.28.3 src/sys/compat/sunos/sunos_mod.c
cvs rdiff -u -r1.3.28.2 -r1.3.28.3 src/sys/compat/sunos32/sunos32_mod.c
cvs rdiff -u -r1.3.2.6 -r1.3.2.7 src/sys/dev/raidframe/rf_compat50.c
cvs rdiff -u -r1.2.2.4 -r1.2.2.5 src/sys/dev/raidframe/rf_compat80.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/dev/wscons/wsevent_50.c
cvs rdiff -u -r1.4.16.5 -r1.4.16.6 src/sys/fs/puffs/puffs_compat.c
cvs rdiff -u -r1.11.2.7 -r1.11.2.8 src/sys/opencrypto/ocryptodev.c
cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/sys/sys/module_hook.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/amd64/amd64/netbsd32_machdep_16.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep_16.c:1.1.2.11 src/sys/arch/amd64/amd64/netbsd32_machdep_16.c:1.1.2.12
--- src/sys/arch/amd64/amd64/netbsd32_machdep_16.c:1.1.2.11	Mon Jan 14 13:34:26 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep_16.c	Wed Jan 23 03:34:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep_16.c,v 1.1.2.11 2019/01/14 13:34:26 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep_16.c,v 1.1.2.12 2019/01/23 03:34:14 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, 

CVS commit: [pgoyette-compat] src/sys/compat/common

2019-01-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 23 02:55:10 UTC 2019

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_raid_50.c

Log Message:
Add compat_raid_80 to the required list


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_raid_50.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_raid_50.c
diff -u src/sys/compat/common/compat_raid_50.c:1.1.2.1 src/sys/compat/common/compat_raid_50.c:1.1.2.2
--- src/sys/compat/common/compat_raid_50.c:1.1.2.1	Sat Sep 22 22:21:46 2018
+++ src/sys/compat/common/compat_raid_50.c	Wed Jan 23 02:55:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_raid_50.c,v 1.1.2.1 2018/09/22 22:21:46 pgoyette Exp $	*/
+/*	$NetBSD: compat_raid_50.c,v 1.1.2.2 2019/01/23 02:55:09 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_raid_50.c,v 1.1.2.1 2018/09/22 22:21:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_raid_50.c,v 1.1.2.2 2019/01/23 02:55:09 pgoyette Exp $");
 
 #include 
 #include 
@@ -64,7 +64,7 @@ int compat_raid_50_fini(void)
 	return 0;
 }
 
-MODULE(MODULE_CLASS_EXEC, compat_raid_50, "compat_50,raid");
+MODULE(MODULE_CLASS_EXEC, compat_raid_50, "compat_50,raid,compat_raid_80");
 
 static int
 compat_50_modcmd(modcmd_t cmd, void *arg)



CVS commit: [pgoyette-compat] src/sys/modules

2019-01-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 23 02:25:29 UTC 2019

Modified Files:
src/sys/modules/compat_50 [pgoyette-compat]: Makefile
src/sys/modules/compat_80 [pgoyette-compat]: Makefile

Log Message:
Revert previous.  Both opencrypto/ocryptodev and raidframe/rf_compat_xx
already exist in their own modules and do not need to be part of the
compat_{50,80} modules.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/sys/modules/compat_50/Makefile
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/modules/compat_80/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_50/Makefile
diff -u src/sys/modules/compat_50/Makefile:1.1.2.14 src/sys/modules/compat_50/Makefile:1.1.2.15
--- src/sys/modules/compat_50/Makefile:1.1.2.14	Wed Jan 23 02:15:02 2019
+++ src/sys/modules/compat_50/Makefile	Wed Jan 23 02:25:29 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.14 2019/01/23 02:15:02 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.15 2019/01/23 02:25:29 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -31,12 +31,4 @@ SRCS+=  wsevent_50.c
 
 SRCS+=	vnd_50.c
 
-.PATH:	${S}/dev/raidframe
-
-SRCS+=	rf_compat_50.c
-
-.PATH:	${S}/opencrypto
-
-SRCS+=	ocryptodev.c
-
 .include 

Index: src/sys/modules/compat_80/Makefile
diff -u src/sys/modules/compat_80/Makefile:1.1.2.5 src/sys/modules/compat_80/Makefile:1.1.2.6
--- src/sys/modules/compat_80/Makefile:1.1.2.5	Wed Jan 23 02:15:02 2019
+++ src/sys/modules/compat_80/Makefile	Wed Jan 23 02:25:29 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.5 2019/01/23 02:15:02 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.6 2019/01/23 02:25:29 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -11,8 +11,4 @@ CPPFLAGS+=	-DCOMPAT_80
 SRCS+=	compat_80_mod.c
 SRCS+=	kern_mod_80.c
 
-.PATH:	${S}/dev/raidframe
-
-SRCS+=	rf_compat_80.c
-
 .include 



CVS commit: [pgoyette-compat] src/sys/modules

2019-01-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 23 02:15:02 UTC 2019

Modified Files:
src/sys/modules/compat_50 [pgoyette-compat]: Makefile
src/sys/modules/compat_80 [pgoyette-compat]: Makefile

Log Message:
Ensure that all the compat code gets into the appropriate modules, even
compat code that doesn't live in sys/compat


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/sys/modules/compat_50/Makefile
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/modules/compat_80/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_50/Makefile
diff -u src/sys/modules/compat_50/Makefile:1.1.2.13 src/sys/modules/compat_50/Makefile:1.1.2.14
--- src/sys/modules/compat_50/Makefile:1.1.2.13	Tue Jan 15 01:12:30 2019
+++ src/sys/modules/compat_50/Makefile	Wed Jan 23 02:15:02 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.13 2019/01/15 01:12:30 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.14 2019/01/23 02:15:02 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -31,4 +31,12 @@ SRCS+=  wsevent_50.c
 
 SRCS+=	vnd_50.c
 
+.PATH:	${S}/dev/raidframe
+
+SRCS+=	rf_compat_50.c
+
+.PATH:	${S}/opencrypto
+
+SRCS+=	ocryptodev.c
+
 .include 

Index: src/sys/modules/compat_80/Makefile
diff -u src/sys/modules/compat_80/Makefile:1.1.2.4 src/sys/modules/compat_80/Makefile:1.1.2.5
--- src/sys/modules/compat_80/Makefile:1.1.2.4	Wed Oct  3 22:50:50 2018
+++ src/sys/modules/compat_80/Makefile	Wed Jan 23 02:15:02 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.4 2018/10/03 22:50:50 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.5 2019/01/23 02:15:02 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -11,4 +11,8 @@ CPPFLAGS+=	-DCOMPAT_80
 SRCS+=	compat_80_mod.c
 SRCS+=	kern_mod_80.c
 
+.PATH:	${S}/dev/raidframe
+
+SRCS+=	rf_compat_80.c
+
 .include 



CVS commit: [pgoyette-compat] src/sys/arch/amd64/conf

2019-01-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 22 21:24:01 UTC 2019

Modified Files:
src/sys/arch/amd64/conf [pgoyette-compat]: NOCOMPAT

Log Message:
Only explicitly disable COMPAT_15, it is the only compat option that
is actually set.  The others are "pulled in" by statements in
sys/conf/files

This avoids numerous noisy but unnecessary warnings from nbconfig.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/amd64/conf/NOCOMPAT

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/amd64/conf/NOCOMPAT
diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.7 src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.8
--- src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.7	Tue Jan 22 12:02:05 2019
+++ src/sys/arch/amd64/conf/NOCOMPAT	Tue Jan 22 21:24:01 2019
@@ -1,29 +1,33 @@
 include "arch/amd64/conf/GENERIC"
 
-#ident		"NOCOMPAT-$Revision: 1.1.2.7 $"
+#ident		"NOCOMPAT-$Revision: 1.1.2.8 $"
 
 no options 	SYSVMSG		# System V-like message queues
 no options 	SYSVSEM		# System V-like semaphores
 no options 	SYSVSHM		# System V-like memory sharing
  
-no options	COMPAT_43
-no options	COMPAT_44
-no options	COMPAT_BSDPTY
-no options	COMPAT_09
-no options	COMPAT_10
-no options	COMPAT_11
-no options	COMPAT_12
-no options	COMPAT_13
-no options	COMPAT_14
+# We only to use ``no options COMPAT_15'' because only COMPAT_15 is
+# explicitly enabled.  (The others are pulled in by statements in
+# sys/conf/files)
+
+#no options	COMPAT_43
+#no options	COMPAT_44
+#no options	COMPAT_BSDPTY
+#no options	COMPAT_09
+#no options	COMPAT_10
+#no options	COMPAT_11
+#no options	COMPAT_12
+#no options	COMPAT_13
+#no options	COMPAT_14
 no options	COMPAT_15
-no options	COMPAT_16
-no options	COMPAT_20
-no options	COMPAT_30
-no options	COMPAT_40
-no options	COMPAT_50
-no options	COMPAT_60
-no options	COMPAT_70
-no options	COMPAT_80
+#no options	COMPAT_16
+#no options	COMPAT_20
+#no options	COMPAT_30
+#no options	COMPAT_40
+#no options	COMPAT_50
+#no options	COMPAT_60
+#no options	COMPAT_70
+#no options	COMPAT_80
  
 no options 	COMPAT_OSSAUDIO
 no options 	COMPAT_NETBSD32



CVS commit: [pgoyette-compat] src/sys/arch/amd64/conf

2019-01-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 22 12:02:05 UTC 2019

Modified Files:
src/sys/arch/amd64/conf [pgoyette-compat]: NOCOMPAT

Log Message:
Rather than having to track changes in GENERIC and incorporate them
into NOCOMPAT, just include GENERIC and then turn off the various
COMPAT options.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/amd64/conf/NOCOMPAT

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/amd64/conf/NOCOMPAT
diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.6 src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.7
--- src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.6	Tue Jan 22 11:48:31 2019
+++ src/sys/arch/amd64/conf/NOCOMPAT	Tue Jan 22 12:02:05 2019
@@ -1,1199 +1,33 @@
-# $NetBSD: NOCOMPAT,v 1.1.2.6 2019/01/22 11:48:31 pgoyette Exp $
-#
-# GENERIC machine description file
-#
-# This machine description file is used to generate the default NetBSD
-# kernel.  The generic kernel does not include all options, subsystems
-# and device drivers, but should be useful for most applications.
-#
-# The machine description file can be customised for your specific
-# machine to reduce the kernel size and improve its performance.
-#
-# For further information on compiling NetBSD kernels, see the config(8)
-# man page.
-#
-# For further information on hardware support for this architecture, see
-# the intro(4) man page.  For further information about kernel options
-# for this architecture, see the options(4) man page.  For an explanation
-# of each device driver in this file see the section 4 man page for the
-# device.
+include "arch/amd64/conf/GENERIC"
 
-include 	"arch/amd64/conf/std.amd64"
+#ident		"NOCOMPAT-$Revision: 1.1.2.7 $"
 
-options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
-
-#ident		"NOCOMPAT-$Revision: 1.1.2.6 $"
-
-maxusers	64		# estimated number of users
-
-# delay between "rebooting ..." message and hardware reset, in milliseconds
-#options 	CPURESET_DELAY=2000
-
-# This option allows you to force a serial console at the specified
-# I/O address.   see console(4) for details.
-#options 	CONSDEVNAME="\"com\"",CONADDR=0x2f8,CONSPEED=57600
-#	you don't want the option below ON iff you are using the
-#	serial console option of the new boot strap code.
-#options 	CONS_OVERRIDE	# Always use above! independent of boot info
-
-# The following options override the memory sizes passed in from the boot
-# block.  Use them *only* if the boot block is unable to determine the correct
-# values.  Note that the BIOS may *correctly* report less than 640k of base
-# memory if the extended BIOS data area is located at the top of base memory
-# (as is the case on most recent systems).
-#options 	REALBASEMEM=639		# size of base memory (in KB)
-#options 	REALEXTMEM=15360	# size of extended memory (in KB)
-
-# The following options limit the overall size of physical memory
-# and/or the maximum address used by the system.
-# Contrary to REALBASEMEM and REALEXTMEM, they still use the BIOS memory map
-# and can deal with holes in the memory layout.
-#options 	PHYSMEM_MAX_SIZE=64	# max size of physical memory (in MB)
-#options 	PHYSMEM_MAX_ADDR=2048	# don't use memory above this (in MB)
-
-# Standard system options
-
-options 	INSECURE	# disable kernel security levels - X needs this
-
-options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
-options 	NTP		# NTP phase/frequency locked loop
-
-options 	KTRACE		# system call tracing via ktrace(1)
-
-options 	CPU_UCODE	# cpu ucode loading support
-
-# Note: SysV IPC parameters could be changed dynamically, see sysctl(8).
-#options 	SYSVMSG		# System V-like message queues
-#options 	SYSVSEM		# System V-like semaphores
-#options 	SYSVSHM		# System V-like memory sharing
-
-options 	MODULAR		# new style module(7) framework
-options 	MODULAR_DEFAULT_AUTOLOAD
-options 	USERCONF	# userconf(4) support
-#options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
-options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
-
-# CPU-related options
-options 	SVS		# Separate Virtual Space
-makeoptions	SPECTRE_V2_GCC_MITIGATION=1	# GCC Spectre variant 2
-		# migitation
-options 	SPECTRE_V2_GCC_MITIGATION
-
-# USER_LDT. You need to disable SVS to use it.
-#options 	USER_LDT	# user-settable LDT; used by WINE
-#no options	SVS
-
-# CPU features
-acpicpu*	at cpu?		# ACPI CPU (including frequency scaling)
-coretemp*	at cpu?		# Intel on-die thermal sensor
-est0		at cpu0		# Intel Enhanced SpeedStep (non-ACPI)
-#odcm0		at cpu0		# On-demand clock modulation
-powernow0	at cpu0		# AMD PowerNow! and Cool'n'Quiet (non-ACPI)
-vmt0		at cpu0		# VMware Tools
-
-# Alternate buffer queue strategies for better responsiveness under high
-# disk I/O load.
-#options 	BUFQ_READPRIO
-options 	BUFQ_PRIOCSCAN
-
-# Diagnostic/debugging support options
-options 	DIAGNOSTIC	# inexpensive kernel consistency checks
-# 

CVS commit: [pgoyette-compat] src/sys/arch/amd64/conf

2019-01-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 22 11:48:31 UTC 2019

Modified Files:
src/sys/arch/amd64/conf [pgoyette-compat]: GENERIC NOCOMPAT

Log Message:
Synch GENERIC and NOCOMPAT with GENERIC from HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.485.2.13 -r1.485.2.14 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/arch/amd64/conf/NOCOMPAT

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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.485.2.13 src/sys/arch/amd64/conf/GENERIC:1.485.2.14
--- src/sys/arch/amd64/conf/GENERIC:1.485.2.13	Fri Jan 18 08:50:13 2019
+++ src/sys/arch/amd64/conf/GENERIC	Tue Jan 22 11:48:31 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.485.2.13 2019/01/18 08:50:13 pgoyette Exp $
+# $NetBSD: GENERIC,v 1.485.2.14 2019/01/22 11:48:31 pgoyette Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.485.2.13 $"
+#ident		"GENERIC-$Revision: 1.485.2.14 $"
 
 maxusers	64		# estimated number of users
 
@@ -138,16 +138,15 @@ options 	KDTRACE_HOOKS	# kernel DTrace h
 # NetBSD backward compatibility. Support goes from COMPAT_15 up until
 # the latest release. Note that really old compat (< COMPAT_16) is only
 # useful for 32-bit i386 binaries.
-include 	"conf/compat_netbsd09.config"	# XXX PRG XXX usually 15
+include 	"conf/compat_netbsd15.config"
 
 #options 	COMPAT_386BSD_MBRPART # recognize old partition ID
 
 options 	COMPAT_OSSAUDIO
 options 	COMPAT_NETBSD32
 options 	COMPAT_LINUX
-options 	COMPAT_LINUX32	# requires COMPAT_LINUX and COMPAT_NETBSD32
-# and COMPAT_50 (or older)
-options 	EXEC_ELF32	# requires COMPAT_NETBSD32
+options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
+options 	EXEC_ELF32
 
 # Wedge support
 options 	DKWEDGE_AUTODISCOVER	# Automatically add dk(4) instances

Index: src/sys/arch/amd64/conf/NOCOMPAT
diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.5 src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.6
--- src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.5	Wed Dec 26 14:01:31 2018
+++ src/sys/arch/amd64/conf/NOCOMPAT	Tue Jan 22 11:48:31 2019
@@ -1,4 +1,4 @@
-# $NetBSD: NOCOMPAT,v 1.1.2.5 2018/12/26 14:01:31 pgoyette Exp $
+# $NetBSD: NOCOMPAT,v 1.1.2.6 2019/01/22 11:48:31 pgoyette Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.1.2.5 $"
+#ident		"NOCOMPAT-$Revision: 1.1.2.6 $"
 
 maxusers	64		# estimated number of users
 
@@ -74,8 +74,14 @@ options 	USERCONF	# userconf(4) support
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
 # CPU-related options
-#options 	USER_LDT	# user-settable LDT; used by WINE
 options 	SVS		# Separate Virtual Space
+makeoptions	SPECTRE_V2_GCC_MITIGATION=1	# GCC Spectre variant 2
+		# migitation
+options 	SPECTRE_V2_GCC_MITIGATION
+
+# USER_LDT. You need to disable SVS to use it.
+#options 	USER_LDT	# user-settable LDT; used by WINE
+#no options	SVS
 
 # CPU features
 acpicpu*	at cpu?		# ACPI CPU (including frequency scaling)
@@ -85,8 +91,6 @@ est0		at cpu0		# Intel Enhanced SpeedSte
 powernow0	at cpu0		# AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 vmt0		at cpu0		# VMware Tools
 
-options 	PMC		# performance-monitoring counters support
-
 # Alternate buffer queue strategies for better responsiveness under high
 # disk I/O load.
 #options 	BUFQ_READPRIO
@@ -110,11 +114,21 @@ options 	DDB_HISTORY_SIZE=512	# enable h
 #options 	KGDB		# remote debugger
 #options 	KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
 makeoptions	DEBUG="-g"	# compile full symbol table for CTF
+#options	KUBSAN		# Kernel Undefined Behavior Sanitizer (kUBSan)
 #options 	SYSCALL_STATS	# per syscall counts
 #options 	SYSCALL_TIMES	# per syscall times
 #options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
 options 	KDTRACE_HOOKS	# kernel DTrace hooks
 
+# Kernel Address Sanitizer (kASan). You need to disable SVS to use it.
+#makeoptions 	KASAN=1		# Kernel Address Sanitizer
+#options 	KASAN
+#no options	SVS
+
+# Kernel Info Leak Detector.
+#makeoptions 	KLEAK=1
+#options 	KLEAK
+
 # Compatibility options
 # x86_64 never shipped with a.out binaries; the two options below are
 # only relevant to 32-bit i386 binaries
@@ -201,10 +215,6 @@ options 	NETATALK	# AppleTalk networking
 options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
 options 	PPP_DEFLATE	# Deflate compression support for PPP
 options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
-options 	IPFILTER_LOG	# ipmon(8) log support
-options 	IPFILTER_LOOKUP	# ippool(8) support
-options 	IPFILTER_COMPAT # Compat for IP-Filter
-#options 	IPFILTER_DEFAULT_BLOCK	# block all packets by 

CVS commit: [pgoyette-compat] src/sys

2019-01-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 22 07:42:42 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/sparc/fpu [pgoyette-compat]: fpu.c
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/compat/common [pgoyette-compat]: if_43.c
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_kern_proc.c
netbsd32_module.c
src/sys/dev [pgoyette-compat]: bio.c ccd.c clockctl.c vnd.c
src/sys/dev/raidframe [pgoyette-compat]: rf_netbsdkintf.c
src/sys/dev/sysmon [pgoyette-compat]: sysmon_power.c
src/sys/dev/usb [pgoyette-compat]: ugen.c uhid.c usb.c
src/sys/dev/wscons [pgoyette-compat]: wsevent.c
src/sys/fs/puffs [pgoyette-compat]: puffs_msgif.c
src/sys/kern [pgoyette-compat]: kern_proc.c kern_rndq.c sys_module.c
sysv_ipc.c tty.c tty_ptm.c uipc_usrreq.c vfs_syscalls.c
src/sys/net [pgoyette-compat]: if.c if_spppsubr.c rtsock.c
rtsock_shared.c
src/sys/net80211 [pgoyette-compat]: ieee80211_ioctl.c
src/sys/opencrypto [pgoyette-compat]: cryptodev.c
src/sys/sys [pgoyette-compat]: compat_stub.h module_hook.h tty.h

Log Message:
Convert the MODULE_{,VOID_}HOOK_CALL macros to do everything in-line
rather than defining an intermediate hook##call function.  Almost
all of the hooks are called only once, and although we lose the
ability of doing things like

if (MODULE_HOOK_CALL(...) == 0) ...

we simplify things quite a bit.  With this change, we no longer need
to have both declaration and definition macros, and the definition
no longer needs to have both prototype argument list and a "real"
argument list.

FWIW, the above if now needs to written as

int ret;

MODULE_HOOK_CALL(..., ret);
if (ret == 0) ...

with appropriate use of braces {}.


To generate a diff of this commit:
cvs rdiff -u -r1.115.2.15 -r1.115.2.16 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.15.2.11 -r1.15.2.12 \
src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.27.46.4 -r1.27.46.5 src/sys/arch/sparc/fpu/fpu.c
cvs rdiff -u -r1.110.14.4 -r1.110.14.5 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.14.2.13 -r1.14.2.14 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/compat/netbsd32/netbsd32_kern_proc.c
cvs rdiff -u -r1.6.2.12 -r1.6.2.13 src/sys/compat/netbsd32/netbsd32_module.c
cvs rdiff -u -r1.13.16.8 -r1.13.16.9 src/sys/dev/bio.c
cvs rdiff -u -r1.175.2.11 -r1.175.2.12 src/sys/dev/ccd.c
cvs rdiff -u -r1.35.14.11 -r1.35.14.12 src/sys/dev/clockctl.c
cvs rdiff -u -r1.263.2.13 -r1.263.2.14 src/sys/dev/vnd.c
cvs rdiff -u -r1.356.2.10 -r1.356.2.11 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.58.2.8 -r1.58.2.9 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.139.2.9 -r1.139.2.10 src/sys/dev/usb/ugen.c
cvs rdiff -u -r1.101.2.8 -r1.101.2.9 src/sys/dev/usb/uhid.c
cvs rdiff -u -r1.168.2.10 -r1.168.2.11 src/sys/dev/usb/usb.c
cvs rdiff -u -r1.37.2.9 -r1.37.2.10 src/sys/dev/wscons/wsevent.c
cvs rdiff -u -r1.101.10.10 -r1.101.10.11 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -u -r1.209.2.14 -r1.209.2.15 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.89.16.7 -r1.89.16.8 src/sys/kern/kern_rndq.c
cvs rdiff -u -r1.23.2.16 -r1.23.2.17 src/sys/kern/sys_module.c
cvs rdiff -u -r1.32.16.10 -r1.32.16.11 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.275.2.8 -r1.275.2.9 src/sys/kern/tty.c
cvs rdiff -u -r1.37.16.5 -r1.37.16.6 src/sys/kern/tty_ptm.c
cvs rdiff -u -r1.183.2.9 -r1.183.2.10 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.518.2.5 -r1.518.2.6 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.419.2.21 -r1.419.2.22 src/sys/net/if.c
cvs rdiff -u -r1.179.2.10 -r1.179.2.11 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.238.2.24 -r1.238.2.25 src/sys/net/rtsock.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/net/rtsock_shared.c
cvs rdiff -u -r1.60.16.7 -r1.60.16.8 src/sys/net80211/ieee80211_ioctl.c
cvs rdiff -u -r1.98.2.10 -r1.98.2.11 src/sys/opencrypto/cryptodev.c
cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/sys/sys/module_hook.h
cvs rdiff -u -r1.94.2.3 -r1.94.2.4 src/sys/sys/tty.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/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.15 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.16
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.15	Mon Jan 21 06:49:27 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Tue Jan 22 07:42:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.15 2019/01/21 06:49:27 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.16 2019/01/22 07:42:40 pgoyette Exp $	*/
 
 /*
  

CVS commit: [pgoyette-compat] src/sys

2019-01-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 21 06:49:28 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/dev/sysmon [pgoyette-compat]: sysmon_power.c
src/sys/fs/puffs [pgoyette-compat]: puffs_msgif.c
src/sys/kern [pgoyette-compat]: kern_proc.c
src/sys/net [pgoyette-compat]: rtsock.c rtsock_shared.c
src/sys/sys [pgoyette-compat]: module_hook.h

Log Message:
No need to declare the hook_call() function for void hooks.  So
remove and simplify.


To generate a diff of this commit:
cvs rdiff -u -r1.115.2.14 -r1.115.2.15 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.15.2.10 -r1.15.2.11 \
src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.110.14.3 -r1.110.14.4 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.58.2.7 -r1.58.2.8 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.101.10.9 -r1.101.10.10 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -u -r1.209.2.13 -r1.209.2.14 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.238.2.23 -r1.238.2.24 src/sys/net/rtsock.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/net/rtsock_shared.c
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/sys/sys/module_hook.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/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.14 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.15
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.14	Mon Jan 14 13:34:26 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Mon Jan 21 06:49:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.14 2019/01/14 13:34:26 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.15 2019/01/21 06:49:27 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.14 2019/01/14 13:34:26 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.15 2019/01/21 06:49:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -275,7 +275,7 @@ netbsd32_sendsig_siginfo(const ksiginfo_
 
 struct netbsd32_sendsig_hook_t netbsd32_sendsig_hook;
 
-MODULE_CALL_VOID_HOOK_DECL(netbsd32_sendsig_hook,
+MODULE_CALL_HOOK_DECL(netbsd32_sendsig_hook, void,
 (const ksiginfo_t *ksi, const sigset_t *mask));
 MODULE_CALL_VOID_HOOK(netbsd32_sendsig_hook,
 (const ksiginfo_t *ksi, const sigset_t *mask), (ksi, mask),

Index: src/sys/arch/mips/mips/netbsd32_machdep.c
diff -u src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.10 src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.11
--- src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.10	Mon Jan 14 13:34:26 2019
+++ src/sys/arch/mips/mips/netbsd32_machdep.c	Mon Jan 21 06:49:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.15.2.10 2019/01/14 13:34:26 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.15.2.11 2019/01/21 06:49:27 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.10 2019/01/14 13:34:26 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.11 2019/01/21 06:49:27 pgoyette Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_coredump.h"
@@ -309,7 +309,7 @@ cpu_coredump32(struct lwp *l, struct cor
 
 struct netbsd32_sendsig_hook_t netbsd32_sendsig_hook;
  
-MODULE_CALL_VOID_HOOK_DECL(netbsd32_sendsig_hook,
+MODULE_CALL_HOOK_DECL(netbsd32_sendsig_hook, void,
 (const ksiginfo_t *ksi, const sigset_t *mask));
 MODULE_CALL_VOID_HOOK(netbsd32_sendsig_hook,
 (const ksiginfo_t *ksi, const sigset_t *mask), (ksi, mask),  

Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.3 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.4
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.3	Mon Jan 14 13:34:26 2019
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c	Mon Jan 21 06:49:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.110.14.3 2019/01/14 13:34:26 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.110.14.4 2019/01/21 06:49:27 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.3 2019/01/14 13:34:26 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.4 2019/01/21 06:49:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -262,7 +262,7 @@ netbsd32_sendsig_siginfo(const ksiginfo_
 
 struct netbsd32_sendsig_hook_t netbsd32_sendsig_hook;
 

CVS commit: [pgoyette-compat] src/doc

2019-01-17 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 18 05:53:58 UTC 2019

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Add some details to some of the entries.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.24 src/doc/TODO.compat-module:1.1.2.25
--- src/doc/TODO.compat-module:1.1.2.24	Fri Jan 18 05:42:34 2019
+++ src/doc/TODO.compat-module	Fri Jan 18 05:53:58 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.24 2019/01/18 05:42:34 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.25 2019/01/18 05:53:58 pgoyette Exp $ */
 
 DONE
 
@@ -20,17 +20,17 @@ DONE
 built-in dependencies get resolved.
 
 7.  Fixed limits on the number of module dependencies and maximum
-recursion level have been removed.  Previous code for reporting
-module status to userland has been versioned and moved to the
-(new) compat_80 module.
+recursion level (for auto-loading) have been removed.  Previous code
+for reporting module status to userland has been versioned and moved
+to the (new) compat_80 module.
 
 8.  The old monolithic compat module has been broken into multiple
-modules, one for each old NetBSD version.  The monolithic module
-is no longer available.
+modules, one for each old NetBSD version.  The monolithic compat
+module is no longer available.
 
-Similarly, the compat_sysv module has also been split into several
-version-specific modules, and the mini-monolithic compat_sysv module
-is no longer provided.
+Similarly, the compat_sysv and compat_netbsd32 modules have also
+been split into several version-specific modules, and the mini-
+monolithic versions of these modules are no longer provided.
 
 9.  syscalls.master has been updated to autoload the version-specific
 compat modules rather than the monolithic modules.
@@ -39,34 +39,33 @@ DONE
 built regardless.
 
 11. Implemented a MP-safe mechanism for installing and removing function
-pointers.  Thanks to riastradh@ for the template code.
+pointers, preventing them from being unloaded (via modunload) while
+in use.  Thanks to riastradh@ for the template code.
 
-12. Replace version-specific parts of the compat_netbsd32 module (and
-also the compat_netbsd32_sysv module) with individual modules.  Update
-dependencies accordingly.  (Done, but see #19 below.)
-
-13. Finished splitting the vnd_30 and vnd_50 compat code into separate
+12. Finished splitting the vnd_30 and vnd_50 compat code into separate
 modules.
 
-14. Cleaned up some previous vectored routines (related to if_43.c) to
+13. Cleaned up some previous vectored routines (related to if_43.c) to
 use the MP-safe mechanism.
 
-15. Organized (some of) the netbsd32 machine-dependent code to fit a
+14. Organized (some of) the netbsd32 machine-dependent code to fit a
 common build framework, and split version-specific code from baseline
-code as needed.
+code as needed.  More work may be needed here (see #18 below).
 
-16. The rtsock.c code has been split into two separate source files,
+15. The rtsock.c code has been split into two separate source files,
 one for use in -current and one which is shared with COMPAT_50 (the
 code is shared with -current, but macros are used to define version-
-specific routine names and variable types).
+specific routine names and variable types).  Version-specific parts
+of rtsock.c for compat_14 and compat_70 have also been split out and
+included in the relevant version-specific compat modules.
 
 TODO - Not required for branch merge
 
-17. Audit the entire code base for any remaining embedded #ifdef's for
+16. Audit the entire code base for any remaining embedded #ifdef's for
 COMPAT_xx.  When found, move the actual compat code into the compat
 hierarchy and replace originals with indirect (vectored) calls.
 
-18. The compat_60 module still needs some work for XEN systems.  We
+17. The compat_60 module still needs some work for XEN systems.  We
 probably need some build infrastructure changes to ensure that
 XEN (and, for i386, XEN-PAE) modules are build with the correct
 macros defined and with -I directories specified in the same order
@@ -74,7 +73,7 @@ TODO - Not required for branch merge
 prevents loading of micro-code updates for amd64 processors running
 XEN kernels.  This limitation also exists on HEAD.
 
-19. There seems to be quite a bit of MD compat_xx code, in the various
+18. There seems to be quite a bit of MD compat_xx code, in the various
 sys/arch/ directories.  I haven't yet looked at any of this.  But it
 seems to me that the 

CVS commit: [pgoyette-compat] src/doc

2019-01-17 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 18 05:42:34 UTC 2019

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Some tweaks, some typos.  General clean-up, no significant changes.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.23 src/doc/TODO.compat-module:1.1.2.24
--- src/doc/TODO.compat-module:1.1.2.23	Tue Jan 15 22:06:34 2019
+++ src/doc/TODO.compat-module	Fri Jan 18 05:42:34 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.23 2019/01/15 22:06:34 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.24 2019/01/18 05:42:34 pgoyette Exp $ */
 
 DONE
 
@@ -19,10 +19,10 @@ DONE
 defopt/defflag lines in the config files* as needed, to insure that
 built-in dependencies get resolved.
 
-7.  Fixed limits on the number of module depedencies and maximum
+7.  Fixed limits on the number of module dependencies and maximum
 recursion level have been removed.  Previous code for reporting
 module status to userland has been versioned and moved to the
-compat_80 module.
+(new) compat_80 module.
 
 8.  The old monolithic compat module has been broken into multiple
 modules, one for each old NetBSD version.  The monolithic module
@@ -43,7 +43,7 @@ DONE
 
 12. Replace version-specific parts of the compat_netbsd32 module (and
 also the compat_netbsd32_sysv module) with individual modules.  Update
-dependencies accordingly.  (Done, but see #13 below.)
+dependencies accordingly.  (Done, but see #19 below.)
 
 13. Finished splitting the vnd_30 and vnd_50 compat code into separate
 modules.
@@ -51,14 +51,14 @@ DONE
 14. Cleaned up some previous vectored routines (related to if_43.c) to
 use the MP-safe mechanism.
 
-15. Organized netbsd32 machine-dependent code to fit a common build
-framework, and split version-specific code from baseline code as
-needed.
+15. Organized (some of) the netbsd32 machine-dependent code to fit a
+common build framework, and split version-specific code from baseline
+code as needed.
 
 16. The rtsock.c code has been split into two separate source files,
-one for use -current and one which is shared with COMPAT_50 (the
-code is shared, but macros are used to define version-specific
-routine names and variable types).
+one for use in -current and one which is shared with COMPAT_50 (the
+code is shared with -current, but macros are used to define version-
+specific routine names and variable types).
 
 TODO - Not required for branch merge
 



CVS commit: [pgoyette-compat] src/sys

2019-01-17 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 18 00:01:02 UTC 2019

Modified Files:
src/sys/arch/sparc/fpu [pgoyette-compat]: fpu.c
src/sys/compat/common [pgoyette-compat]: if_43.c uipc_usrreq_70.c
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_module.c
src/sys/compat/sys [pgoyette-compat]: socket.h
src/sys/dev [pgoyette-compat]: bio.c ccd.c clockctl.c vnd.c
src/sys/dev/raidframe [pgoyette-compat]: rf_netbsdkintf.c
src/sys/dev/usb [pgoyette-compat]: ugen.c uhid.c usb.c
src/sys/dev/wscons [pgoyette-compat]: wsevent.c
src/sys/fs/puffs [pgoyette-compat]: puffs_msgif.c
src/sys/kern [pgoyette-compat]: kern_proc.c kern_rndq.c sys_module.c
sysv_ipc.c tty.c tty_ptm.c uipc_usrreq.c vfs_syscalls.c
src/sys/net [pgoyette-compat]: if.c if_spppsubr.c rtsock.c
rtsock_shared.c
src/sys/net80211 [pgoyette-compat]: ieee80211_ioctl.c
src/sys/opencrypto [pgoyette-compat]: cryptodev.c
src/sys/sys [pgoyette-compat]: compat_stub.h module_hook.h

Log Message:
Don't restrict hooks to having only int or void types.  Pass the hook's
type to the various macros, as needed.

Allows us to reduce diffs to original in at least one or two places (we
no longer have to provide an additional parameter to the hook routine
for returning a non-int return value).


To generate a diff of this commit:
cvs rdiff -u -r1.27.46.3 -r1.27.46.4 src/sys/arch/sparc/fpu/fpu.c
cvs rdiff -u -r1.14.2.12 -r1.14.2.13 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.1.20.4 -r1.1.20.5 src/sys/compat/common/uipc_usrreq_70.c
cvs rdiff -u -r1.6.2.11 -r1.6.2.12 src/sys/compat/netbsd32/netbsd32_module.c
cvs rdiff -u -r1.15.2.3 -r1.15.2.4 src/sys/compat/sys/socket.h
cvs rdiff -u -r1.13.16.7 -r1.13.16.8 src/sys/dev/bio.c
cvs rdiff -u -r1.175.2.10 -r1.175.2.11 src/sys/dev/ccd.c
cvs rdiff -u -r1.35.14.10 -r1.35.14.11 src/sys/dev/clockctl.c
cvs rdiff -u -r1.263.2.12 -r1.263.2.13 src/sys/dev/vnd.c
cvs rdiff -u -r1.356.2.8 -r1.356.2.9 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.139.2.8 -r1.139.2.9 src/sys/dev/usb/ugen.c
cvs rdiff -u -r1.101.2.7 -r1.101.2.8 src/sys/dev/usb/uhid.c
cvs rdiff -u -r1.168.2.9 -r1.168.2.10 src/sys/dev/usb/usb.c
cvs rdiff -u -r1.37.2.8 -r1.37.2.9 src/sys/dev/wscons/wsevent.c
cvs rdiff -u -r1.101.10.8 -r1.101.10.9 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -u -r1.209.2.12 -r1.209.2.13 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.89.16.6 -r1.89.16.7 src/sys/kern/kern_rndq.c
cvs rdiff -u -r1.23.2.15 -r1.23.2.16 src/sys/kern/sys_module.c
cvs rdiff -u -r1.32.16.8 -r1.32.16.9 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.275.2.7 -r1.275.2.8 src/sys/kern/tty.c
cvs rdiff -u -r1.37.16.4 -r1.37.16.5 src/sys/kern/tty_ptm.c
cvs rdiff -u -r1.183.2.8 -r1.183.2.9 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.518.2.4 -r1.518.2.5 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.419.2.20 -r1.419.2.21 src/sys/net/if.c
cvs rdiff -u -r1.179.2.9 -r1.179.2.10 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.238.2.22 -r1.238.2.23 src/sys/net/rtsock.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/net/rtsock_shared.c
cvs rdiff -u -r1.60.16.6 -r1.60.16.7 src/sys/net80211/ieee80211_ioctl.c
cvs rdiff -u -r1.98.2.9 -r1.98.2.10 src/sys/opencrypto/cryptodev.c
cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/sys/sys/module_hook.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/sparc/fpu/fpu.c
diff -u src/sys/arch/sparc/fpu/fpu.c:1.27.46.3 src/sys/arch/sparc/fpu/fpu.c:1.27.46.4
--- src/sys/arch/sparc/fpu/fpu.c:1.27.46.3	Mon Jan 14 13:34:26 2019
+++ src/sys/arch/sparc/fpu/fpu.c	Fri Jan 18 00:01:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.27.46.3 2019/01/14 13:34:26 pgoyette Exp $ */
+/*	$NetBSD: fpu.c,v 1.27.46.4 2019/01/18 00:01:00 pgoyette Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.27.46.3 2019/01/14 13:34:26 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.27.46.4 2019/01/18 00:01:00 pgoyette Exp $");
 
 #include 
 #include 
@@ -122,8 +122,8 @@ static u_char fpu_codes_sunos[] = {
 /*
  * HOOK for checking if the lwp's emul matches sunos
  */
-MODULE_CALL_INT_HOOK_DECL(get_emul_sunos_hook, (const struct emul **emul));
-MODULE_CALL_INT_HOOK(get_emul_sunos_hook, (const struct emul ** emul), (emul),
+MODULE_CALL_HOOK_DECL(get_emul_sunos_hook, int, (const struct emul **emul));
+MODULE_CALL_HOOK(get_emul_sunos_hook, int, (const struct emul ** emul), (emul),
 enosys());
 
 /*

Index: src/sys/compat/common/if_43.c
diff -u src/sys/compat/common/if_43.c:1.14.2.12 src/sys/compat/common/if_43.c:1.14.2.13
--- src/sys/compat/common/if_43.c:1.14.2.12	Mon Jan 14 13:34:27 2019
+++ src/sys/compat/common/if_43.c	Fri Jan 18 00:01:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.c,v 1.14.2.12 2019/01/14 13:34:27 pgoyette Exp 

CVS commit: [pgoyette-compat] src/sys/sys

2019-01-17 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 17 21:32:42 UTC 2019

Modified Files:
src/sys/sys [pgoyette-compat]: module_hook.h

Log Message:
The return value of a hook is not necessarily an error code, so
rename the variable appropriately.

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/sys/sys/module_hook.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/sys/module_hook.h
diff -u src/sys/sys/module_hook.h:1.1.2.10 src/sys/sys/module_hook.h:1.1.2.11
--- src/sys/sys/module_hook.h:1.1.2.10	Mon Jan 14 13:34:28 2019
+++ src/sys/sys/module_hook.h	Thu Jan 17 21:32:42 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: module_hook.h,v 1.1.2.10 2019/01/14 13:34:28 pgoyette Exp $	*/
+/* $NetBSD: module_hook.h,v 1.1.2.11 2019/01/17 21:32:42 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -117,7 +117,7 @@ int\
 hook ## _call decl		\
 {\
 	bool __hooked;		\
-	int __hook_error, __hook_s;\
+	int __hook_retval, __hook_s;\
 \
 	__hook_s = pserialize_read_enter();			\
 	__hooked = hook.hooked;	\
@@ -128,13 +128,13 @@ hook ## _call decl		\
 	pserialize_read_exit(__hook_s);\
 \
 	if (__hooked) {		\
-		__hook_error = (*hook.f)args;			\
+		__hook_retval = (*hook.f)args;			\
 		localcount_release(, ,		\
 		);	\
 	} else {		\
-		__hook_error = default;\
+		__hook_retval = default;			\
 	}			\
-	return __hook_error;	\
+	return __hook_retval;	\
 }
 
 #define MODULE_CALL_VOID_HOOK(hook, decl, args, default)	\



CVS commit: [pgoyette-compat] src/sys/net

2019-01-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 22:28:15 UTC 2019

Modified Files:
src/sys/net [pgoyette-compat]: rtsock_shared.c

Log Message:
More #include removal


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/net/rtsock_shared.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/rtsock_shared.c
diff -u src/sys/net/rtsock_shared.c:1.1.2.3 src/sys/net/rtsock_shared.c:1.1.2.4
--- src/sys/net/rtsock_shared.c:1.1.2.3	Tue Jan 15 04:10:34 2019
+++ src/sys/net/rtsock_shared.c	Tue Jan 15 22:28:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_shared.c,v 1.1.2.3 2019/01/15 04:10:34 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_shared.c,v 1.1.2.4 2019/01/15 22:28:15 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,12 +61,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.1.2.3 2019/01/15 04:10:34 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.1.2.4 2019/01/15 22:28:15 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
-#include "opt_mpls.h"
-#include "opt_compat_netbsd.h"
 #include "opt_net_mpsafe.h"
 #endif
 



CVS commit: [pgoyette-compat] src/sys

2019-01-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 22:27:07 UTC 2019

Modified Files:
src/sys/compat/common [pgoyette-compat]: rtsock_50.c
src/sys/net [pgoyette-compat]: rtsock.c

Log Message:
Remove a couple of unneeded #include-s

XXX There's probably a lot more clean-up that could happen here!


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.5 -r1.6.2.6 src/sys/compat/common/rtsock_50.c
cvs rdiff -u -r1.238.2.21 -r1.238.2.22 src/sys/net/rtsock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/rtsock_50.c
diff -u src/sys/compat/common/rtsock_50.c:1.6.2.5 src/sys/compat/common/rtsock_50.c:1.6.2.6
--- src/sys/compat/common/rtsock_50.c:1.6.2.5	Tue Jan 15 03:40:35 2019
+++ src/sys/compat/common/rtsock_50.c	Tue Jan 15 22:27:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_50.c,v 1.6.2.5 2019/01/15 03:40:35 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_50.c,v 1.6.2.6 2019/01/15 22:27:07 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,11 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.6.2.5 2019/01/15 03:40:35 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_compat_netbsd.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.6.2.6 2019/01/15 22:27:07 pgoyette Exp $");
 
 #define	COMPAT_RTSOCK	/* Use the COMPATNAME/COMPATCALL macros and the
 			 * various other compat definitions - see

Index: src/sys/net/rtsock.c
diff -u src/sys/net/rtsock.c:1.238.2.21 src/sys/net/rtsock.c:1.238.2.22
--- src/sys/net/rtsock.c:1.238.2.21	Tue Jan 15 04:10:34 2019
+++ src/sys/net/rtsock.c	Tue Jan 15 22:27:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.238.2.21 2019/01/15 04:10:34 pgoyette Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.238.2.22 2019/01/15 22:27:07 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,13 +61,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.21 2019/01/15 04:10:34 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.22 2019/01/15 22:27:07 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
-#include "opt_mpls.h"
 #include "opt_compat_netbsd.h"
-#include "opt_net_mpsafe.h"
 #endif
 
 #include 



CVS commit: [pgoyette-compat] src/doc

2019-01-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 22:06:35 UTC 2019

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Now that the rtsock_50 stuff has been disentangled, remove a reference
to that in another entry.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.22 src/doc/TODO.compat-module:1.1.2.23
--- src/doc/TODO.compat-module:1.1.2.22	Tue Jan 15 03:44:06 2019
+++ src/doc/TODO.compat-module	Tue Jan 15 22:06:34 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.22 2019/01/15 03:44:06 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.23 2019/01/15 22:06:34 pgoyette Exp $ */
 
 DONE
 
@@ -92,10 +92,10 @@ TODO - Not required for branch merge
 into the monolithic COMPAT module on HEAD.  Thus, its absence from
 any of the version-specific modules is not a regression.
 
-20. For compat_50, in addition to rtsock there are some things in dev/gpio
-and dev/wscons/wsmux that I haven't been able to cleanly separate.
-These items are not currently included in the monolithic COMPAT module
-on HEAD, so lack of integration on the branch is not a regression.
+20. For compat_50, there are some things in dev/gpio and dev/wscons/wsmux
+that I haven't been able to cleanly separate.  These items are not
+currently included in the monolithic COMPAT module on HEAD, so lack of
+integration on the branch is not a regression.
 
 21. Find all the remaining dependencies on the compat_utils routines and
 deal with them appropriately.  For now, we simply ensure that they



CVS commit: [pgoyette-compat] src/sys/kern

2019-01-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 22:01:26 UTC 2019

Modified Files:
src/sys/kern [pgoyette-compat]: compat_stub.c

Log Message:
Add a comment for the SCTP section, as was done for the NTP section


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.38 -r1.1.2.39 src/sys/kern/compat_stub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.1.2.38 src/sys/kern/compat_stub.c:1.1.2.39
--- src/sys/kern/compat_stub.c:1.1.2.38	Tue Jan 15 21:37:44 2019
+++ src/sys/kern/compat_stub.c	Tue Jan 15 22:01:26 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.1.2.38 2019/01/15 21:37:44 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.1.2.39 2019/01/15 22:01:26 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -64,6 +64,12 @@ int (*vec_ntp_timestatus)(void) = NULL;
 void (*vec_ntp_adjtime1)(struct timex *) = NULL;
 #endif
 
+/*
+ * Routine vectors for sctp (called from within rtsock)
+ *
+ * MP-hooks not needed since the SCTP code is not modular
+ */
+
 #ifdef SCTP
 void (*vec_sctp_add_ip_address)(struct ifaddr *) = sctp_add_ip_address;
 void (*vec_sctp_delete_ip_address)(struct ifaddr *) = sctp_delete_ip_address;



CVS commit: [pgoyette-compat] src/sys/kern

2019-01-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 21:37:44 UTC 2019

Modified Files:
src/sys/kern [pgoyette-compat]: compat_stub.c

Log Message:
Add missing # to fix the non-SCTP case.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.37 -r1.1.2.38 src/sys/kern/compat_stub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.1.2.37 src/sys/kern/compat_stub.c:1.1.2.38
--- src/sys/kern/compat_stub.c:1.1.2.37	Tue Jan 15 10:52:20 2019
+++ src/sys/kern/compat_stub.c	Tue Jan 15 21:37:44 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.1.2.37 2019/01/15 10:52:20 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.1.2.38 2019/01/15 21:37:44 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@ void (*vec_ntp_adjtime1)(struct timex *)
 #ifdef SCTP
 void (*vec_sctp_add_ip_address)(struct ifaddr *) = sctp_add_ip_address;
 void (*vec_sctp_delete_ip_address)(struct ifaddr *) = sctp_delete_ip_address;
-else
+#else
 void (*vec_sctp_add_ip_address)(struct ifaddr *) = NULL;
 void (*vec_sctp_delete_ip_address)(struct ifaddr *) = NULL;
 #endif 



CVS commit: [pgoyette-compat] src/sys/sys

2019-01-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 12:42:12 UTC 2019

Modified Files:
src/sys/sys [pgoyette-compat]: compat_stub.h

Log Message:
Fix a copy/pasto in a comment


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/sys/sys/compat_stub.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/sys/compat_stub.h
diff -u src/sys/sys/compat_stub.h:1.1.2.49 src/sys/sys/compat_stub.h:1.1.2.50
--- src/sys/sys/compat_stub.h:1.1.2.49	Tue Jan 15 04:10:35 2019
+++ src/sys/sys/compat_stub.h	Tue Jan 15 12:42:12 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.h,v 1.1.2.49 2019/01/15 04:10:35 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.h,v 1.1.2.50 2019/01/15 12:42:12 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@ MODULE_HOOK(ntp_adjtime1_hook, int, (str
 /*
  * Routine hooks for SCTP code - used by rtsock
  *
- * MP-hooks not needed since the NTP code is not modular
+ * MP-hooks not needed since the SCTP code is not modular
  */
 struct ifaddr;
 extern void (*vec_sctp_add_ip_address)(struct ifaddr *);



CVS commit: [pgoyette-compat] src/sys/kern

2019-01-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 10:52:20 UTC 2019

Modified Files:
src/sys/kern [pgoyette-compat]: compat_stub.c

Log Message:
Include appropriate headers to define the sctp routines


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/sys/kern/compat_stub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.1.2.36 src/sys/kern/compat_stub.c:1.1.2.37
--- src/sys/kern/compat_stub.c:1.1.2.36	Tue Jan 15 04:10:34 2019
+++ src/sys/kern/compat_stub.c	Tue Jan 15 10:52:20 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.1.2.36 2019/01/15 04:10:34 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.1.2.37 2019/01/15 10:52:20 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -33,6 +33,7 @@
 
 #ifdef _KERNEL_OPT
 #include "opt_ntp.h"
+#include "opt_sctp.h"
 #endif
 
 #include 
@@ -43,6 +44,10 @@
 #include 
 #endif
 
+#ifdef SCTP
+#include 
+#endif
+
 /*
  * Routine vectors for compat_50___sys_ntp_gettime
  *



CVS commit: [pgoyette-compat] src/sys

2019-01-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 04:10:35 UTC 2019

Modified Files:
src/sys/kern [pgoyette-compat]: compat_stub.c
src/sys/net [pgoyette-compat]: rtsock.c rtsock_shared.c
src/sys/sys [pgoyette-compat]: compat_stub.h

Log Message:
Add vectors for sctp_{add,delete}_ipaddr() so we can check them
in rtsock.c rather than depending on the SCTP kernel compile
option.  This is similar to what was done previously with NTP.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.35 -r1.1.2.36 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.238.2.20 -r1.238.2.21 src/sys/net/rtsock.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/net/rtsock_shared.c
cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/sys/sys/compat_stub.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/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.1.2.35 src/sys/kern/compat_stub.c:1.1.2.36
--- src/sys/kern/compat_stub.c:1.1.2.35	Sun Jan 13 23:32:21 2019
+++ src/sys/kern/compat_stub.c	Tue Jan 15 04:10:34 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.1.2.35 2019/01/13 23:32:21 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.1.2.36 2019/01/15 04:10:34 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -59,6 +59,15 @@ int (*vec_ntp_timestatus)(void) = NULL;
 void (*vec_ntp_adjtime1)(struct timex *) = NULL;
 #endif
 
+#ifdef SCTP
+void (*vec_sctp_add_ip_address)(struct ifaddr *) = sctp_add_ip_address;
+void (*vec_sctp_delete_ip_address)(struct ifaddr *) = sctp_delete_ip_address;
+else
+void (*vec_sctp_add_ip_address)(struct ifaddr *) = NULL;
+void (*vec_sctp_delete_ip_address)(struct ifaddr *) = NULL;
+#endif 
+
+
 /*
  * usb device_info compatability
  */

Index: src/sys/net/rtsock.c
diff -u src/sys/net/rtsock.c:1.238.2.20 src/sys/net/rtsock.c:1.238.2.21
--- src/sys/net/rtsock.c:1.238.2.20	Tue Jan 15 03:40:35 2019
+++ src/sys/net/rtsock.c	Tue Jan 15 04:10:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.238.2.20 2019/01/15 03:40:35 pgoyette Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.238.2.21 2019/01/15 04:10:34 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,13 +61,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.20 2019/01/15 03:40:35 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.21 2019/01/15 04:10:34 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
 #include "opt_mpls.h"
 #include "opt_compat_netbsd.h"
-#include "opt_sctp.h"
 #include "opt_net_mpsafe.h"
 #endif
 
@@ -96,11 +95,6 @@ __KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1
 
 #include 
 
-#ifdef SCTP
-extern void sctp_add_ip_address(struct ifaddr *);
-extern void sctp_delete_ip_address(struct ifaddr *);
-#endif
-
 #include 
 #include 
 

Index: src/sys/net/rtsock_shared.c
diff -u src/sys/net/rtsock_shared.c:1.1.2.2 src/sys/net/rtsock_shared.c:1.1.2.3
--- src/sys/net/rtsock_shared.c:1.1.2.2	Tue Jan 15 03:40:35 2019
+++ src/sys/net/rtsock_shared.c	Tue Jan 15 04:10:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_shared.c,v 1.1.2.2 2019/01/15 03:40:35 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_shared.c,v 1.1.2.3 2019/01/15 04:10:34 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,13 +61,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.1.2.2 2019/01/15 03:40:35 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.1.2.3 2019/01/15 04:10:34 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
 #include "opt_mpls.h"
 #include "opt_compat_netbsd.h"
-#include "opt_sctp.h"
 #include "opt_net_mpsafe.h"
 #endif
 
@@ -96,11 +95,6 @@ __KERNEL_RCSID(0, "$NetBSD: rtsock_share
 
 #include 
 
-#ifdef SCTP
-extern void sctp_add_ip_address(struct ifaddr *);
-extern void sctp_delete_ip_address(struct ifaddr *);
-#endif
-
 #include 
 #include 
 
@@ -1427,13 +1421,11 @@ COMPATNAME(rt_newaddrmsg)(int cmd, struc
 	KASSERT(ifa != NULL);
 	KASSERT(ifa->ifa_addr != NULL);
 	ifp = ifa->ifa_ifp;
-#ifdef SCTP
-	if (cmd == RTM_ADD) {
-		sctp_add_ip_address(ifa);
-	} else if (cmd == RTM_DELETE) {
-		sctp_delete_ip_address(ifa);
+	if (cmd == RTM_ADD && vec_sctp_add_ip_address != NULL) {
+		(*vec_sctp_add_ip_address)(ifa);
+	} else if (cmd == RTM_DELETE && vec_sctp_delete_ip_address != NULL) {
+		(*vec_sctp_delete_ip_address)(ifa);
 	}
-#endif
 
 	COMPATCALL(rt_newaddrmsg, (cmd, ifa, error, rt));
 	if (COMPATNAME(route_info).ri_cb.any_count == 0)

Index: src/sys/sys/compat_stub.h
diff -u src/sys/sys/compat_stub.h:1.1.2.48 src/sys/sys/compat_stub.h:1.1.2.49
--- src/sys/sys/compat_stub.h:1.1.2.48	Mon Jan 14 13:34:28 2019
+++ src/sys/sys/compat_stub.h	Tue Jan 15 04:10:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.h,v 1.1.2.48 2019/01/14 13:34:28 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.h,v 1.1.2.49 2019/01/15 04:10:35 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, 

CVS commit: [pgoyette-compat] src/doc

2019-01-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 03:44:06 UTC 2019

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Note completion of separating rtsock.c into pieces.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.21 src/doc/TODO.compat-module:1.1.2.22
--- src/doc/TODO.compat-module:1.1.2.21	Mon Jan 14 13:35:53 2019
+++ src/doc/TODO.compat-module	Tue Jan 15 03:44:06 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.21 2019/01/14 13:35:53 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.22 2019/01/15 03:44:06 pgoyette Exp $ */
 
 DONE
 
@@ -55,12 +55,10 @@ DONE
 framework, and split version-specific code from baseline code as
 needed.
 
-16. While the rtsock_50 situation is still a disaster (rtsock_50.c
-#include-s the main rtsock.c code with various COMPAT_50-dependant
-macro definitions and redefinitions), the basic functionality
-works, and the compat_14 references to rtsock_50 routines seems to
-be correct.  The rtsock_50.c stuff should still be rewritten at
-some future time, but it's not urgent.
+16. The rtsock.c code has been split into two separate source files,
+one for use -current and one which is shared with COMPAT_50 (the
+code is shared, but macros are used to define version-specific
+routine names and variable types).
 
 TODO - Not required for branch merge
 



CVS commit: [pgoyette-compat] src/sys

2019-01-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 03:40:35 UTC 2019

Modified Files:
src/sys/compat/common [pgoyette-compat]: rtsock_50.c
src/sys/net [pgoyette-compat]: rtsock.c rtsock_shared.c

Log Message:
Split sys/net/rtsock.c into two pieces, one of which is applicable only
to -current and one which is shared between -current and COMPAT_50.


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.4 -r1.6.2.5 src/sys/compat/common/rtsock_50.c
cvs rdiff -u -r1.238.2.19 -r1.238.2.20 src/sys/net/rtsock.c
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/net/rtsock_shared.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/rtsock_50.c
diff -u src/sys/compat/common/rtsock_50.c:1.6.2.4 src/sys/compat/common/rtsock_50.c:1.6.2.5
--- src/sys/compat/common/rtsock_50.c:1.6.2.4	Mon Jan 14 13:34:27 2019
+++ src/sys/compat/common/rtsock_50.c	Tue Jan 15 03:40:35 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_50.c,v 1.6.2.4 2019/01/14 13:34:27 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_50.c,v 1.6.2.5 2019/01/15 03:40:35 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,23 +61,18 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.6.2.4 2019/01/14 13:34:27 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.6.2.5 2019/01/15 03:40:35 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #endif
 
-/*
- * COMPAT_50 and COMPAT_RTSOCK must be defined for rtsock.c regardless of
- * the currently enabled options.
- */
-#ifndef COMPAT_50
-#define COMPAT_50
-#endif
-
-#define	COMPAT_RTSOCK
+#define	COMPAT_RTSOCK	/* Use the COMPATNAME/COMPATCALL macros and the
+			 * various other compat definitions - see
+			 * sys/net/rtsock_shared.c for details
+			 */
 
-#include 
+#include 
 #include 
 
 void

Index: src/sys/net/rtsock.c
diff -u src/sys/net/rtsock.c:1.238.2.19 src/sys/net/rtsock.c:1.238.2.20
--- src/sys/net/rtsock.c:1.238.2.19	Mon Jan 14 13:34:28 2019
+++ src/sys/net/rtsock.c	Tue Jan 15 03:40:35 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.238.2.19 2019/01/14 13:34:28 pgoyette Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.238.2.20 2019/01/15 03:40:35 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.19 2019/01/14 13:34:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.20 2019/01/15 03:40:35 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -105,91 +105,14 @@ extern void sctp_delete_ip_address(struc
 #include 
 
 #ifdef COMPAT_RTSOCK
-#define	RTM_XVERSION	RTM_OVERSION
-#define	RTM_XNEWADDR	RTM_ONEWADDR
-#define	RTM_XDELADDR	RTM_ODELADDR
-#define	RTM_XCHGADDR	RTM_OCHGADDR
-#define	RT_XADVANCE(a,b) RT_OADVANCE(a,b)
-#define	RT_XROUNDUP(n)	RT_OROUNDUP(n)
-#define	PF_XROUTE	PF_OROUTE
-#define	rt_xmsghdr	rt_msghdr50
-#define	if_xmsghdr	if_msghdr	/* if_msghdr50 is for RTM_OIFINFO */
-#define	ifa_xmsghdr	ifa_msghdr50
-#define	if_xannouncemsghdr	if_announcemsghdr50
-#define	COMPATNAME(x)	compat_50_ ## x
-#define	DOMAINNAME	"oroute"
-CTASSERT(sizeof(struct ifa_xmsghdr) == 20);
-DOMAIN_DEFINE(compat_50_routedomain); /* forward declare and add to link set */
-#else /* COMPAT_RTSOCK */
-#define	RTM_XVERSION	RTM_VERSION
-#define	RTM_XNEWADDR	RTM_NEWADDR
-#define	RTM_XDELADDR	RTM_DELADDR
-#define	RTM_XCHGADDR	RTM_CHGADDR
-#define	RT_XADVANCE(a,b) RT_ADVANCE(a,b)
-#define	RT_XROUNDUP(n)	RT_ROUNDUP(n)
-#define	PF_XROUTE	PF_ROUTE
-#define	rt_xmsghdr	rt_msghdr
-#define	if_xmsghdr	if_msghdr
-#define	ifa_xmsghdr	ifa_msghdr
-#define	if_xannouncemsghdr	if_announcemsghdr
-#define	COMPATNAME(x)	x
-#define	DOMAINNAME	"route"
-CTASSERT(sizeof(struct ifa_xmsghdr) == 32);
-#ifdef COMPAT_50
-#define	COMPATCALL(name, args)	rtsock_50_ ## name ## _hook_call args
+#undef COMPAT_RTSOCK
 #endif
-DOMAIN_DEFINE(routedomain); /* forward declare and add to link set */
-#undef COMPAT_50
-#endif /* COMPAT_RTSOCK */
 
-#ifndef COMPATCALL
-#define	COMPATCALL(name, args)	do { } while (/*CONSTCOND*/ 0)
-#endif
-
-#ifdef RTSOCK_DEBUG
-#define RT_IN_PRINT(info, b, a) (in_print((b), sizeof(b), \
-&((const struct sockaddr_in *)(info)->rti_info[(a)])->sin_addr), (b))
-#endif /* RTSOCK_DEBUG */
-
-struct route_info COMPATNAME(route_info) = {
-	.ri_dst = { .sa_len = 2, .sa_family = PF_XROUTE, },
-	.ri_src = { .sa_len = 2, .sa_family = PF_XROUTE, },
-	.ri_maxqlen = IFQ_MAXLEN,
-};
-
-static void COMPATNAME(route_init)(void);
-static int COMPATNAME(route_output)(struct mbuf *, struct socket *);
-
-static int rt_xaddrs(u_char, const char *, const char *, struct rt_addrinfo *);
-static struct mbuf *rt_makeifannouncemsg(struct ifnet *, int, int,
-struct rt_addrinfo *);
-static int rt_msg2(int, struct rt_addrinfo *, void *, struct rt_walkarg *, int *);
-static void _rt_setmetrics(int, const struct rt_xmsghdr *, struct 

CVS commit: [pgoyette-compat] src/sys/net

2019-01-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 01:16:42 UTC 2019

Added Files:
src/sys/net [pgoyette-compat]: rtsock_shared.c

Log Message:
First pass at extracting the "shared" compat code into its own source
file, rather than burying it in sys/net/rtsock.c and conditionalizing
various pieces.

XXX Not yet used - it will eventually be #include-d by sys/net/rtsock.c
XXX and compat/common/rtsock_50.c


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/net/rtsock_shared.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/net/rtsock_shared.c
diff -u /dev/null src/sys/net/rtsock_shared.c:1.1.2.1
--- /dev/null	Tue Jan 15 01:16:42 2019
+++ src/sys/net/rtsock_shared.c	Tue Jan 15 01:16:42 2019
@@ -0,0 +1,1727 @@
+/*	$NetBSD: rtsock_shared.c,v 1.1.2.1 2019/01/15 01:16:42 pgoyette Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1988, 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)rtsock.c	8.7 (Berkeley) 10/12/95
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.1.2.1 2019/01/15 01:16:42 pgoyette Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_inet.h"
+#include "opt_mpls.h"
+#include "opt_compat_netbsd.h"
+#include "opt_sctp.h"
+#include "opt_net_mpsafe.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+#ifdef SCTP
+extern void sctp_add_ip_address(struct ifaddr *);
+extern void sctp_delete_ip_address(struct ifaddr *);
+#endif
+
+#include 
+#include 
+
+#ifdef COMPAT_RTSOCK		/* These belong in compat/common/rtsock_50.c */
+#define	RTM_XVERSION	RTM_OVERSION
+#define	

CVS commit: [pgoyette-compat] src/sys/modules/compat_50

2019-01-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 01:12:30 UTC 2019

Modified Files:
src/sys/modules/compat_50 [pgoyette-compat]: Makefile

Log Message:
As far as I can tell, neither SCTP not NET_MPSAFE are enabled by default
on any architecture, so they should not be enabled by default in any of
the modules.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/sys/modules/compat_50/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_50/Makefile
diff -u src/sys/modules/compat_50/Makefile:1.1.2.12 src/sys/modules/compat_50/Makefile:1.1.2.13
--- src/sys/modules/compat_50/Makefile:1.1.2.12	Tue Jan 15 01:07:40 2019
+++ src/sys/modules/compat_50/Makefile	Tue Jan 15 01:12:30 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.12 2019/01/15 01:07:40 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.13 2019/01/15 01:12:30 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -13,7 +13,9 @@ SRCS+=	kern_50.c kern_time_50.c kern_sel
 SRCS+=	vfs_syscalls_50.c uipc_syscalls_50.c uvm_50.c
 SRCS+=	rndpseudo_50.c clockctl_50.c if_spppsubr50.c
 
-CPPFLAGS+=	-DINET -DINET6 -DSCTP -DNET_MPSAFE
+CPPFLAGS+=	-DINET -DINET6
+# XXX someday we'll need to add
+#CPPFLAGS+=	-DSCTP -DNET_MPSAFE
 
 SRCS+=	rtsock_50.c
 



CVS commit: [pgoyette-compat] src/sys/modules/compat_50

2019-01-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan 15 01:07:40 UTC 2019

Modified Files:
src/sys/modules/compat_50 [pgoyette-compat]: Makefile

Log Message:
Add some #defines for rtsock_50


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/sys/modules/compat_50/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_50/Makefile
diff -u src/sys/modules/compat_50/Makefile:1.1.2.11 src/sys/modules/compat_50/Makefile:1.1.2.12
--- src/sys/modules/compat_50/Makefile:1.1.2.11	Wed Oct  3 22:50:50 2018
+++ src/sys/modules/compat_50/Makefile	Tue Jan 15 01:07:40 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.11 2018/10/03 22:50:50 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.12 2019/01/15 01:07:40 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -12,6 +12,9 @@ SRCS+=	compat_50_mod.c
 SRCS+=	kern_50.c kern_time_50.c kern_select_50.c
 SRCS+=	vfs_syscalls_50.c uipc_syscalls_50.c uvm_50.c
 SRCS+=	rndpseudo_50.c clockctl_50.c if_spppsubr50.c
+
+CPPFLAGS+=	-DINET -DINET6 -DSCTP -DNET_MPSAFE
+
 SRCS+=	rtsock_50.c
 
 .PATH:	${S}/fs/puffs



CVS commit: [pgoyette-compat] src/doc

2019-01-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 14 13:35:53 UTC 2019

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Remove recently-added entry concerning routines whose return type
had been changed from void to int.  This is now handled by the new
void-typed hooks.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.20 src/doc/TODO.compat-module:1.1.2.21
--- src/doc/TODO.compat-module:1.1.2.20	Mon Jan 14 00:16:32 2019
+++ src/doc/TODO.compat-module	Mon Jan 14 13:35:53 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.20 2019/01/14 00:16:32 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.21 2019/01/14 13:35:53 pgoyette Exp $ */
 
 DONE
 
@@ -104,6 +104,3 @@ TODO - Not required for branch merge
 are included in every kernel via 'options COMPAT_UTILS' in file
 sys/conf/std
 
-22. Several hook callback routines have had their return type changed
-from "void" to "int" in order to provide a common type in the
-hook structure.  Ideally, I'd like to revert these back to "void".



CVS commit: [pgoyette-compat] src/sys

2019-01-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 14 13:34:28 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep.c
netbsd32_machdep_16.c
src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep.c
netbsd32_machdep_16.c
src/sys/arch/sparc/fpu [pgoyette-compat]: fpu.c
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep.c
netbsd32_machdep_16.c
src/sys/compat/common [pgoyette-compat]: if_43.c rtsock_14.c
rtsock_50.c rtsock_70.c sysmon_power_40.c uipc_usrreq_70.c
src/sys/compat/net [pgoyette-compat]: if.h route.h
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32.h
netbsd32_kern_proc.c netbsd32_module.c
src/sys/compat/sys [pgoyette-compat]: socket.h
src/sys/dev [pgoyette-compat]: bio.c ccd.c clockctl.c vnd.c
src/sys/dev/raidframe [pgoyette-compat]: rf_netbsdkintf.c
src/sys/dev/sysmon [pgoyette-compat]: sysmon_power.c
src/sys/dev/usb [pgoyette-compat]: ugen.c uhid.c usb.c
src/sys/dev/wscons [pgoyette-compat]: wsevent.c
src/sys/fs/puffs [pgoyette-compat]: puffs_compat.c puffs_msgif.c
puffs_sys.h
src/sys/kern [pgoyette-compat]: kern_proc.c kern_rndq.c sys_module.c
sysv_ipc.c tty.c tty_ptm.c uipc_usrreq.c vfs_syscalls.c
src/sys/net [pgoyette-compat]: if.c if_spppsubr.c route.h rtsock.c
src/sys/net80211 [pgoyette-compat]: ieee80211_ioctl.c
src/sys/opencrypto [pgoyette-compat]: cryptodev.c
src/sys/sys [pgoyette-compat]: compat_stub.h module_hook.h

Log Message:
Create a variant of the HOOK macros that handles hook routines of
type void, and use them where appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.115.2.13 -r1.115.2.14 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 \
src/sys/arch/amd64/amd64/netbsd32_machdep_16.c
cvs rdiff -u -r1.15.2.9 -r1.15.2.10 src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/mips/netbsd32_machdep_16.c
cvs rdiff -u -r1.27.46.2 -r1.27.46.3 src/sys/arch/sparc/fpu/fpu.c
cvs rdiff -u -r1.110.14.2 -r1.110.14.3 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c
cvs rdiff -u -r1.14.2.11 -r1.14.2.12 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.5.14.5 -r1.5.14.6 src/sys/compat/common/rtsock_14.c
cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/sys/compat/common/rtsock_50.c
cvs rdiff -u -r1.2.2.3 -r1.2.2.4 src/sys/compat/common/rtsock_70.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/sysmon_power_40.c
cvs rdiff -u -r1.1.20.3 -r1.1.20.4 src/sys/compat/common/uipc_usrreq_70.c
cvs rdiff -u -r1.4.14.2 -r1.4.14.3 src/sys/compat/net/if.h
cvs rdiff -u -r1.2.14.2 -r1.2.14.3 src/sys/compat/net/route.h
cvs rdiff -u -r1.116.2.16 -r1.116.2.17 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/netbsd32/netbsd32_kern_proc.c
cvs rdiff -u -r1.6.2.10 -r1.6.2.11 src/sys/compat/netbsd32/netbsd32_module.c
cvs rdiff -u -r1.15.2.2 -r1.15.2.3 src/sys/compat/sys/socket.h
cvs rdiff -u -r1.13.16.6 -r1.13.16.7 src/sys/dev/bio.c
cvs rdiff -u -r1.175.2.9 -r1.175.2.10 src/sys/dev/ccd.c
cvs rdiff -u -r1.35.14.9 -r1.35.14.10 src/sys/dev/clockctl.c
cvs rdiff -u -r1.263.2.11 -r1.263.2.12 src/sys/dev/vnd.c
cvs rdiff -u -r1.356.2.7 -r1.356.2.8 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.58.2.6 -r1.58.2.7 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.139.2.7 -r1.139.2.8 src/sys/dev/usb/ugen.c
cvs rdiff -u -r1.101.2.6 -r1.101.2.7 src/sys/dev/usb/uhid.c
cvs rdiff -u -r1.168.2.8 -r1.168.2.9 src/sys/dev/usb/usb.c
cvs rdiff -u -r1.37.2.7 -r1.37.2.8 src/sys/dev/wscons/wsevent.c
cvs rdiff -u -r1.4.16.4 -r1.4.16.5 src/sys/fs/puffs/puffs_compat.c
cvs rdiff -u -r1.101.10.7 -r1.101.10.8 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -u -r1.90.16.2 -r1.90.16.3 src/sys/fs/puffs/puffs_sys.h
cvs rdiff -u -r1.209.2.11 -r1.209.2.12 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.89.16.5 -r1.89.16.6 src/sys/kern/kern_rndq.c
cvs rdiff -u -r1.23.2.14 -r1.23.2.15 src/sys/kern/sys_module.c
cvs rdiff -u -r1.32.16.7 -r1.32.16.8 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.275.2.6 -r1.275.2.7 src/sys/kern/tty.c
cvs rdiff -u -r1.37.16.3 -r1.37.16.4 src/sys/kern/tty_ptm.c
cvs rdiff -u -r1.183.2.7 -r1.183.2.8 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.518.2.3 -r1.518.2.4 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.419.2.19 -r1.419.2.20 src/sys/net/if.c
cvs rdiff -u -r1.179.2.8 -r1.179.2.9 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.117.2.4 -r1.117.2.5 src/sys/net/route.h
cvs rdiff -u -r1.238.2.18 -r1.238.2.19 src/sys/net/rtsock.c
cvs rdiff -u -r1.60.16.5 -r1.60.16.6 src/sys/net80211/ieee80211_ioctl.c
cvs rdiff -u -r1.98.2.8 -r1.98.2.9 src/sys/opencrypto/cryptodev.c
cvs rdiff -u -r1.1.2.47 -r1.1.2.48 src/sys/sys/compat_stub.h
cvs rdiff 

CVS commit: [pgoyette-compat] src/doc

2019-01-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 14 00:16:32 UTC 2019

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Note the desire to return some callback functions to having a void
type, rather than int (changing them was necessary to use a common
return type for all callbacks).


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.19 src/doc/TODO.compat-module:1.1.2.20
--- src/doc/TODO.compat-module:1.1.2.19	Sun Jan 13 23:33:07 2019
+++ src/doc/TODO.compat-module	Mon Jan 14 00:16:32 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.19 2019/01/13 23:33:07 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.20 2019/01/14 00:16:32 pgoyette Exp $ */
 
 DONE
 
@@ -103,3 +103,7 @@ TODO - Not required for branch merge
 deal with them appropriately.  For now, we simply ensure that they
 are included in every kernel via 'options COMPAT_UTILS' in file
 sys/conf/std
+
+22. Several hook callback routines have had their return type changed
+from "void" to "int" in order to provide a common type in the
+hook structure.  Ideally, I'd like to revert these back to "void".



CVS commit: [pgoyette-compat] src/doc

2019-01-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan 13 23:33:07 UTC 2019

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Note that rtsock_50 is now functional, even though the implementation
remains sub-optimal.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.18 src/doc/TODO.compat-module:1.1.2.19
--- src/doc/TODO.compat-module:1.1.2.18	Fri Oct 12 04:12:06 2018
+++ src/doc/TODO.compat-module	Sun Jan 13 23:33:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.18 2018/10/12 04:12:06 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.19 2019/01/13 23:33:07 pgoyette Exp $ */
 
 DONE
 
@@ -55,22 +55,19 @@ DONE
 framework, and split version-specific code from baseline code as
 needed.
 
+16. While the rtsock_50 situation is still a disaster (rtsock_50.c
+#include-s the main rtsock.c code with various COMPAT_50-dependant
+macro definitions and redefinitions), the basic functionality
+works, and the compat_14 references to rtsock_50 routines seems to
+be correct.  The rtsock_50.c stuff should still be rewritten at
+some future time, but it's not urgent.
+
 TODO - Not required for branch merge
 
-16. Audit the entire code base for any remaining embedded #ifdef's for
+17. Audit the entire code base for any remaining embedded #ifdef's for
 COMPAT_xx.  When found, move the actual compat code into the compat
 hierarchy and replace originals with indirect (vectored) calls.
 
-17. The rtsock compat code is a disaster, with rtsock_50.c #include-ing
-the main rtsock.c code with various manipulations of the COMPAT_50
-macro.  Once rtsock is separated, compat_14 references to rtsock_50
-routines needs to be verified.
-
-Currently, this entire code is built for the monolithic COMPAT
-module, but there's no way to reach the entry points, so none of
-the compat code can be executed, neither on the branch nor on
-HEAD.
-
 18. The compat_60 module still needs some work for XEN systems.  We
 probably need some build infrastructure changes to ensure that
 XEN (and, for i386, XEN-PAE) modules are build with the correct



CVS commit: [pgoyette-compat] src/sys

2019-01-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan 13 23:32:22 UTC 2019

Modified Files:
src/sys/compat/common [pgoyette-compat]: rtsock_50.c
src/sys/compat/net [pgoyette-compat]: if.h route.h
src/sys/kern [pgoyette-compat]: compat_stub.c
src/sys/net [pgoyette-compat]: route.h rtsock.c
src/sys/sys [pgoyette-compat]: compat_stub.h

Log Message:
Add the required hooks for rtsock_50 and modify the COMPATCALL() macro
to use the hooks.  While the rtsock_50 situation is still sub-optimal
(it includes the main rtsock.c with a whole bunch of function and
variable redefinitions via macros), this at least makes it possible to
load the rtsock_50 code separately from more recent code, rather than
the previous requirement that rtsock_50 be built-in.


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/sys/compat/common/rtsock_50.c
cvs rdiff -u -r1.4.14.1 -r1.4.14.2 src/sys/compat/net/if.h
cvs rdiff -u -r1.2.14.1 -r1.2.14.2 src/sys/compat/net/route.h
cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.117.2.3 -r1.117.2.4 src/sys/net/route.h
cvs rdiff -u -r1.238.2.17 -r1.238.2.18 src/sys/net/rtsock.c
cvs rdiff -u -r1.1.2.46 -r1.1.2.47 src/sys/sys/compat_stub.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/compat/common/rtsock_50.c
diff -u src/sys/compat/common/rtsock_50.c:1.6.2.2 src/sys/compat/common/rtsock_50.c:1.6.2.3
--- src/sys/compat/common/rtsock_50.c:1.6.2.2	Fri Jan 11 06:27:45 2019
+++ src/sys/compat/common/rtsock_50.c	Sun Jan 13 23:32:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_50.c,v 1.6.2.2 2019/01/11 06:27:45 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_50.c,v 1.6.2.3 2019/01/13 23:32:21 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.6.2.2 2019/01/11 06:27:45 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.6.2.3 2019/01/13 23:32:21 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -80,7 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,
 #include 
 #include 
 
-void
+int
 compat_50_rt_oifmsg(struct ifnet *ifp)
 {
 	struct if_msghdr50 oifm;
@@ -88,7 +88,7 @@ compat_50_rt_oifmsg(struct ifnet *ifp)
 	struct rt_addrinfo info;
 
 	if (COMPATNAME(route_info).ri_cb.any_count == 0)
-		return;
+		return 0;
 	(void)memset(, 0, sizeof(info));
 	(void)memset(, 0, sizeof(oifm));
 	oifm.ifm_index = ifp->if_index;
@@ -116,8 +116,10 @@ compat_50_rt_oifmsg(struct ifnet *ifp)
 	oifm.ifm_addrs = 0;
 	m = COMPATNAME(rt_msg1)(RTM_OIFINFO, , (void *), sizeof(oifm));
 	if (m == NULL)
-		return;
+		return 0;
 	COMPATNAME(route_enqueue)(m, 0);
+
+	return 0;
 }
 
 int
@@ -158,19 +160,52 @@ compat_50_iflist(struct ifnet *ifp, stru
 	return 0;
 }
 
-MODULE_SET_HOOK(rtsock_50_hook, "rts_50", compat_50_iflist);
-MODULE_UNSET_HOOK(rtsock_50_hook); 
- 
+MODULE_SET_HOOK(rtsock_50_iflist_hook, "rts_50", compat_50_iflist);
+MODULE_UNSET_HOOK(rtsock_50_iflist_hook); 
+
+MODULE_SET_HOOK(rtsock_50_oifmsg_hook, "rts_50", compat_50_rt_oifmsg);
+MODULE_UNSET_HOOK(rtsock_50_oifmsg_hook); 
+
+MODULE_SET_HOOK(rtsock_50_rt_missmsg_hook, "rts_50", compat_50_rt_missmsg);
+MODULE_UNSET_HOOK(rtsock_50_rt_missmsg_hook); 
+
+MODULE_SET_HOOK(rtsock_50_rt_ifmsg_hook, "rts_50", compat_50_rt_ifmsg);
+MODULE_UNSET_HOOK(rtsock_50_rt_ifmsg_hook); 
+
+MODULE_SET_HOOK(rtsock_50_rt_newaddrmsg_hook, "rts_50",
+compat_50_rt_newaddrmsg);
+MODULE_UNSET_HOOK(rtsock_50_rt_newaddrmsg_hook); 
+
+MODULE_SET_HOOK(rtsock_50_rt_ifannouncemsg_hook, "rts_50",
+compat_50_rt_ifannouncemsg);
+MODULE_UNSET_HOOK(rtsock_50_rt_ifannouncemsg_hook); 
+
+MODULE_SET_HOOK(rtsock_50_rt_ieee80211msg_hook, "rts_50",
+compat_50_rt_ieee80211msg);
+MODULE_UNSET_HOOK(rtsock_50_rt_ieee80211msg_hook); 
+
 void
 rtsock_50_init(void)
 {
  
-	rtsock_50_hook_set();
+	rtsock_50_iflist_hook_set();
+	rtsock_50_oifmsg_hook_set();
+	rtsock_50_rt_missmsg_hook_set();
+	rtsock_50_rt_ifmsg_hook_set();
+	rtsock_50_rt_newaddrmsg_hook_set();
+	rtsock_50_rt_ifannouncemsg_hook_set();
+	rtsock_50_rt_ieee80211msg_hook_set();
 }
  
 void
 rtsock_50_fini(void)
 {  
 
-	rtsock_50_hook_unset();
+	rtsock_50_iflist_hook_unset();
+	rtsock_50_oifmsg_hook_unset();
+	rtsock_50_rt_missmsg_hook_unset();
+	rtsock_50_rt_ifmsg_hook_unset();
+	rtsock_50_rt_newaddrmsg_hook_unset();
+	rtsock_50_rt_ifannouncemsg_hook_unset();
+	rtsock_50_rt_ieee80211msg_hook_unset();
 }

Index: src/sys/compat/net/if.h
diff -u src/sys/compat/net/if.h:1.4.14.1 src/sys/compat/net/if.h:1.4.14.2
--- src/sys/compat/net/if.h:1.4.14.1	Mon Sep 17 11:04:30 2018
+++ src/sys/compat/net/if.h	Sun Jan 13 23:32:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.4.14.1 2018/09/17 11:04:30 pgoyette Exp $	*/
+/*	$NetBSD: if.h,v 1.4.14.2 2019/01/13 23:32:21 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The 

CVS commit: [pgoyette-compat] src/sys

2019-01-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan 13 10:49:51 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep.c
src/sys/arch/sparc/fpu [pgoyette-compat]: fpu.c
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep.c
src/sys/compat/common [pgoyette-compat]: if_43.c rtsock_14.c
rtsock_70.c tty_60.c usb_subr_30.c
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_kern_proc.c
netbsd32_module.c
src/sys/dev [pgoyette-compat]: bio.c ccd.c clockctl.c vnd.c
src/sys/dev/raidframe [pgoyette-compat]: rf_netbsdkintf.c
src/sys/dev/sysmon [pgoyette-compat]: sysmon_power.c
src/sys/dev/usb [pgoyette-compat]: ugen.c uhid.c usb.c
src/sys/dev/wscons [pgoyette-compat]: wsevent.c
src/sys/fs/puffs [pgoyette-compat]: puffs_compat.c puffs_msgif.c
src/sys/kern [pgoyette-compat]: compat_stub.c kern_proc.c kern_rndq.c
sys_module.c sysv_ipc.c tty.c tty_ptm.c uipc_usrreq.c
vfs_syscalls.c
src/sys/net [pgoyette-compat]: if.c if_spppsubr.c rtsock.c
src/sys/net80211 [pgoyette-compat]: ieee80211_ioctl.c
src/sys/opencrypto [pgoyette-compat]: cryptodev.c
src/sys/sys [pgoyette-compat]: compat_stub.h module_hook.h

Log Message:
Remove the HOOK2 versions of the MODULE_HOOK macros.  There were
only a few uses, and using them led to some lack of clarity in the
code.  Instead, we now use two separate hooks, with names that
make it clear(er) what we're doing.

This also positions us to start unraveling some of the rtsock_50
mess, which will need (at least) five hooks.


To generate a diff of this commit:
cvs rdiff -u -r1.115.2.12 -r1.115.2.13 \
src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.15.2.8 -r1.15.2.9 src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.27.46.1 -r1.27.46.2 src/sys/arch/sparc/fpu/fpu.c
cvs rdiff -u -r1.110.14.1 -r1.110.14.2 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.14.2.10 -r1.14.2.11 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.5.14.4 -r1.5.14.5 src/sys/compat/common/rtsock_14.c
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/compat/common/rtsock_70.c
cvs rdiff -u -r1.4.16.5 -r1.4.16.6 src/sys/compat/common/tty_60.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/common/usb_subr_30.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/netbsd32/netbsd32_kern_proc.c
cvs rdiff -u -r1.6.2.9 -r1.6.2.10 src/sys/compat/netbsd32/netbsd32_module.c
cvs rdiff -u -r1.13.16.5 -r1.13.16.6 src/sys/dev/bio.c
cvs rdiff -u -r1.175.2.8 -r1.175.2.9 src/sys/dev/ccd.c
cvs rdiff -u -r1.35.14.8 -r1.35.14.9 src/sys/dev/clockctl.c
cvs rdiff -u -r1.263.2.10 -r1.263.2.11 src/sys/dev/vnd.c
cvs rdiff -u -r1.356.2.6 -r1.356.2.7 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.58.2.5 -r1.58.2.6 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.139.2.6 -r1.139.2.7 src/sys/dev/usb/ugen.c
cvs rdiff -u -r1.101.2.5 -r1.101.2.6 src/sys/dev/usb/uhid.c
cvs rdiff -u -r1.168.2.7 -r1.168.2.8 src/sys/dev/usb/usb.c
cvs rdiff -u -r1.37.2.6 -r1.37.2.7 src/sys/dev/wscons/wsevent.c
cvs rdiff -u -r1.4.16.3 -r1.4.16.4 src/sys/fs/puffs/puffs_compat.c
cvs rdiff -u -r1.101.10.6 -r1.101.10.7 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.209.2.10 -r1.209.2.11 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.89.16.4 -r1.89.16.5 src/sys/kern/kern_rndq.c
cvs rdiff -u -r1.23.2.13 -r1.23.2.14 src/sys/kern/sys_module.c
cvs rdiff -u -r1.32.16.6 -r1.32.16.7 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.275.2.5 -r1.275.2.6 src/sys/kern/tty.c
cvs rdiff -u -r1.37.16.2 -r1.37.16.3 src/sys/kern/tty_ptm.c
cvs rdiff -u -r1.183.2.6 -r1.183.2.7 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.518.2.2 -r1.518.2.3 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.419.2.18 -r1.419.2.19 src/sys/net/if.c
cvs rdiff -u -r1.179.2.7 -r1.179.2.8 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.238.2.16 -r1.238.2.17 src/sys/net/rtsock.c
cvs rdiff -u -r1.60.16.4 -r1.60.16.5 src/sys/net80211/ieee80211_ioctl.c
cvs rdiff -u -r1.98.2.7 -r1.98.2.8 src/sys/opencrypto/cryptodev.c
cvs rdiff -u -r1.1.2.45 -r1.1.2.46 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/sys/module_hook.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/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.12 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.13
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.12	Wed Dec 26 14:01:31 2018
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Sun Jan 13 10:49:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.12 2018/12/26 14:01:31 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.115.2.13 2019/01/13 10:49:49 pgoyette Exp $	

CVS commit: [pgoyette-compat] src/sys/net

2019-01-12 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan 13 07:05:10 UTC 2019

Modified Files:
src/sys/net [pgoyette-compat]: rtsock.c

Log Message:
Rearrange a bit, put all the sysctl-related stuff at the end of the
file, and enclose it in a single ``#ifdef COMPAT_RTSOCK ... #endif''
block.

XXX Arguably, this code might better belong in its own source file,
but I'll leave that for a future project.


To generate a diff of this commit:
cvs rdiff -u -r1.238.2.15 -r1.238.2.16 src/sys/net/rtsock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/rtsock.c
diff -u src/sys/net/rtsock.c:1.238.2.15 src/sys/net/rtsock.c:1.238.2.16
--- src/sys/net/rtsock.c:1.238.2.15	Fri Jan 11 07:55:53 2019
+++ src/sys/net/rtsock.c	Sun Jan 13 07:05:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.238.2.15 2019/01/11 07:55:53 pgoyette Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.238.2.16 2019/01/13 07:05:10 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.15 2019/01/11 07:55:53 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.16 2019/01/13 07:05:10 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1697,8 +1697,147 @@ rt_clonedmsg(const struct sockaddr *dst,
 #undef RTF_LLINFO
 #undef RTF_CLONED
 }
+#endif	/* COMPAT_RTSOCK */
 
 /*
+ * Routing message software interrupt routine
+ */
+static void
+COMPATNAME(route_intr)(void *cookie)
+{
+	struct sockproto proto = { .sp_family = PF_XROUTE, };
+	struct route_info * const ri = (route_info);
+	struct mbuf *m;
+
+	SOFTNET_KERNEL_LOCK_UNLESS_NET_MPSAFE();
+	for (;;) {
+		IFQ_LOCK(>ri_intrq);
+		IF_DEQUEUE(>ri_intrq, m);
+		IFQ_UNLOCK(>ri_intrq);
+		if (m == NULL)
+			break;
+		proto.sp_protocol = M_GETCTX(m, uintptr_t);
+#ifdef NET_MPSAFE
+		mutex_enter(rt_so_mtx);
+#endif
+		raw_input(m, , >ri_src, >ri_dst, _rawcb);
+#ifdef NET_MPSAFE
+		mutex_exit(rt_so_mtx);
+#endif
+	}
+	SOFTNET_KERNEL_UNLOCK_UNLESS_NET_MPSAFE();
+}
+
+/*
+ * Enqueue a message to the software interrupt routine.
+ */
+void
+COMPATNAME(route_enqueue)(struct mbuf *m, int family)
+{
+	struct route_info * const ri = (route_info);
+	int wasempty;
+
+	IFQ_LOCK(>ri_intrq);
+	if (IF_QFULL(>ri_intrq)) {
+		printf("%s: queue full, dropped message\n", __func__);
+		IF_DROP(>ri_intrq);
+		IFQ_UNLOCK(>ri_intrq);
+		m_freem(m);
+	} else {
+		wasempty = IF_IS_EMPTY(>ri_intrq);
+		M_SETCTX(m, (uintptr_t)family);
+		IF_ENQUEUE(>ri_intrq, m);
+		IFQ_UNLOCK(>ri_intrq);
+		if (wasempty) {
+			kpreempt_disable();
+			softint_schedule(ri->ri_sih);
+			kpreempt_enable();
+		}
+	}
+}
+
+static void
+COMPATNAME(route_init)(void)
+{
+	struct route_info * const ri = (route_info);
+
+#ifndef COMPAT_RTSOCK
+	rt_init();
+#endif
+#ifdef NET_MPSAFE
+	rt_so_mtx = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
+
+	cv_init(_update_cv, "rtsock_cv");
+#endif
+
+#ifndef COMPAT_RTSOCK
+	sysctl_net_route_setup(NULL);
+#endif
+	ri->ri_intrq.ifq_maxlen = ri->ri_maxqlen;
+	ri->ri_sih = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
+	COMPATNAME(route_intr), NULL);
+	IFQ_LOCK_INIT(>ri_intrq);
+}
+
+/*
+ * Definitions of protocols supported in the ROUTE domain.
+ */
+#ifndef COMPAT_RTSOCK
+PR_WRAP_USRREQS(route);
+#else
+PR_WRAP_USRREQS(compat_50_route);
+#endif
+
+static const struct pr_usrreqs route_usrreqs = {
+	.pr_attach	= COMPATNAME(route_attach_wrapper),
+	.pr_detach	= COMPATNAME(route_detach_wrapper),
+	.pr_accept	= COMPATNAME(route_accept_wrapper),
+	.pr_bind	= COMPATNAME(route_bind_wrapper),
+	.pr_listen	= COMPATNAME(route_listen_wrapper),
+	.pr_connect	= COMPATNAME(route_connect_wrapper),
+	.pr_connect2	= COMPATNAME(route_connect2_wrapper),
+	.pr_disconnect	= COMPATNAME(route_disconnect_wrapper),
+	.pr_shutdown	= COMPATNAME(route_shutdown_wrapper),
+	.pr_abort	= COMPATNAME(route_abort_wrapper),
+	.pr_ioctl	= COMPATNAME(route_ioctl_wrapper),
+	.pr_stat	= COMPATNAME(route_stat_wrapper),
+	.pr_peeraddr	= COMPATNAME(route_peeraddr_wrapper),
+	.pr_sockaddr	= COMPATNAME(route_sockaddr_wrapper),
+	.pr_rcvd	= COMPATNAME(route_rcvd_wrapper),
+	.pr_recvoob	= COMPATNAME(route_recvoob_wrapper),
+	.pr_send	= COMPATNAME(route_send_wrapper),
+	.pr_sendoob	= COMPATNAME(route_sendoob_wrapper),
+	.pr_purgeif	= COMPATNAME(route_purgeif_wrapper),
+};
+
+static const struct protosw COMPATNAME(route_protosw)[] = {
+	{
+		.pr_type = SOCK_RAW,
+		.pr_domain = (routedomain),
+		.pr_flags = PR_ATOMIC|PR_ADDR,
+		.pr_ctlinput = raw_ctlinput,
+		.pr_ctloutput = route_ctloutput,
+		.pr_usrreqs = _usrreqs,
+		.pr_init = rt_pr_init,
+	},
+};
+
+struct domain COMPATNAME(routedomain) = {
+	.dom_family = PF_XROUTE,
+	.dom_name = DOMAINNAME,
+	.dom_init = COMPATNAME(route_init),
+	.dom_protosw = COMPATNAME(route_protosw),
+	.dom_protoswNPROTOSW =
+	(route_protosw)[__arraycount(COMPATNAME(route_protosw))],
+};
+
+/*
+ * The 

CVS commit: [pgoyette-compat] src/sys/net

2019-01-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 11 07:55:53 UTC 2019

Modified Files:
src/sys/net [pgoyette-compat]: rtsock.c

Log Message:
Don't accept OIFLIST operation unless the rtsock_70_hook is loaded,
even though the results are otherwise identical to those on current.


To generate a diff of this commit:
cvs rdiff -u -r1.238.2.14 -r1.238.2.15 src/sys/net/rtsock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/rtsock.c
diff -u src/sys/net/rtsock.c:1.238.2.14 src/sys/net/rtsock.c:1.238.2.15
--- src/sys/net/rtsock.c:1.238.2.14	Fri Jan 11 06:27:45 2019
+++ src/sys/net/rtsock.c	Fri Jan 11 07:55:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.238.2.14 2019/01/11 06:27:45 pgoyette Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.238.2.15 2019/01/11 07:55:53 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.14 2019/01/11 06:27:45 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.15 2019/01/11 07:55:53 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1839,8 +1839,13 @@ sysctl_iflist(int af, struct rt_walkarg 
 		info.rti_info[RTAX_IFP] = NULL;
 		if (w->w_where && w->w_tmem && w->w_needed <= 0) {
 			switch (type) {
-			case NET_RT_IFLIST: /* current */
 			case NET_RT_OIFLIST: /* old _70 */
+if (rtsock_70_hook.f1 == NULL) {
+	error = EINVAL;
+	break;
+}
+/* FALLTHROUGH */
+			case NET_RT_IFLIST: /* current */
 error = sysctl_iflist_if(ifp, w, , len);
 break;
 			case NET_RT_OOIFLIST: /* old _50 */



CVS commit: [pgoyette-compat] src/sys

2019-01-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 11 06:27:45 UTC 2019

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_50_mod.c compat_mod.h
rtsock_50.c
src/sys/kern [pgoyette-compat]: compat_stub.c
src/sys/net [pgoyette-compat]: rtsock.c
src/sys/sys [pgoyette-compat]: compat_stub.h
Added Files:
src/sys/compat/net [pgoyette-compat]: route_50.h

Log Message:
Rework the various sysctl-related routines to call the correct code
for each version.  While here, extract the 5.0 specific code instead
of including in the main rtsock.c code.

Also, clean up all the sysctl-related routines to prevent building
more than one copy, no matter how many places rtsock.c gets #include'd
into!


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/sys/compat/common/compat_50_mod.c
cvs rdiff -u -r1.1.42.23 -r1.1.42.24 src/sys/compat/common/compat_mod.h
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 src/sys/compat/common/rtsock_50.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/net/route_50.h
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.238.2.13 -r1.238.2.14 src/sys/net/rtsock.c
cvs rdiff -u -r1.1.2.44 -r1.1.2.45 src/sys/sys/compat_stub.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/compat/common/compat_50_mod.c
diff -u src/sys/compat/common/compat_50_mod.c:1.1.2.17 src/sys/compat/common/compat_50_mod.c:1.1.2.18
--- src/sys/compat/common/compat_50_mod.c:1.1.2.17	Fri Oct 12 22:30:54 2018
+++ src/sys/compat/common/compat_50_mod.c	Fri Jan 11 06:27:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_50_mod.c,v 1.1.2.17 2018/10/12 22:30:54 pgoyette Exp $	*/
+/*	$NetBSD: compat_50_mod.c,v 1.1.2.18 2019/01/11 06:27:45 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.17 2018/10/12 22:30:54 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.18 2019/01/11 06:27:45 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -86,6 +86,7 @@ compat_50_init(void)
 	wsevent_50_init();
 	vnd_50_init();
 	rndpseudo_50_init();
+	rtsock_50_init();
 
 	return error;
 
@@ -106,6 +107,7 @@ compat_50_fini(void)
 {
 	int error = 0;
 
+	rtsock_50_fini();
 	rndpseudo_50_fini();
 	vnd_50_fini();
 	wsevent_50_fini();
@@ -149,6 +151,7 @@ compat_50_fini(void)
 	wsevent_50_init();
 	vnd_50_init();
 	rndpseudo_50_init();
+	rtsock_50_init();
 
 	return error;
 }

Index: src/sys/compat/common/compat_mod.h
diff -u src/sys/compat/common/compat_mod.h:1.1.42.23 src/sys/compat/common/compat_mod.h:1.1.42.24
--- src/sys/compat/common/compat_mod.h:1.1.42.23	Fri Oct 12 22:30:54 2018
+++ src/sys/compat/common/compat_mod.h	Fri Jan 11 06:27:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.h,v 1.1.42.23 2018/10/12 22:30:54 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.h,v 1.1.42.24 2019/01/11 06:27:45 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -74,6 +74,8 @@ void vnd_50_init(void);
 void vnd_50_fini(void);
 void rndpseudo_50_init(void);
 void rndpseudo_50_fini(void);
+void rtsock_50_init(void);
+void rtsock_50_fini(void);
 #endif
 
 #ifdef COMPAT_40

Index: src/sys/compat/common/rtsock_50.c
diff -u src/sys/compat/common/rtsock_50.c:1.6.2.1 src/sys/compat/common/rtsock_50.c:1.6.2.2
--- src/sys/compat/common/rtsock_50.c:1.6.2.1	Mon May 21 04:36:03 2018
+++ src/sys/compat/common/rtsock_50.c	Fri Jan 11 06:27:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_50.c,v 1.6.2.1 2018/05/21 04:36:03 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_50.c,v 1.6.2.2 2019/01/11 06:27:45 pgoyette Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.6.2.1 2018/05/21 04:36:03 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.6.2.2 2019/01/11 06:27:45 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -78,6 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,
 #define	COMPAT_RTSOCK
 
 #include 
+#include 
 
 void
 compat_50_rt_oifmsg(struct ifnet *ifp)
@@ -156,3 +157,20 @@ compat_50_iflist(struct ifnet *ifp, stru
 	w->w_where = (char *)w->w_where + len;
 	return 0;
 }
+
+MODULE_SET_HOOK(rtsock_50_hook, "rts_50", compat_50_iflist);
+MODULE_UNSET_HOOK(rtsock_50_hook); 
+ 
+void
+rtsock_50_init(void)
+{
+ 
+	rtsock_50_hook_set();
+}
+ 
+void
+rtsock_50_fini(void)
+{  
+
+	rtsock_50_hook_unset();
+}

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.1.2.32 src/sys/kern/compat_stub.c:1.1.2.33
--- src/sys/kern/compat_stub.c:1.1.2.32	Mon Oct 15 22:06:16 2018
+++ src/sys/kern/compat_stub.c	Fri Jan 11 06:27:45 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.1.2.32 2018/10/15 22:06:16 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.1.2.33 2019/01/11 06:27:45 

CVS commit: [pgoyette-compat] src/sys/sys

2019-01-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan 11 06:18:17 UTC 2019

Modified Files:
src/sys/sys [pgoyette-compat]: module_hook.h

Log Message:
Separate macro arguments with  for readability.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/sys/module_hook.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/sys/module_hook.h
diff -u src/sys/sys/module_hook.h:1.1.2.7 src/sys/sys/module_hook.h:1.1.2.8
--- src/sys/sys/module_hook.h:1.1.2.7	Fri Oct 12 10:28:29 2018
+++ src/sys/sys/module_hook.h	Fri Jan 11 06:18:17 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: module_hook.h,v 1.1.2.7 2018/10/12 10:28:29 pgoyette Exp $	*/
+/* $NetBSD: module_hook.h,v 1.1.2.8 2019/01/11 06:18:17 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  * unloaded.
  */
 
-#define MODULE_HOOK(hook,args)	\
+#define MODULE_HOOK(hook, args)	\
 extern struct hook ## _t {	\
 	kmutex_t		mtx;\
 	kcondvar_t		cv;\
@@ -55,7 +55,7 @@ extern struct hook ## _t {	\
 	int			(*f)args;			\
 } hook __cacheline_aligned;
 
-#define MODULE_HOOK2(hook,args1,args2)\
+#define MODULE_HOOK2(hook, args1, args2)			\
 extern struct hook ## _t {	\
 	kmutex_t		mtx;\
 	kcondvar_t		cv;\



CVS commit: [pgoyette-compat] src/tests/lib/libc/net/getaddrinfo

2019-01-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 10 11:15:49 UTC 2019

Modified Files:
src/tests/lib/libc/net/getaddrinfo [pgoyette-compat]: t_getaddrinfo.sh

Log Message:
Import fix from HEAD.

Now that the test behaves normally under failure (mismatched actual vs
expected outputs), maybe I can figure out why it actually fails.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.40.1 \
src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh
diff -u src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh:1.2 src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh:1.2.40.1
--- src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh:1.2	Wed Jun 15 07:54:32 2011
+++ src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh	Thu Jan 10 11:15:49 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: t_getaddrinfo.sh,v 1.2 2011/06/15 07:54:32 jmmv Exp $
+#	$NetBSD: t_getaddrinfo.sh,v 1.2.40.1 2019/01/10 11:15:49 pgoyette Exp $
 
 #
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, and 2002 WIDE Project.
@@ -55,7 +55,7 @@ check_output()
 	fi
 
 	cmp  -s $(atf_get_srcdir)/data/${exp} out && return
-	diff -u $(atf_get_srcdir)/data/${exp} out && \
+	diff -u $(atf_get_srcdir)/data/${exp} out
 	atf_fail "Actual output does not match expected output"
 }
 



CVS commit: [pgoyette-compat] src/sys/modules/compat_netbsd32

2019-01-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 10 03:44:20 UTC 2019

Modified Files:
src/sys/modules/compat_netbsd32 [pgoyette-compat]: Makefile

Log Message:
Include newly-created files in compat_netbsd32 module build.  Missed
this when resolving conflicts in most recent sync-with-HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.20.12.16 -r1.20.12.17 \
src/sys/modules/compat_netbsd32/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_netbsd32/Makefile
diff -u src/sys/modules/compat_netbsd32/Makefile:1.20.12.16 src/sys/modules/compat_netbsd32/Makefile:1.20.12.17
--- src/sys/modules/compat_netbsd32/Makefile:1.20.12.16	Mon Nov 26 12:25:19 2018
+++ src/sys/modules/compat_netbsd32/Makefile	Thu Jan 10 03:44:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20.12.16 2018/11/26 12:25:19 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.20.12.17 2019/01/10 03:44:20 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -25,18 +25,19 @@ CPPFLAGS+=	-DKTRACE -DMODULAR
 CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
 .PATH:	${S}/compat/netbsd32
-SRCS+=	netbsd32_core.c netbsd32_event.c
-SRCS+=	netbsd32_exec_elf32.c
-SRCS+=	netbsd32_execve.c netbsd32_fs.c
-SRCS+=	netbsd32_ioctl.c
-SRCS+=	netbsd32_kern_proc.c
-SRCS+=	netbsd32_lwp.c netbsd32_netbsd.c
-SRCS+=	netbsd32_select.c
-SRCS+=	netbsd32_sem.c netbsd32_signal.c
-SRCS+=	netbsd32_socket.c netbsd32_syscalls.c
-SRCS+=	netbsd32_sysctl.c netbsd32_sysent.c
-SRCS+=	netbsd32_time.c netbsd32_wait.c
-SRCS+=	netbsd32_mod.c netbsd32_module.c
+SRCS+=	netbsd32_core.c		netbsd32_event.c
+SRCS+=	netbsd32_exec_elf32.c	netbsd32_execve.c
+SRCS+=	netbsd32_fd.c		netbsd32_fs.c
+SRCS+=	netbsd32_ioctl.c	netbsd32_kern_proc.c
+SRCS+=	netbsd32_lwp.c		netbsd32_mod.c
+SRCS+=	netbsd32_netbsd.c	netbsd32_quota.c
+SRCS+=	netbsd32_rlimit.c	netbsd32_select.c
+SRCS+=	netbsd32_sem.c		netbsd32_signal.c
+SRCS+=	netbsd32_socket.c	netbsd32_syscalls.c
+SRCS+=	netbsd32_sysctl.c	netbsd32_sysent.c
+SRCS+=	netbsd32_time.c		netbsd32_wait.c	
+SRCS+=	netbsd32_vm.c
+SRCS+=	netbsd32_module.c
 
 .if ${MACHINE_CPU} != "mips" && ${MACHINE_CPU} != "powerpc"
 CPPFLAGS+=	-DEXEC_AOUT -DCOMPAT_NOMID



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2019-01-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan  9 10:38:22 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_syscall.h
netbsd32_syscallargs.h netbsd32_syscalls.c
netbsd32_syscalls_autoload.c netbsd32_sysent.c
netbsd32_systrace_args.c

Log Message:
Regen - otherwise compat_40_mount() is wrongly included in sysent.c

Missed this during earlier conflict resolution.


To generate a diff of this commit:
cvs rdiff -u -r1.134.2.17 -r1.134.2.18 \
src/sys/compat/netbsd32/netbsd32_syscall.h
cvs rdiff -u -r1.134.2.16 -r1.134.2.17 \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.132.2.17 -r1.132.2.18 \
src/sys/compat/netbsd32/netbsd32_syscalls.c
cvs rdiff -u -r1.13.2.16 -r1.13.2.17 \
src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.132.2.16 -r1.132.2.17 \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.24.2.15 -r1.24.2.16 \
src/sys/compat/netbsd32/netbsd32_systrace_args.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_syscall.h
diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.134.2.17 src/sys/compat/netbsd32/netbsd32_syscall.h:1.134.2.18
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.134.2.17	Wed Dec 26 14:01:46 2018
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Wed Jan  9 10:38:21 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.134.2.17 2018/12/26 14:01:46 pgoyette Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.134.2.18 2019/01/09 10:38:21 pgoyette Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.124 2018/12/24 21:27:06 mrg Exp
+ * created from	NetBSD: syscalls.master,v 1.120.2.19 2018/09/29 04:22:31 pgoyette Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_

Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.134.2.16 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.134.2.17
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.134.2.16	Wed Dec 26 14:01:46 2018
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Wed Jan  9 10:38:21 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.134.2.16 2018/12/26 14:01:46 pgoyette Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.134.2.17 2019/01/09 10:38:21 pgoyette Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.124 2018/12/24 21:27:06 mrg Exp
+ * created from	NetBSD: syscalls.master,v 1.120.2.19 2018/09/29 04:22:31 pgoyette Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_

Index: src/sys/compat/netbsd32/netbsd32_syscalls.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.132.2.17 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.132.2.18
--- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.132.2.17	Wed Dec 26 14:01:46 2018
+++ src/sys/compat/netbsd32/netbsd32_syscalls.c	Wed Jan  9 10:38:21 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls.c,v 1.132.2.17 2018/12/26 14:01:46 pgoyette Exp $ */
+/* $NetBSD: netbsd32_syscalls.c,v 1.132.2.18 2019/01/09 10:38:21 pgoyette Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.124 2018/12/24 21:27:06 mrg Exp
+ * created from	NetBSD: syscalls.master,v 1.120.2.19 2018/09/29 04:22:31 pgoyette Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.132.2.17 2018/12/26 14:01:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.132.2.18 2019/01/09 10:38:21 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)

Index: src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c:1.13.2.16 src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c:1.13.2.17
--- src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c:1.13.2.16	Wed Dec 26 14:01:46 2018
+++ src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c	Wed Jan  9 10:38:21 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls_autoload.c,v 1.13.2.16 2018/12/26 14:01:46 pgoyette Exp $ */
+/* $NetBSD: netbsd32_syscalls_autoload.c,v 1.13.2.17 2019/01/09 10:38:21 pgoyette Exp $ */
 
 /*
  * System call autoload table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.124 2018/12/24 21:27:06 mrg Exp
+ * created from	NetBSD: syscalls.master,v 1.120.2.19 2018/09/29 04:22:31 pgoyette Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls_autoload.c,v 1.13.2.16 2018/12/26 14:01:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls_autoload.c,v 1.13.2.17 2019/01/09 10:38:21 pgoyette Exp $");
 
 #include 
 static struct sc_autoload netbsd32_syscalls_autoload[] = {

Index: 

CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2019-01-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan  5 02:49:16 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_conv.h

Log Message:
Fix typo in previous


To generate a diff of this commit:
cvs rdiff -u -r1.33.2.4 -r1.33.2.5 src/sys/compat/netbsd32/netbsd32_conv.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/compat/netbsd32/netbsd32_conv.h
diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.33.2.4 src/sys/compat/netbsd32/netbsd32_conv.h:1.33.2.5
--- src/sys/compat/netbsd32/netbsd32_conv.h:1.33.2.4	Thu Jan  3 10:57:32 2019
+++ src/sys/compat/netbsd32/netbsd32_conv.h	Sat Jan  5 02:49:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_conv.h,v 1.33.2.4 2019/01/03 10:57:32 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_conv.h,v 1.33.2.5 2019/01/05 02:49:15 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -555,7 +555,7 @@ netbsd32_from_msqid_ds50(const struct ms
 struct netbsd32_msqid_ds50 *ds32p)
 {
 
-	nemset(ds32p, 0, sizeof(*ds32p));
+	memset(ds32p, 0, sizeof(*ds32p));
 	netbsd32_from_ipc_perm(>msg_perm, >msg_perm);
 	ds32p->_msg_cbytes = (netbsd32_u_long)dsp->_msg_cbytes;
 	ds32p->msg_qnum = (netbsd32_u_long)dsp->msg_qnum;



CVS commit: [pgoyette-compat] src/sys/compat

2019-01-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan  3 10:57:32 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_14_sysv.c
netbsd32_conv.h
src/sys/compat/sys [pgoyette-compat]: msg.h

Log Message:
Bring in some more changes from HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
src/sys/compat/netbsd32/netbsd32_compat_14_sysv.c
cvs rdiff -u -r1.33.2.3 -r1.33.2.4 src/sys/compat/netbsd32/netbsd32_conv.h
cvs rdiff -u -r1.4 -r1.4.64.1 src/sys/compat/sys/msg.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/compat/netbsd32/netbsd32_compat_14_sysv.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_14_sysv.c:1.1.2.1 src/sys/compat/netbsd32/netbsd32_compat_14_sysv.c:1.1.2.2
--- src/sys/compat/netbsd32/netbsd32_compat_14_sysv.c:1.1.2.1	Wed Sep 12 04:35:22 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_14_sysv.c	Thu Jan  3 10:57:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_14_sysv.c,v 1.1.2.1 2018/09/12 04:35:22 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_14_sysv.c,v 1.1.2.2 2019/01/03 10:57:32 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1999 Eduardo E. Horvath
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14_sysv.c,v 1.1.2.1 2018/09/12 04:35:22 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14_sysv.c,v 1.1.2.2 2019/01/03 10:57:32 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
@@ -112,6 +112,7 @@ static inline void
 native_to_netbsd32_msqid_ds14(struct msqid_ds *msqbuf, struct netbsd32_msqid_ds14 *omsqbuf)
 {
 
+	memset(omsqbuf, 0, sizeof(*omsqbuf));
 	native_to_netbsd32_ipc_perm14(>msg_perm, >msg_perm);
 
 #define	CVT(x)	omsqbuf->x = msqbuf->x

Index: src/sys/compat/netbsd32/netbsd32_conv.h
diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.33.2.3 src/sys/compat/netbsd32/netbsd32_conv.h:1.33.2.4
--- src/sys/compat/netbsd32/netbsd32_conv.h:1.33.2.3	Mon Nov 26 01:52:29 2018
+++ src/sys/compat/netbsd32/netbsd32_conv.h	Thu Jan  3 10:57:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_conv.h,v 1.33.2.3 2018/11/26 01:52:29 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_conv.h,v 1.33.2.4 2019/01/03 10:57:32 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -555,6 +555,7 @@ netbsd32_from_msqid_ds50(const struct ms
 struct netbsd32_msqid_ds50 *ds32p)
 {
 
+	nemset(ds32p, 0, sizeof(*ds32p));
 	netbsd32_from_ipc_perm(>msg_perm, >msg_perm);
 	ds32p->_msg_cbytes = (netbsd32_u_long)dsp->_msg_cbytes;
 	ds32p->msg_qnum = (netbsd32_u_long)dsp->msg_qnum;
@@ -571,6 +572,7 @@ netbsd32_from_msqid_ds(const struct msqi
 struct netbsd32_msqid_ds *ds32p)
 {
 
+	memset(ds32p, 0, sizeof(*ds32p));
 	netbsd32_from_ipc_perm(>msg_perm, >msg_perm);
 	ds32p->_msg_cbytes = (netbsd32_u_long)dsp->_msg_cbytes;
 	ds32p->msg_qnum = (netbsd32_u_long)dsp->msg_qnum;

Index: src/sys/compat/sys/msg.h
diff -u src/sys/compat/sys/msg.h:1.4 src/sys/compat/sys/msg.h:1.4.64.1
--- src/sys/compat/sys/msg.h:1.4	Mon Jan 19 19:39:41 2009
+++ src/sys/compat/sys/msg.h	Thu Jan  3 10:57:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.h,v 1.4 2009/01/19 19:39:41 christos Exp $	*/
+/*	$NetBSD: msg.h,v 1.4.64.1 2019/01/03 10:57:32 pgoyette Exp $	*/
 
 /*
  * SVID compatible msg.h file
@@ -108,6 +108,7 @@ static __inline void
 __native_to_msqid_ds13(const struct msqid_ds *msqbuf, struct msqid_ds13 *omsqbuf)
 {
 
+	memset(omsqbuf, 0, sizeof(*omsqbuf));
 	omsqbuf->msg_perm = msqbuf->msg_perm;
 
 #define	CVT(x)	omsqbuf->x = msqbuf->x
@@ -149,6 +150,7 @@ static __inline void
 __native_to_msqid_ds14(const struct msqid_ds *msqbuf, struct msqid_ds14 *omsqbuf)
 {
 
+	memset(omsqbuf, 0, sizeof(*omsqbuf));
 	__native_to_ipc_perm14(>msg_perm, >msg_perm);
 
 #define	CVT(x)	omsqbuf->x = msqbuf->x



CVS commit: [pgoyette-compat] src

2018-12-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan  1 05:38:34 UTC 2019

Modified Files:
src/sys/arch/i386/i386 [pgoyette-compat]: locore.S
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep_16.c
src/sys/dev [pgoyette-compat]: ipmi.c
src/sys/dev/acpi [pgoyette-compat]: ipmi_acpi.c
src/tests/rump/rumpkern [pgoyette-compat]: Makefile

Log Message:
Bring in some fixes from HEAD to address a couple of build breaks (in
i386 ipmi driver and sun2 rump tests).  Also fix a 'resolve conflict'
from previous commit in sparc64

With this, I am able to successfully build 66 out of 67 architectures
(the same architectures as handled by the releng build server.  The
only exception is evbarm64 which has a strange build failure during
the installcd step - the same failure occurs on HEAD.  It seems to be
something in the build itself, perhaps a difference between handling
of -O vs -M (MAKEOBJDIR vs MAKEOBJDIRPREFIX).


To generate a diff of this commit:
cvs rdiff -u -r1.156.2.3 -r1.156.2.4 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/ipmi.c
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/acpi/ipmi_acpi.c
cvs rdiff -u -r1.16.2.1 -r1.16.2.2 src/tests/rump/rumpkern/Makefile

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/locore.S
diff -u src/sys/arch/i386/i386/locore.S:1.156.2.3 src/sys/arch/i386/i386/locore.S:1.156.2.4
--- src/sys/arch/i386/i386/locore.S:1.156.2.3	Thu Sep  6 06:55:35 2018
+++ src/sys/arch/i386/i386/locore.S	Tue Jan  1 05:38:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.156.2.3 2018/09/06 06:55:35 pgoyette Exp $	*/
+/*	$NetBSD: locore.S,v 1.156.2.4 2019/01/01 05:38:34 pgoyette Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -128,7 +128,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.156.2.3 2018/09/06 06:55:35 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.156.2.4 2019/01/01 05:38:34 pgoyette Exp $");
 
 #include "opt_copy_symtab.h"
 #include "opt_ddb.h"
@@ -1288,12 +1288,12 @@ IDTVEC(syscall)
 	movl	$.Lsyscall_resume, %esi /* address to resume loop at */
 .Lsyscall_resume:
 	movl	%ebx,%eax		/* get cpl */
-	movl	CPUVAR(IUNMASK)(,%eax,4),%eax
-	andl	CPUVAR(IPENDING),%eax	/* any non-masked bits left? */
+	movl	CPUVAR(XUNMASK)(,%eax,4),%eax
+	andl	CPUVAR(XPENDING),%eax	/* any non-masked bits left? */
 	jz	17f
 	bsrl	%eax,%eax
-	btrl	%eax,CPUVAR(IPENDING)
-	movl	CPUVAR(ISOURCES)(,%eax,4),%eax
+	btrl	%eax,CPUVAR(XPENDING)
+	movl	CPUVAR(XSOURCES)(,%eax,4),%eax
 	jmp	*IS_RESUME(%eax)
 17:	movl	%ebx, CPUVAR(ILEVEL)	/* restore cpl  */
 	jmp	.Lsyscall_checkast

Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c:1.1.2.3 src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c:1.1.2.4
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c:1.1.2.3	Wed Dec 26 14:01:43 2018
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c	Tue Jan  1 05:38:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep_16.c,v 1.1.2.3 2018/12/26 14:01:43 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep_16.c,v 1.1.2.4 2019/01/01 05:38:34 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.1.2.3 2018/12/26 14:01:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.1.2.4 2019/01/01 05:38:34 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -150,7 +150,7 @@ netbsd32_sendsig_sigcontext(const ksigin
 	 * and then copy it out.  We probably ought to just build it
 	 * directly in user space
 	 */
-	memset(, 0, sizeof(sf));
+	memset(, 0, sizeof(sf));
 	sf.sf_signo = sig;
 	sf.sf_code = (u_int)ksi->ksi_trap;
 	sf.sf_scp = (u_long)>sf_sc;

Index: src/sys/dev/ipmi.c
diff -u src/sys/dev/ipmi.c:1.2.2.2 src/sys/dev/ipmi.c:1.2.2.3
--- src/sys/dev/ipmi.c:1.2.2.2	Wed Dec 26 14:01:47 2018
+++ src/sys/dev/ipmi.c	Tue Jan  1 05:38:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.2.2.2 2018/12/26 14:01:47 pgoyette Exp $ */
+/*	$NetBSD: ipmi.c,v 1.2.2.3 2019/01/01 05:38:34 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.2.2.2 2018/12/26 14:01:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.2.2.3 2019/01/01 05:38:34 pgoyette Exp $");
 
 #include 
 #include 
@@ -1851,7 +1851,7 @@ ipmi_map_regs(struct ipmi_softc *sc, str
 		"ipmi0";
 		aprint_error("%s: %s:bus_space_map(..., %" PRIx64 ", %x"
 		", 0, %p) type %c failed %d\n",
-		xname, __func__, ia->iaa_if_iobase,
+		xname, __func__, (uint64_t)ia->iaa_if_iobase,
 		sc->sc_if->nregs * sc->sc_if_iospacing, >sc_ioh,
 		ia->iaa_if_iotype, error);
 		return -1;
@@ 

CVS commit: [pgoyette-compat] src/sys/dev/pci

2018-11-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 26 13:16:46 UTC 2018

Modified Files:
src/sys/dev/pci [pgoyette-compat]: xhci_pci.c

Log Message:
And one more missed conflict.  (I think this is the last one.)


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.4 -r1.11.2.5 src/sys/dev/pci/xhci_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/xhci_pci.c
diff -u src/sys/dev/pci/xhci_pci.c:1.11.2.4 src/sys/dev/pci/xhci_pci.c:1.11.2.5
--- src/sys/dev/pci/xhci_pci.c:1.11.2.4	Mon Nov 26 01:52:47 2018
+++ src/sys/dev/pci/xhci_pci.c	Mon Nov 26 13:16:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci_pci.c,v 1.11.2.4 2018/11/26 01:52:47 pgoyette Exp $	*/
+/*	$NetBSD: xhci_pci.c,v 1.11.2.5 2018/11/26 13:16:46 pgoyette Exp $	*/
 /*	OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp	*/
 
 /*
@@ -32,11 +32,7 @@
  */
 
 #include 
-<<< xhci_pci.c
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.11.2.4 2018/11/26 01:52:47 pgoyette Exp $");
-===
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.11.2.4 2018/11/26 01:52:47 pgoyette Exp $");
->>> 1.17
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.11.2.5 2018/11/26 13:16:46 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xhci_pci.h"



CVS commit: [pgoyette-compat] src/sys/modules/compat_linux32

2018-11-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 26 12:42:48 UTC 2018

Modified Files:
src/sys/modules/compat_linux32 [pgoyette-compat]: Makefile

Log Message:
One more - we also need the libnv for compat_linux32 module


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.52.1 src/sys/modules/compat_linux32/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_linux32/Makefile
diff -u src/sys/modules/compat_linux32/Makefile:1.7 src/sys/modules/compat_linux32/Makefile:1.7.52.1
--- src/sys/modules/compat_linux32/Makefile:1.7	Tue Aug  2 17:22:51 2011
+++ src/sys/modules/compat_linux32/Makefile	Mon Nov 26 12:42:48 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2011/08/02 17:22:51 joerg Exp $
+#	$NetBSD: Makefile,v 1.7.52.1 2018/11/26 12:42:48 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -7,6 +7,7 @@ KMOD=	compat_linux32
 
 CPPFLAGS+=	-DSYSVSHM -DSYSVSEM -DSYSVMSG -DCOMPAT_LINUX
 CPPFLAGS+=	-DCOMPAT_LINUX32 -DCOMPAT_NETBSD32
+CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
 .PATH:	${S}/compat/linux32/common
 SRCS+=	linux32_dirent.c linux32_exec.c linux32_exec_elf32.c linux32_fcntl.c



CVS commit: [pgoyette-compat] src/sys/modules

2018-11-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 26 12:36:17 UTC 2018

Modified Files:
src/sys/modules/compat_netbsd32_09 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_12 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_13 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_16 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_20 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_30 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_40 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_43 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_50 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_60 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_80 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_sysvipc_10 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_sysvipc_14 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_sysvipc_50 [pgoyette-compat]: Makefile

Log Message:
Add the libnv directory for all of the compat_netbsd32* modules


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/modules/compat_netbsd32_09/Makefile
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/modules/compat_netbsd32_12/Makefile
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/modules/compat_netbsd32_13/Makefile
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/modules/compat_netbsd32_16/Makefile
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/modules/compat_netbsd32_20/Makefile
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/modules/compat_netbsd32_30/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_netbsd32_40/Makefile
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/modules/compat_netbsd32_43/Makefile
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/modules/compat_netbsd32_50/Makefile
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/modules/compat_netbsd32_60/Makefile
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/modules/compat_netbsd32_80/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
src/sys/modules/compat_netbsd32_sysvipc_10/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
src/sys/modules/compat_netbsd32_sysvipc_14/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
src/sys/modules/compat_netbsd32_sysvipc_50/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_netbsd32_09/Makefile
diff -u src/sys/modules/compat_netbsd32_09/Makefile:1.1.2.2 src/sys/modules/compat_netbsd32_09/Makefile:1.1.2.3
--- src/sys/modules/compat_netbsd32_09/Makefile:1.1.2.2	Tue Sep 11 04:20:50 2018
+++ src/sys/modules/compat_netbsd32_09/Makefile	Mon Nov 26 12:36:15 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.2 2018/09/11 04:20:50 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.3 2018/11/26 12:36:15 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -10,6 +10,7 @@ CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_12
 CPPFLAGS+=	-DCOMPAT_13 -DCOMPAT_14 -DCOMPAT_16 -DCOMPAT_20 -DCOMPAT_30
 CPPFLAGS+=	-DCOMPAT_40 -DCOMPAT_50 -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80
+CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
 SRCS+=	netbsd32_compat_09.c
 

Index: src/sys/modules/compat_netbsd32_12/Makefile
diff -u src/sys/modules/compat_netbsd32_12/Makefile:1.1.2.2 src/sys/modules/compat_netbsd32_12/Makefile:1.1.2.3
--- src/sys/modules/compat_netbsd32_12/Makefile:1.1.2.2	Tue Sep 11 04:20:51 2018
+++ src/sys/modules/compat_netbsd32_12/Makefile	Mon Nov 26 12:36:15 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.2 2018/09/11 04:20:51 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.3 2018/11/26 12:36:15 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -10,6 +10,7 @@ CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DCOMPAT_12
 CPPFLAGS+=	-DCOMPAT_13 -DCOMPAT_14 -DCOMPAT_16 -DCOMPAT_20 -DCOMPAT_30
 CPPFLAGS+=	-DCOMPAT_40 -DCOMPAT_50 -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80
+CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
 SRCS+=	netbsd32_compat_12.c
 

Index: src/sys/modules/compat_netbsd32_13/Makefile
diff -u src/sys/modules/compat_netbsd32_13/Makefile:1.1.2.5 src/sys/modules/compat_netbsd32_13/Makefile:1.1.2.6
--- src/sys/modules/compat_netbsd32_13/Makefile:1.1.2.5	Thu Sep 27 02:44:24 2018
+++ src/sys/modules/compat_netbsd32_13/Makefile	Mon Nov 26 12:36:15 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.5 2018/09/27 02:44:24 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.6 2018/11/26 12:36:15 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -9,6 +9,7 @@ KMOD=	compat_netbsd32_13
 CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DCOMPAT_13 -DCOMPAT_14 -DCOMPAT_16 -DCOMPAT_20 -DCOMPAT_30
 CPPFLAGS+=	-DCOMPAT_40 -DCOMPAT_50 -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80
+CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
 SRCS+=	netbsd32_compat_13.c
 

Index: src/sys/modules/compat_netbsd32_16/Makefile
diff -u 

CVS commit: [pgoyette-compat] src/sys/modules

2018-11-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 26 12:25:20 UTC 2018

Modified Files:
src/sys/modules/compat_netbsd32 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_mqueue [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_nfssrv [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_ptrace [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_sysvipc [pgoyette-compat]: Makefile

Log Message:
Update from HEAD - need to add sys/external/bsd/libnv to the #include list


To generate a diff of this commit:
cvs rdiff -u -r1.20.12.15 -r1.20.12.16 \
src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r1.1 -r1.1.20.1 src/sys/modules/compat_netbsd32_mqueue/Makefile
cvs rdiff -u -r1.1 -r1.1.20.1 src/sys/modules/compat_netbsd32_nfssrv/Makefile
cvs rdiff -u -r1.2 -r1.2.16.1 src/sys/modules/compat_netbsd32_ptrace/Makefile
cvs rdiff -u -r1.1.20.1 -r1.1.20.2 \
src/sys/modules/compat_netbsd32_sysvipc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_netbsd32/Makefile
diff -u src/sys/modules/compat_netbsd32/Makefile:1.20.12.15 src/sys/modules/compat_netbsd32/Makefile:1.20.12.16
--- src/sys/modules/compat_netbsd32/Makefile:1.20.12.15	Thu Oct  4 02:20:29 2018
+++ src/sys/modules/compat_netbsd32/Makefile	Mon Nov 26 12:25:19 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20.12.15 2018/10/04 02:20:29 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.20.12.16 2018/11/26 12:25:19 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -22,6 +22,7 @@ CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DEXEC_ELF32 -DEXEC_ELF64
 CPPFLAGS+=	-DCOREDUMP -DNTP -DVMSWAP
 CPPFLAGS+=	-DKTRACE -DMODULAR
+CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
 .PATH:	${S}/compat/netbsd32
 SRCS+=	netbsd32_core.c netbsd32_event.c

Index: src/sys/modules/compat_netbsd32_mqueue/Makefile
diff -u src/sys/modules/compat_netbsd32_mqueue/Makefile:1.1 src/sys/modules/compat_netbsd32_mqueue/Makefile:1.1.20.1
--- src/sys/modules/compat_netbsd32_mqueue/Makefile:1.1	Tue Dec  1 23:58:19 2015
+++ src/sys/modules/compat_netbsd32_mqueue/Makefile	Mon Nov 26 12:25:20 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2015/12/01 23:58:19 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.20.1 2018/11/26 12:25:20 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -7,6 +7,7 @@ KMOD=	compat_netbsd32_mqueue
 
 CPPFLAGS+=	-DCOMPAT_NETBSD32 -DCOMPAT_50
 CPPFLAGS+=	-DMQUEUE
+CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
 .PATH:	${S}/compat/netbsd32
 SRCS+=	netbsd32_mqueue.c

Index: src/sys/modules/compat_netbsd32_nfssrv/Makefile
diff -u src/sys/modules/compat_netbsd32_nfssrv/Makefile:1.1 src/sys/modules/compat_netbsd32_nfssrv/Makefile:1.1.20.1
--- src/sys/modules/compat_netbsd32_nfssrv/Makefile:1.1	Tue Dec  1 09:13:58 2015
+++ src/sys/modules/compat_netbsd32_nfssrv/Makefile	Mon Nov 26 12:25:20 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2015/12/01 09:13:58 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.20.1 2018/11/26 12:25:20 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -7,6 +7,7 @@ KMOD=	compat_netbsd32_nfssrv
 
 CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DNFSSERVER
+CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
 .PATH:	${S}/compat/netbsd32
 SRCS+=	netbsd32_nfssvc.c

Index: src/sys/modules/compat_netbsd32_ptrace/Makefile
diff -u src/sys/modules/compat_netbsd32_ptrace/Makefile:1.2 src/sys/modules/compat_netbsd32_ptrace/Makefile:1.2.16.1
--- src/sys/modules/compat_netbsd32_ptrace/Makefile:1.2	Fri Jan 13 06:04:48 2017
+++ src/sys/modules/compat_netbsd32_ptrace/Makefile	Mon Nov 26 12:25:20 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2017/01/13 06:04:48 christos Exp $
+#	$NetBSD: Makefile,v 1.2.16.1 2018/11/26 12:25:20 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -7,6 +7,7 @@ KMOD=	compat_netbsd32_ptrace
 
 CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DPTRACE
+CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
 .PATH:	${S}/compat/netbsd32
 SRCS+=	netbsd32_ptrace.c

Index: src/sys/modules/compat_netbsd32_sysvipc/Makefile
diff -u src/sys/modules/compat_netbsd32_sysvipc/Makefile:1.1.20.1 src/sys/modules/compat_netbsd32_sysvipc/Makefile:1.1.20.2
--- src/sys/modules/compat_netbsd32_sysvipc/Makefile:1.1.20.1	Wed Sep 12 04:35:22 2018
+++ src/sys/modules/compat_netbsd32_sysvipc/Makefile	Mon Nov 26 12:25:20 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.20.1 2018/09/12 04:35:22 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.20.2 2018/11/26 12:25:20 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -8,6 +8,7 @@ KMOD=	compat_netbsd32_sysvipc
 CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DCOMPAT_10 -DCOMPAT_13 -DCOMPAT_14 -DCOMPAT_50
 CPPFLAGS+=	-DSYSVSHM -DSYSVSEM -DSYSVMSG
+CPPFLAGS+=	

CVS commit: [pgoyette-compat] src/usr.bin/gzip

2018-11-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 26 12:05:55 UTC 2018

Modified Files:
src/usr.bin/gzip [pgoyette-compat]: gzip.c

Log Message:
Another missed pseudo-conflict


To generate a diff of this commit:
cvs rdiff -u -r1.112.2.3 -r1.112.2.4 src/usr.bin/gzip/gzip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/gzip/gzip.c
diff -u src/usr.bin/gzip/gzip.c:1.112.2.3 src/usr.bin/gzip/gzip.c:1.112.2.4
--- src/usr.bin/gzip/gzip.c:1.112.2.3	Mon Nov 26 01:52:54 2018
+++ src/usr.bin/gzip/gzip.c	Mon Nov 26 12:05:55 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: gzip.c,v 1.112.2.3 2018/11/26 01:52:54 pgoyette Exp $	*/
+/*	$NetBSD: gzip.c,v 1.112.2.4 2018/11/26 12:05:55 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2015, 2017
@@ -31,11 +31,7 @@
 #ifndef lint
 __COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008,\
  2009, 2010, 2011, 2015, 2017 Matthew R. Green.  All rights reserved.");
-<<< gzip.c
-__RCSID("$NetBSD: gzip.c,v 1.112.2.3 2018/11/26 01:52:54 pgoyette Exp $");
-===
-__RCSID("$NetBSD: gzip.c,v 1.112.2.3 2018/11/26 01:52:54 pgoyette Exp $");
->>> 1.116
+__RCSID("$NetBSD: gzip.c,v 1.112.2.4 2018/11/26 12:05:55 pgoyette Exp $");
 #endif /* not lint */
 
 /*



CVS commit: [pgoyette-compat] src/distrib/sets/lists/modules

2018-11-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 26 11:38:35 UTC 2018

Modified Files:
src/distrib/sets/lists/modules [pgoyette-compat]: md.sparc64

Log Message:
Add compat_netbsd32* modules for sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.22.1 src/distrib/sets/lists/modules/md.sparc64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/modules/md.sparc64
diff -u src/distrib/sets/lists/modules/md.sparc64:1.4 src/distrib/sets/lists/modules/md.sparc64:1.4.22.1
--- src/distrib/sets/lists/modules/md.sparc64:1.4	Sun Aug 10 11:51:40 2014
+++ src/distrib/sets/lists/modules/md.sparc64	Mon Nov 26 11:38:34 2018
@@ -1,4 +1,47 @@
-# $NetBSD: md.sparc64,v 1.4 2014/08/10 11:51:40 bad Exp $
+# $NetBSD: md.sparc64,v 1.4.22.1 2018/11/26 11:38:34 pgoyette Exp $
+
+./@MODULEDIR@/compat_netbsd32			base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_09		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_09/compat_netbsd32_09.kmod base-kernel-modules	kmod
+#./@MODULEDIR@/compat_netbsd32_10		base-kernel-modules	kmod
+#./@MODULEDIR@/compat_netbsd32_10/compat_netbsd32_10.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_12		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_12/compat_netbsd32_12.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_13		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_13/compat_netbsd32_13.kmod base-kernel-modules	kmod
+#./@MODULEDIR@/compat_netbsd32_14		base-kernel-modules	kmod
+#./@MODULEDIR@/compat_netbsd32_14/compat_netbsd32_14.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_16		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_16/compat_netbsd32_16.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_20		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_20/compat_netbsd32_20.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_30		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_30/compat_netbsd32_30.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_40		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_40/compat_netbsd32_40.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_50		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_50/compat_netbsd32_50.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_60		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_60/compat_netbsd32_60.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_80		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_80/compat_netbsd32_80.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_43		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_43/compat_netbsd32_43.kmod base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_mqueue		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_mqueue/compat_netbsd32_mqueue.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_nfssrv		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_nfssrv/compat_netbsd32_nfssrv.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_ptrace		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_ptrace/compat_netbsd32_ptrace.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc/compat_netbsd32_sysvipc.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_10	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_10/compat_netbsd32_sysvipc_10.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_14	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_14/compat_netbsd32_sysvipc_14.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_50	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_50/compat_netbsd32_sysvipc_50.kmod	base-kernel-modules	kmod
 ./@MODULEDIR@/exec_elf32			base-kernel-modules	kmod
 ./@MODULEDIR@/exec_elf32/exec_elf32.kmod	base-kernel-modules	kmod
 ./@MODULEDIR@/exec_elf64			base-kernel-modules	kmod



CVS commit: [pgoyette-compat] src/sys/modules

2018-11-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 26 11:34:29 UTC 2018

Modified Files:
src/sys/modules [pgoyette-compat]: Makefile

Log Message:
Build the compat_netbsd32* modules for sparc64, too

XXX Sets lists will be updated later.


To generate a diff of this commit:
cvs rdiff -u -r1.202.2.41 -r1.202.2.42 src/sys/modules/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.202.2.41 src/sys/modules/Makefile:1.202.2.42
--- src/sys/modules/Makefile:1.202.2.41	Mon Nov 26 11:21:15 2018
+++ src/sys/modules/Makefile	Mon Nov 26 11:34:29 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.202.2.41 2018/11/26 11:21:15 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.202.2.42 2018/11/26 11:34:29 pgoyette Exp $
 
 .include 
 
@@ -273,6 +273,7 @@ SUBDIR+=	wmimsi
 
 .if ${MACHINE_ARCH} == "x86_64" \
 || ${MACHINE_CPU} == "arm" \
+|| ${MACHINE_ARCH} == "sparc64" \
 || (!empty(MACHINE_ARCH:Mmips64*) && !defined(BSD_MK_COMPAT_FILE))
 SUBDIR+=	compat_netbsd32
 SUBDIR+=	compat_netbsd32_09	compat_netbsd32_12



CVS commit: [pgoyette-compat] src/sys/modules

2018-11-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 26 11:21:15 UTC 2018

Modified Files:
src/sys/modules [pgoyette-compat]: Makefile

Log Message:
Keep only a single copy of the list of compat_netbsd32* modules.


To generate a diff of this commit:
cvs rdiff -u -r1.202.2.40 -r1.202.2.41 src/sys/modules/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.202.2.40 src/sys/modules/Makefile:1.202.2.41
--- src/sys/modules/Makefile:1.202.2.40	Mon Nov 26 01:52:50 2018
+++ src/sys/modules/Makefile	Mon Nov 26 11:21:15 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.202.2.40 2018/11/26 01:52:50 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.202.2.41 2018/11/26 11:21:15 pgoyette Exp $
 
 .include 
 
@@ -271,7 +271,8 @@ SUBDIR+=	wmihp
 SUBDIR+=	wmimsi
 .endif
 
-.if ${MACHINE_CPU} == "arm" \
+.if ${MACHINE_ARCH} == "x86_64" \
+|| ${MACHINE_CPU} == "arm" \
 || (!empty(MACHINE_ARCH:Mmips64*) && !defined(BSD_MK_COMPAT_FILE))
 SUBDIR+=	compat_netbsd32
 SUBDIR+=	compat_netbsd32_09	compat_netbsd32_12
@@ -291,20 +292,6 @@ SUBDIR+=	compat_netbsd32_sysvipc_50
 
 .if ${MACHINE_ARCH} == "x86_64"
 SUBDIR+=	compat_linux32
-SUBDIR+=	compat_netbsd32
-SUBDIR+=	compat_netbsd32_09	compat_netbsd32_12
-SUBDIR+=	compat_netbsd32_13	compat_netbsd32_16
-SUBDIR+=	compat_netbsd32_20	compat_netbsd32_30
-SUBDIR+=	compat_netbsd32_40	compat_netbsd32_50
-SUBDIR+=	compat_netbsd32_60	compat_netbsd32_80
-SUBDIR+=	compat_netbsd32_43
-SUBDIR+=	compat_netbsd32_mqueue
-SUBDIR+=	compat_netbsd32_nfssrv
-SUBDIR+=	compat_netbsd32_ptrace
-SUBDIR+=	compat_netbsd32_sysvipc
-SUBDIR+=	compat_netbsd32_sysvipc_10
-SUBDIR+=	compat_netbsd32_sysvipc_14
-SUBDIR+=	compat_netbsd32_sysvipc_50
 .endif
 
 .if ${MACHINE_ARCH} == "i386"



CVS commit: [pgoyette-compat] src/sys/dev/usb

2018-11-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 26 10:43:37 UTC 2018

Modified Files:
src/sys/dev/usb [pgoyette-compat]: usbdi.c

Log Message:
Missed a $Id$ conflict in the last sync-with-HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.175.2.3 -r1.175.2.4 src/sys/dev/usb/usbdi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.175.2.3 src/sys/dev/usb/usbdi.c:1.175.2.4
--- src/sys/dev/usb/usbdi.c:1.175.2.3	Mon Nov 26 01:52:49 2018
+++ src/sys/dev/usb/usbdi.c	Mon Nov 26 10:43:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.175.2.3 2018/11/26 01:52:49 pgoyette Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.175.2.4 2018/11/26 10:43:36 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,11 +32,7 @@
  */
 
 #include 
-<<< usbdi.c
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.175.2.3 2018/11/26 01:52:49 pgoyette Exp $");
-===
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.175.2.3 2018/11/26 01:52:49 pgoyette Exp $");
->>> 1.180
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.175.2.4 2018/11/26 10:43:36 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"



CVS commit: [pgoyette-compat] src

2018-10-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Oct 20 06:58:47 UTC 2018

Modified Files:
src/bin/sh [pgoyette-compat]: alias.c eval.c mkinit.sh shell.h show.c
src/common/lib/libc/string [pgoyette-compat]: memmem.c
src/common/lib/libprop [pgoyette-compat]: prop_kern.c
src/crypto/dist/ipsec-tools [pgoyette-compat]: NEWS README
src/crypto/dist/ipsec-tools/src/libipsec [pgoyette-compat]: Makefile.am
src/crypto/dist/ipsec-tools/src/racoon [pgoyette-compat]: isakmp_frag.c
logger.c racoon.conf.5
src/crypto/dist/ipsec-tools/src/setkey [pgoyette-compat]: Makefile.am
extern.h parse.y setkey.c token.l
src/crypto/external/bsd/openssh/dist [pgoyette-compat]: log.c
monitor_wrap.c packet.c serverloop.c
src/crypto/external/bsd/openssl/dist/test [pgoyette-compat]: hmactest.c
src/crypto/external/bsd/openssl/dist/test/testutil [pgoyette-compat]:
format_output.c main.c output.h tests.c
src/crypto/external/bsd/openssl/include/openssl [pgoyette-compat]:
opensslconf.h
src/crypto/external/bsd/openssl/lib/libcrypto [pgoyette-compat]:
Makefile crypto.map man.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm 
[pgoyette-compat]:
arm_asm.h
src/crypto/external/bsd/openssl/lib/libssl [pgoyette-compat]: Makefile
src/distrib/alpha/instkernel/ramdisk [pgoyette-compat]: list
src/distrib/amd64/ramdisks/common [pgoyette-compat]: list.ramdisk
src/distrib/amd64/uefi-installimage [pgoyette-compat]:
Makefile.bootimage
src/distrib/common/bootimage [pgoyette-compat]: Makefile.bootimage
src/distrib/sets [pgoyette-compat]: Makefile
src/distrib/sets/lists/base [pgoyette-compat]: ad.aarch64 md.amd64
md.i386 mi
src/distrib/sets/lists/comp [pgoyette-compat]: ad.m68k mi
src/distrib/sets/lists/debug [pgoyette-compat]: ad.aarch64 md.amd64
md.i386 mi
src/distrib/sets/lists/man [pgoyette-compat]: mi
src/distrib/sparc64/instfs [pgoyette-compat]: list
src/distrib/utils/embedded/conf [pgoyette-compat]: evbarm.conf
src/distrib/utils/embedded/files [pgoyette-compat]: resize_disklabel
src/distrib/utils/x_gzip [pgoyette-compat]: Makefile
src/doc [pgoyette-compat]: 3RDPARTY CHANGES TODO.kaslr
src/etc [pgoyette-compat]: Makefile security
src/etc/defaults [pgoyette-compat]: rc.conf
src/etc/etc.aarch64 [pgoyette-compat]: MAKEDEV.conf
src/etc/etc.evbarm [pgoyette-compat]: MAKEDEV.conf
src/etc/mtree [pgoyette-compat]: NetBSD.dist.base
src/etc/rc.d [pgoyette-compat]: cleartmp resize_root swap1
src/external/bsd/acpica/bin/iasl [pgoyette-compat]: Makefile
src/external/bsd/bind/dist/lib/isc/unix [pgoyette-compat]: socket.c
src/external/bsd/file/dist [pgoyette-compat]: AUTHORS COPYING ChangeLog
Makefile.in NEWS README aclocal.m4 compile config.guess config.h.in
config.sub configure configure.ac depcomp install-sh ltmain.sh
missing
src/external/bsd/file/dist/doc [pgoyette-compat]: Makefile.in file.1
libmagic.3 magic.5
src/external/bsd/file/dist/magic [pgoyette-compat]: Header Makefile.am
Makefile.in
src/external/bsd/file/dist/magic/magdir [pgoyette-compat]: amigaos
animation archive audio cad cafebabe coff compress console database
dbpf dump elf fsav hitachi-sh images intel java jpeg linux make
measure msdos msooxml msvc pdf sgi sniffer wsdl
src/external/bsd/file/dist/python [pgoyette-compat]: Makefile.am
Makefile.in magic.py setup.py
src/external/bsd/file/dist/src [pgoyette-compat]: Makefile.am
Makefile.in apprentice.c apptype.c ascmagic.c asprintf.c cdf.c
cdf.h cdf_time.c compress.c der.c dprintf.c elfclass.h encoding.c
file.c file.h fmtcheck.c fsmagic.c funcs.c getopt_long.c is_tar.c
magic.c magic.h.in mygetopt.h print.c readcdf.c readelf.c readelf.h
seccomp.c softmagic.c vasprintf.c
src/external/bsd/file/dist/tests [pgoyette-compat]: Makefile.am
Makefile.in
src/external/bsd/file/include [pgoyette-compat]: config.h
src/external/bsd/file/lib [pgoyette-compat]: Makefile
src/external/bsd/nsd [pgoyette-compat]: Makefile.inc
src/external/bsd/ntp/dist/ntpd [pgoyette-compat]: ntpd.c
src/external/bsd/openresolv/dist [pgoyette-compat]: dnsmasq.in libc.in
named.in resolvconf.in unbound.in
src/external/cddl/dtracetoolkit/dist [pgoyette-compat]: iosnoop
src/external/public-domain/tz/dist [pgoyette-compat]: CONTRIBUTING
Makefile NEWS README TZDATA_VERSION africa antarctica asia
australasia backward backzone etcetera europe factory

CVS commit: [pgoyette-compat] src/sys/compat

2018-10-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Oct 18 22:09:57 UTC 2018

Modified Files:
src/sys/compat/linux/common [pgoyette-compat]: linux_mod.c
src/sys/compat/sunos [pgoyette-compat]: sunos_mod.c
src/sys/compat/sunos32 [pgoyette-compat]: sunos32_mod.c
src/sys/compat/svr4 [pgoyette-compat]: svr4_mod.c
src/sys/compat/svr4_32 [pgoyette-compat]: svr4_32_mod.c

Log Message:
Add a few more references to the (currently always but not forever)
built-in compat_util module


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.2 -r1.10.2.3 src/sys/compat/linux/common/linux_mod.c
cvs rdiff -u -r1.3.28.1 -r1.3.28.2 src/sys/compat/sunos/sunos_mod.c
cvs rdiff -u -r1.3.28.1 -r1.3.28.2 src/sys/compat/sunos32/sunos32_mod.c
cvs rdiff -u -r1.4 -r1.4.28.1 src/sys/compat/svr4/svr4_mod.c
cvs rdiff -u -r1.3 -r1.3.28.1 src/sys/compat/svr4_32/svr4_32_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_mod.c
diff -u src/sys/compat/linux/common/linux_mod.c:1.10.2.2 src/sys/compat/linux/common/linux_mod.c:1.10.2.3
--- src/sys/compat/linux/common/linux_mod.c:1.10.2.2	Wed Sep 19 06:56:51 2018
+++ src/sys/compat/linux/common/linux_mod.c	Thu Oct 18 22:09:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mod.c,v 1.10.2.2 2018/09/19 06:56:51 pgoyette Exp $	*/
+/*	$NetBSD: linux_mod.c,v 1.10.2.3 2018/10/18 22:09:56 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.10.2.2 2018/09/19 06:56:51 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.10.2.3 2018/10/18 22:09:56 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -66,7 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mod.c,
 # define	MD3	""
 #endif
 
-#define REQ1"compat_ossaudio,sysv_ipc"
+#define REQ1"compat_ossaudio,sysv_ipc,compat_util"
 #define REQ2",compat_12,compat_30,compat_50,compat_43,compat_sysv_50"
 
 MODULE(MODULE_CLASS_EXEC, compat_linux, REQ1 REQ2 MD1 MD2 MD3);

Index: src/sys/compat/sunos/sunos_mod.c
diff -u src/sys/compat/sunos/sunos_mod.c:1.3.28.1 src/sys/compat/sunos/sunos_mod.c:1.3.28.2
--- src/sys/compat/sunos/sunos_mod.c:1.3.28.1	Tue Oct  2 01:43:53 2018
+++ src/sys/compat/sunos/sunos_mod.c	Thu Oct 18 22:09:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos_mod.c,v 1.3.28.1 2018/10/02 01:43:53 pgoyette Exp $	*/
+/*	$NetBSD: sunos_mod.c,v 1.3.28.2 2018/10/18 22:09:56 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos_mod.c,v 1.3.28.1 2018/10/02 01:43:53 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_mod.c,v 1.3.28.2 2018/10/18 22:09:56 pgoyette Exp $");
 
 #include 
 #include 
@@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunos_mod.c,
 
 #include 
 
-MODULE(MODULE_CLASS_EXEC, compat_sunos, "compat,exec_aout");
+MODULE(MODULE_CLASS_EXEC, compat_sunos, "compat,compat_util,exec_aout");
 
 static struct execsw sunos_execsw = {
 	.es_hdrsz = SUNOS_AOUT_HDR_SIZE,

Index: src/sys/compat/sunos32/sunos32_mod.c
diff -u src/sys/compat/sunos32/sunos32_mod.c:1.3.28.1 src/sys/compat/sunos32/sunos32_mod.c:1.3.28.2
--- src/sys/compat/sunos32/sunos32_mod.c:1.3.28.1	Tue Oct  2 01:43:53 2018
+++ src/sys/compat/sunos32/sunos32_mod.c	Thu Oct 18 22:09:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos32_mod.c,v 1.3.28.1 2018/10/02 01:43:53 pgoyette Exp $	*/
+/*	$NetBSD: sunos32_mod.c,v 1.3.28.2 2018/10/18 22:09:56 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos32_mod.c,v 1.3.28.1 2018/10/02 01:43:53 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_mod.c,v 1.3.28.2 2018/10/18 22:09:56 pgoyette Exp $");
 
 #include 
 #include 
@@ -45,7 +45,8 @@ __KERNEL_RCSID(0, "$NetBSD: sunos32_mod.
 
 #include 
 
-MODULE(MODULE_CLASS_EXEC, compat_sunos, "compat,compat_netbsd32,exec_aout");
+MODULE(MODULE_CLASS_EXEC, compat_sunos,
+"compat,compat_util,compat_netbsd32,exec_aout");
 
 static struct execsw sunos_execsw = {
 	.es_hdrsz = SUNOS32_AOUT_HDR_SIZE,

Index: src/sys/compat/svr4/svr4_mod.c
diff -u src/sys/compat/svr4/svr4_mod.c:1.4 src/sys/compat/svr4/svr4_mod.c:1.4.28.1
--- src/sys/compat/svr4/svr4_mod.c:1.4	Fri Mar  7 08:40:59 2014
+++ src/sys/compat/svr4/svr4_mod.c	Thu Oct 18 22:09:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_mod.c,v 1.4 2014/03/07 08:40:59 martin Exp $	*/
+/*	$NetBSD: svr4_mod.c,v 1.4.28.1 2018/10/18 22:09:56 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: svr4_mod.c,v 1.4 2014/03/07 08:40:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_mod.c,v 1.4.28.1 2018/10/18 22:09:56 pgoyette Exp $");
 
 #ifndef ELFSIZE
 #define ELFSIZE ARCH_ELFSIZE
@@ -55,7 +55,7 @@ 

CVS commit: [pgoyette-compat] src/sys/compat/osf1

2018-10-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Oct 18 22:04:23 UTC 2018

Modified Files:
src/sys/compat/osf1 [pgoyette-compat]: osf1_mod.c

Log Message:
Add requirement for compat_util (even though it is currently built-in for
all kernels) since there are references.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.12.1 src/sys/compat/osf1/osf1_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/osf1/osf1_mod.c
diff -u src/sys/compat/osf1/osf1_mod.c:1.5 src/sys/compat/osf1/osf1_mod.c:1.5.12.1
--- src/sys/compat/osf1/osf1_mod.c:1.5	Sun Feb 12 21:02:20 2017
+++ src/sys/compat/osf1/osf1_mod.c	Thu Oct 18 22:04:23 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: osf1_mod.c,v 1.5 2017/02/12 21:02:20 chs Exp $	*/
+/*	$NetBSD: osf1_mod.c,v 1.5.12.1 2018/10/18 22:04:23 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: osf1_mod.c,v 1.5 2017/02/12 21:02:20 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_mod.c,v 1.5.12.1 2018/10/18 22:04:23 pgoyette Exp $");
 
 #include 
 #include 
@@ -46,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: osf1_mod.c,v
 #include 
 #include 
 
-MODULE(MODULE_CLASS_EXEC, compat_osf1, "compat,exec_ecoff");
+MODULE(MODULE_CLASS_EXEC, compat_osf1, "compat,compat_util,exec_ecoff");
 
 #define OSF1_ARGLEN \
 	(OSF1_MAX_AUX_ENTRIES * sizeof (struct osf1_auxv) + \



CVS commit: [pgoyette-compat] src/sys

2018-10-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 15 22:06:16 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_sysv_50_mod.c
compat_sysv_mod.h
src/sys/kern [pgoyette-compat]: compat_stub.c sysv_ipc.c
src/sys/sys [pgoyette-compat]: compat_stub.h

Log Message:
Convert the final non-MP-safe "vectored" compat routine to use the
MP-safe mechanism.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_sysv_50_mod.c \
src/sys/compat/common/compat_sysv_mod.h
cvs rdiff -u -r1.1.2.31 -r1.1.2.32 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.32.16.5 -r1.32.16.6 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.1.2.43 -r1.1.2.44 src/sys/sys/compat_stub.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/compat/common/compat_sysv_50_mod.c
diff -u src/sys/compat/common/compat_sysv_50_mod.c:1.1.2.1 src/sys/compat/common/compat_sysv_50_mod.c:1.1.2.2
--- src/sys/compat/common/compat_sysv_50_mod.c:1.1.2.1	Tue Apr 17 23:06:11 2018
+++ src/sys/compat/common/compat_sysv_50_mod.c	Mon Oct 15 22:06:16 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_sysv_50_mod.c,v 1.1.2.1 2018/04/17 23:06:11 pgoyette Exp $	*/
+/*	$NetBSD: compat_sysv_50_mod.c,v 1.1.2.2 2018/10/15 22:06:16 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_sysv_50_mod.c,v 1.1.2.1 2018/04/17 23:06:11 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_sysv_50_mod.c,v 1.1.2.2 2018/10/15 22:06:16 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: compat_sysv_
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -63,11 +64,12 @@ static const struct syscall_package comp
 	{ 0, 0, NULL }
 };
 
+MODULE_SET_HOOK(sysvipc50_sysctl_hook, "sysv50", sysctl_kern_sysvipc50);
+MODULE_UNSET_HOOK(sysvipc50_sysctl_hook);
+
 static int
 compat_sysv_50_modcmd(modcmd_t cmd, void *arg)
 {
-	static int (*orig_sysvipc50_sysctl)(SYSCTLFN_PROTO);
-
 	int error = 0;
 
 	switch (cmd) {
@@ -76,16 +78,15 @@ compat_sysv_50_modcmd(modcmd_t cmd, void
 		if (error != 0) {
 			break;
 		}
-		orig_sysvipc50_sysctl = vec_sysvipc50_sysctl;
-		vec_sysvipc50_sysctl = sysctl_kern_sysvipc50;
+		sysvipc50_sysctl_hook_set();
 		break;
 
 	case MODULE_CMD_FINI:
-		vec_sysvipc50_sysctl = orig_sysvipc50_sysctl;
 		error = syscall_disestablish(NULL, compat_sysv_50_syscalls);
 		if (error != 0) {
 			break;
 		}
+		sysvipc50_sysctl_hook_unset();
 		break;
 
 	default:
Index: src/sys/compat/common/compat_sysv_mod.h
diff -u src/sys/compat/common/compat_sysv_mod.h:1.1.2.1 src/sys/compat/common/compat_sysv_mod.h:1.1.2.2
--- src/sys/compat/common/compat_sysv_mod.h:1.1.2.1	Tue Apr 17 21:59:27 2018
+++ src/sys/compat/common/compat_sysv_mod.h	Mon Oct 15 22:06:16 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_sysv_mod.h,v 1.1.2.1 2018/04/17 21:59:27 pgoyette Exp $	*/
+/*	$NetBSD: compat_sysv_mod.h,v 1.1.2.2 2018/10/15 22:06:16 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,8 +34,6 @@
 
 #include 
 
-extern int (*vec_sysvipc50_sysctl)(SYSCTLFN_PROTO);
-
 int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);
 
 #endif /* _COMPAT_COMMON_SYSV_IPC_MOD_H_ */

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.1.2.31 src/sys/kern/compat_stub.c:1.1.2.32
--- src/sys/kern/compat_stub.c:1.1.2.31	Mon Oct 15 11:57:05 2018
+++ src/sys/kern/compat_stub.c	Mon Oct 15 22:06:16 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.1.2.31 2018/10/15 11:57:05 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.1.2.32 2018/10/15 22:06:16 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -203,3 +203,8 @@ struct compat_10_openat_hook_t compat_10
  */
 struct compat_70_unp_hook_t compat_70_unp_hook;
 
+/*
+ * Hook for sysvipc50_sysctl
+ */
+struct sysvipc50_sysctl_hook_t sysvipc50_sysctl_hook;
+

Index: src/sys/kern/sysv_ipc.c
diff -u src/sys/kern/sysv_ipc.c:1.32.16.5 src/sys/kern/sysv_ipc.c:1.32.16.6
--- src/sys/kern/sysv_ipc.c:1.32.16.5	Thu Sep  6 06:56:42 2018
+++ src/sys/kern/sysv_ipc.c	Mon Oct 15 22:06:16 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_ipc.c,v 1.32.16.5 2018/09/06 06:56:42 pgoyette Exp $	*/
+/*	$NetBSD: sysv_ipc.c,v 1.32.16.6 2018/10/15 22:06:16 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.32.16.5 2018/09/06 06:56:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.32.16.6 2018/10/15 22:06:16 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
@@ -61,11 +61,10 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v
 #include 
 #include 
 #include 
+#include 
 
 #include 	/* for sysctl routine vector */
 
-int (*vec_sysvipc50_sysctl)(SYSCTLFN_PROTO);
-
 /*
  * Values in 

CVS commit: [pgoyette-compat] src/sys

2018-10-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 15 11:57:06 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_70_mod.c
uipc_usrreq_70.c
src/sys/compat/sys [pgoyette-compat]: socket.h
src/sys/kern [pgoyette-compat]: compat_stub.c uipc_usrreq.c
src/sys/sys [pgoyette-compat]: compat_stub.h

Log Message:
Convert the compat70_unp_addsockcred hook to the MP-safe mechanism.

XXX One more remaining: sysvipc50_sysctl


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/sys/compat/common/compat_70_mod.c
cvs rdiff -u -r1.1.20.2 -r1.1.20.3 src/sys/compat/common/uipc_usrreq_70.c
cvs rdiff -u -r1.15 -r1.15.2.1 src/sys/compat/sys/socket.h
cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.183.2.4 -r1.183.2.5 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/sys/sys/compat_stub.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/compat/common/compat_70_mod.c
diff -u src/sys/compat/common/compat_70_mod.c:1.1.2.11 src/sys/compat/common/compat_70_mod.c:1.1.2.12
--- src/sys/compat/common/compat_70_mod.c:1.1.2.11	Mon Oct 15 09:51:33 2018
+++ src/sys/compat/common/compat_70_mod.c	Mon Oct 15 11:57:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_70_mod.c,v 1.1.2.11 2018/10/15 09:51:33 pgoyette Exp $	*/
+/*	$NetBSD: compat_70_mod.c,v 1.1.2.12 2018/10/15 11:57:05 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.11 2018/10/15 09:51:33 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.12 2018/10/15 11:57:05 pgoyette Exp $");
 
 #include 
 #include 
@@ -49,6 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: compat_70_mo
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -58,6 +59,7 @@ int compat_70_init(void)
 
 	compat70_ocreds_valid = true;
 	rtsock_70_init();
+	uipc_usrreq_70_init();
 
 	return 0;
 }
@@ -65,6 +67,7 @@ int compat_70_init(void)
 int compat_70_fini(void)
 {
 
+	uipc_usrreq_70_fini();
 	rtsock_70_fini();
 	compat70_ocreds_valid = false;
 

Index: src/sys/compat/common/uipc_usrreq_70.c
diff -u src/sys/compat/common/uipc_usrreq_70.c:1.1.20.2 src/sys/compat/common/uipc_usrreq_70.c:1.1.20.3
--- src/sys/compat/common/uipc_usrreq_70.c:1.1.20.2	Sat Sep 22 04:56:28 2018
+++ src/sys/compat/common/uipc_usrreq_70.c	Mon Oct 15 11:57:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq_70.c,v 1.1.20.2 2018/09/22 04:56:28 pgoyette Exp $	*/
+/*	$NetBSD: uipc_usrreq_70.c,v 1.1.20.3 2018/10/15 11:57:05 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq_70.c,v 1.1.20.2 2018/09/22 04:56:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq_70.c,v 1.1.20.3 2018/10/15 11:57:05 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -43,11 +43,12 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_usrreq_
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
-struct mbuf *
-compat_70_unp_addsockcred(struct lwp *l, struct mbuf *control)
+int
+compat_70_unp_addsockcred(struct mbuf **ret, struct lwp *l, struct mbuf *control)
 {
 	struct sockcred70 *sc;
 	struct mbuf *m;
@@ -55,8 +56,10 @@ compat_70_unp_addsockcred(struct lwp *l,
 
 	m = sbcreatecontrol1(, SOCKCRED70SIZE(kauth_cred_ngroups(l->l_cred)),
 		SCM_OCREDS, SOL_SOCKET, M_WAITOK);
-	if (m == NULL)
-		return control;
+	if (m == NULL) {
+		*ret = control;
+		return 0;
+	}
 
 	sc = p;
 	sc->sc_uid = kauth_cred_getuid(l->l_cred);
@@ -68,5 +71,23 @@ compat_70_unp_addsockcred(struct lwp *l,
 	for (int i = 0; i < sc->sc_ngroups; i++)
 		sc->sc_groups[i] = kauth_cred_group(l->l_cred, i);
 
-	return m_add(control, m);
+	*ret = m_add(control, m);
+	return 0;
+}
+
+MODULE_SET_HOOK(compat_70_unp_hook, "unp_70", compat_70_unp_addsockcred);
+MODULE_UNSET_HOOK(compat_70_unp_hook);
+
+void
+uipc_usrreq_70_init(void)
+{
+
+	compat_70_unp_hook_set();
+}
+
+void
+uipc_usrreq_70_fini(void)
+{
+
+	compat_70_unp_hook_unset();
 }

Index: src/sys/compat/sys/socket.h
diff -u src/sys/compat/sys/socket.h:1.15 src/sys/compat/sys/socket.h:1.15.2.1
--- src/sys/compat/sys/socket.h:1.15	Sat Jul 29 06:12:50 2017
+++ src/sys/compat/sys/socket.h	Mon Oct 15 11:57:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: socket.h,v 1.15 2017/07/29 06:12:50 maxv Exp $	*/
+/*	$NetBSD: socket.h,v 1.15.2.1 2018/10/15 11:57:05 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
@@ -105,7 +105,10 @@ u_long compat_cvtcmd(u_long cmd);
 int compat_ifioctl(struct socket *, u_long, u_long, void *, struct lwp *);
 int compat43_set_accrights(struct msghdr *, void *, int);
 
-struct mbuf * compat_70_unp_addsockcred(struct lwp *, struct mbuf *);
+int compat_70_unp_addsockcred(struct mbuf **, struct lwp *, struct mbuf *);
+

CVS commit: [pgoyette-compat] src/sys

2018-10-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 15 10:44:28 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: vfs_syscalls_10.c
src/sys/kern [pgoyette-compat]: compat_stub.c vfs_syscalls.c
src/sys/sys [pgoyette-compat]: compat_stub.h vfs_syscalls.h

Log Message:
Convert the openat_10 hook to use the MP-safe mechanism

XXX Still to do: compat70_unp_addsockcred and sysvipc50_sysctl


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/vfs_syscalls_10.c
cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.518.2.1 -r1.518.2.2 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.23.2.2 -r1.23.2.3 src/sys/sys/vfs_syscalls.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/compat/common/vfs_syscalls_10.c
diff -u src/sys/compat/common/vfs_syscalls_10.c:1.1.2.3 src/sys/compat/common/vfs_syscalls_10.c:1.1.2.4
--- src/sys/compat/common/vfs_syscalls_10.c:1.1.2.3	Sat Sep 22 04:56:28 2018
+++ src/sys/compat/common/vfs_syscalls_10.c	Mon Oct 15 10:44:27 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls_10.c,v 1.1.2.3 2018/09/22 04:56:28 pgoyette Exp $	*/
+/* $NetBSD: vfs_syscalls_10.c,v 1.1.2.4 2018/10/15 10:44:27 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_10.c,v 1.1.2.3 2018/09/22 04:56:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_10.c,v 1.1.2.4 2018/10/15 10:44:27 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -40,11 +40,10 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
-static int (*orig_sys_openat_10)(struct pathbuf **);
-
 static int
 real_sys_openat_10(struct pathbuf **pb)
 {
@@ -53,15 +52,17 @@ real_sys_openat_10(struct pathbuf **pb)
 	return (*pb == NULL ? ENOMEM : 0);
 }
 
+MODULE_SET_HOOK(compat_10_openat_hook, "openat_10", real_sys_openat_10);
+MODULE_UNSET_HOOK(compat_10_openat_hook);
+
 void vfs_syscalls_10_init(void)
 {
 
-	orig_sys_openat_10 = vec_sys_openat_10;
-	vec_sys_openat_10 = real_sys_openat_10;
+	compat_10_openat_hook_set();
 }
 
 void vfs_syscalls_10_fini(void)
 {
 
-	vec_sys_openat_10 = orig_sys_openat_10;
+	compat_10_openat_hook_unset();
 }

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.1.2.29 src/sys/kern/compat_stub.c:1.1.2.30
--- src/sys/kern/compat_stub.c:1.1.2.29	Mon Oct 15 09:51:33 2018
+++ src/sys/kern/compat_stub.c	Mon Oct 15 10:44:27 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.1.2.29 2018/10/15 09:51:33 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.1.2.30 2018/10/15 10:44:27 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -193,3 +193,8 @@ struct rnd_ioctl_50_32_hook_t rnd_ioctl_
  */
 struct compat_60_ioctl_hook_t compat_60_ioctl_hook;
 
+/*
+ * Hook for compat_10 openat
+ */
+struct compat_10_openat_hook_t compat_10_openat_hook;
+

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.518.2.1 src/sys/kern/vfs_syscalls.c:1.518.2.2
--- src/sys/kern/vfs_syscalls.c:1.518.2.1	Wed Mar 14 02:24:56 2018
+++ src/sys/kern/vfs_syscalls.c	Mon Oct 15 10:44:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.518.2.1 2018/03/14 02:24:56 pgoyette Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.518.2.2 2018/10/15 10:44:27 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.518.2.1 2018/03/14 02:24:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.518.2.2 2018/10/15 10:44:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -108,6 +108,7 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -141,11 +142,6 @@ static int fd_nameiat(struct lwp *, int,
 static int fd_nameiat_simple_user(struct lwp *, int, const char *,
 namei_simple_flags_t, struct vnode **);
 
-/* Routine for COMPAT_10 handling of NULL pathbuf passed to do_sys_openat */
-
-static int stub_sys_openat_10(struct pathbuf **);
-int (*vec_sys_openat_10)(struct pathbuf **) = stub_sys_openat_10;
-
 /*
  * This table is used to maintain compatibility with 4.3BSD
  * and NetBSD 0.9 mount syscalls - and possibly other systems.
@@ -1639,6 +1635,10 @@ stub_sys_openat_10(struct pathbuf **pb)
 	return 0;
 }
 
+MODULE_CALL_HOOK_DECL(compat_10_openat_hook, f, (struct pathbuf **));
+MODULE_CALL_HOOK(compat_10_openat_hook, f, (struct pathbuf **pb), (pb),
+stub_sys_openat_10(pb));
+
 static int
 do_sys_openat(lwp_t *l, int fdat, const char *path, int flags,
 int mode, int *fd)
@@ -1649,7 +1649,7 @@ do_sys_openat(lwp_t *l, int fdat, const 
 	int error;
 
 	if (path == NULL) 

CVS commit: [pgoyette-compat] src/sys

2018-10-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 15 09:51:34 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_70_mod.c tty_60.c
src/sys/compat/net [pgoyette-compat]: route_70.h
src/sys/kern [pgoyette-compat]: compat_stub.c tty.c tty_ptm.c
uipc_usrreq.c
src/sys/sys [pgoyette-compat]: compat_stub.h module.h tty.h

Log Message:
Convert another hook to the MP-sfe mechanism.

XXX still have three more to convert: openat_10, sysvipc50_sysctl and
XXX compat70_unp_addsockcred


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/sys/compat/common/compat_70_mod.c
cvs rdiff -u -r1.4.16.4 -r1.4.16.5 src/sys/compat/common/tty_60.c
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/net/route_70.h
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.275.2.4 -r1.275.2.5 src/sys/kern/tty.c
cvs rdiff -u -r1.37.16.1 -r1.37.16.2 src/sys/kern/tty_ptm.c
cvs rdiff -u -r1.183.2.3 -r1.183.2.4 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.41.14.13 -r1.41.14.14 src/sys/sys/module.h
cvs rdiff -u -r1.94.2.2 -r1.94.2.3 src/sys/sys/tty.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/compat/common/compat_70_mod.c
diff -u src/sys/compat/common/compat_70_mod.c:1.1.2.10 src/sys/compat/common/compat_70_mod.c:1.1.2.11
--- src/sys/compat/common/compat_70_mod.c:1.1.2.10	Sat Sep 22 04:56:28 2018
+++ src/sys/compat/common/compat_70_mod.c	Mon Oct 15 09:51:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_70_mod.c,v 1.1.2.10 2018/09/22 04:56:28 pgoyette Exp $	*/
+/*	$NetBSD: compat_70_mod.c,v 1.1.2.11 2018/10/15 09:51:33 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.10 2018/09/22 04:56:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.11 2018/10/15 09:51:33 pgoyette Exp $");
 
 #include 
 #include 
@@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: compat_70_mo
 int compat_70_init(void)
 {
 
-	vec_ocreds_valid = true;
+	compat70_ocreds_valid = true;
 	rtsock_70_init();
 
 	return 0;
@@ -66,7 +66,7 @@ int compat_70_fini(void)
 {
 
 	rtsock_70_fini();
-	vec_ocreds_valid = false;
+	compat70_ocreds_valid = false;
 
 	return 0;
 }

Index: src/sys/compat/common/tty_60.c
diff -u src/sys/compat/common/tty_60.c:1.4.16.4 src/sys/compat/common/tty_60.c:1.4.16.5
--- src/sys/compat/common/tty_60.c:1.4.16.4	Tue Sep  4 02:21:58 2018
+++ src/sys/compat/common/tty_60.c	Mon Oct 15 09:51:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty_60.c,v 1.4.16.4 2018/09/04 02:21:58 pgoyette Exp $	*/
+/*	$NetBSD: tty_60.c,v 1.4.16.5 2018/10/15 09:51:33 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tty_60.c,v 1.4.16.4 2018/09/04 02:21:58 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_60.c,v 1.4.16.5 2018/10/15 09:51:33 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: tty_60.c,v 1
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -117,17 +118,23 @@ compat_60_ptmioctl(dev_t dev, u_long cmd
 	}
 }
 
+/* 
+ * Hooks for compat_60 ttioctl and ptmioctl
+ */
+MODULE_SET_HOOK2(compat_60_ioctl_hook, "tty_60", compat_60_ttioctl,
+compat_60_ptmioctl);
+MODULE_UNSET_HOOK2(compat_60_ioctl_hook);
+
+
 void
 kern_tty_60_init(void)
 {
 
-	vec_compat_ttioctl_60 = compat_60_ttioctl;
-	vec_compat_ptmioctl_60 = compat_60_ptmioctl;
+	compat_60_ioctl_hook_set();
 }
 
 void
 kern_tty_60_fini(void)
 {
-	vec_compat_ttioctl_60 = NULL;
-	vec_compat_ptmioctl_60 = stub_compat_ptmioctl_60;
+	compat_60_ioctl_hook_unset();
 }

Index: src/sys/compat/net/route_70.h
diff -u src/sys/compat/net/route_70.h:1.1.2.3 src/sys/compat/net/route_70.h:1.1.2.4
--- src/sys/compat/net/route_70.h:1.1.2.3	Mon Oct 15 04:33:34 2018
+++ src/sys/compat/net/route_70.h	Mon Oct 15 09:51:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: route_70.h,v 1.1.2.3 2018/10/15 04:33:34 pgoyette Exp $	*/
+/*	$NetBSD: route_70.h,v 1.1.2.4 2018/10/15 09:51:33 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -39,6 +39,6 @@
 void rtsock_70_init(void);
 void rtsock_70_fini(void);
 
-extern bool vec_ocreds_valid;
+extern bool compat70_ocreds_valid;
 
 #endif /* !_COMPAT_NET_ROUTE_70_H_ */

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.1.2.28 src/sys/kern/compat_stub.c:1.1.2.29
--- src/sys/kern/compat_stub.c:1.1.2.28	Mon Oct 15 04:33:34 2018
+++ src/sys/kern/compat_stub.c	Mon Oct 15 09:51:33 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.1.2.28 2018/10/15 04:33:34 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.1.2.29 2018/10/15 09:51:33 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, 

CVS commit: [pgoyette-compat] src/sys

2018-10-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 15 04:33:34 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_40_mod.c if_43.c
rtsock_70.c uipc_syscalls_40.c uipc_syscalls_50.c
src/sys/compat/net [pgoyette-compat]: route.h route_70.h
src/sys/kern [pgoyette-compat]: compat_stub.c
src/sys/net [pgoyette-compat]: rtsock.c
src/sys/sys [pgoyette-compat]: compat_stub.h rnd.h
Removed Files:
src/sys/compat/common [pgoyette-compat]: if_40.h if_43.h
src/sys/compat/sys [pgoyette-compat]: if.h

Log Message:
Convert a couple more hooks to the MP-safe mechanism.

While here, clean up some headers and remove any that are now empty.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/compat/common/compat_40_mod.c
cvs rdiff -u -r1.1.2.3 -r0 src/sys/compat/common/if_40.h
cvs rdiff -u -r1.14.2.9 -r1.14.2.10 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.1.20.2 -r0 src/sys/compat/common/if_43.h
cvs rdiff -u -r1.2.2.1 -r1.2.2.2 src/sys/compat/common/rtsock_70.c
cvs rdiff -u -r1.15.2.11 -r1.15.2.12 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.3.56.11 -r1.3.56.12 src/sys/compat/common/uipc_syscalls_50.c
cvs rdiff -u -r1.2 -r1.2.14.1 src/sys/compat/net/route.h
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/net/route_70.h
cvs rdiff -u -r1.1.2.1 -r0 src/sys/compat/sys/if.h
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.238.2.11 -r1.238.2.12 src/sys/net/rtsock.c
cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.49.16.1 -r1.49.16.2 src/sys/sys/rnd.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/compat/common/compat_40_mod.c
diff -u src/sys/compat/common/compat_40_mod.c:1.1.2.6 src/sys/compat/common/compat_40_mod.c:1.1.2.7
--- src/sys/compat/common/compat_40_mod.c:1.1.2.6	Sat Sep 22 04:56:28 2018
+++ src/sys/compat/common/compat_40_mod.c	Mon Oct 15 04:33:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_40_mod.c,v 1.1.2.6 2018/09/22 04:56:28 pgoyette Exp $	*/
+/*	$NetBSD: compat_40_mod.c,v 1.1.2.7 2018/10/15 04:33:34 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_40_mod.c,v 1.1.2.6 2018/09/22 04:56:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_40_mod.c,v 1.1.2.7 2018/10/15 04:33:34 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -50,8 +50,6 @@ __KERNEL_RCSID(0, "$NetBSD: compat_40_mo
 #include 
 #include 
 
-#include 
-
 int
 compat_40_init(void)
 {

Index: src/sys/compat/common/if_43.c
diff -u src/sys/compat/common/if_43.c:1.14.2.9 src/sys/compat/common/if_43.c:1.14.2.10
--- src/sys/compat/common/if_43.c:1.14.2.9	Wed Oct  3 21:52:02 2018
+++ src/sys/compat/common/if_43.c	Mon Oct 15 04:33:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.c,v 1.14.2.9 2018/10/03 21:52:02 pgoyette Exp $	*/
+/*	$NetBSD: if_43.c,v 1.14.2.10 2018/10/15 04:33:34 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.9 2018/10/03 21:52:02 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.10 2018/10/15 04:33:34 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -74,7 +74,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.
 
 #include 
 #include 
-#include 
 #include 
 
 #if defined(COMPAT_43)

Index: src/sys/compat/common/rtsock_70.c
diff -u src/sys/compat/common/rtsock_70.c:1.2.2.1 src/sys/compat/common/rtsock_70.c:1.2.2.2
--- src/sys/compat/common/rtsock_70.c:1.2.2.1	Thu Mar 15 05:10:05 2018
+++ src/sys/compat/common/rtsock_70.c	Mon Oct 15 04:33:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_70.c,v 1.2.2.1 2018/03/15 05:10:05 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_70.c,v 1.2.2.2 2018/10/15 04:33:34 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,13 +30,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_70.c,v 1.2.2.1 2018/03/15 05:10:05 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_70.c,v 1.2.2.2 2018/10/15 04:33:34 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #endif
 
 #include 
+#include 
+
 #include 
 #include 
 
@@ -44,24 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: rtsock_70.c,
 #include 
 #include 
 
-static void (*orig_70_rt_newaddrmsg1)(int, struct ifaddr *);
-
-void
-rtsock_70_init(void)
-{
-
-	orig_70_rt_newaddrmsg1 = vec_70_rt_newaddrmsg1;
-	vec_70_rt_newaddrmsg1 = compat_70_rt_newaddrmsg1;
-}
-
-void
-rtsock_70_fini(void)
-{
-
-	vec_70_rt_newaddrmsg1 = orig_70_rt_newaddrmsg1;
-}
-
-void
+int
 compat_70_rt_newaddrmsg1(int cmd, struct ifaddr *ifa)
 {
 	struct rt_addrinfo info;
@@ -102,10 +87,12 @@ compat_70_rt_newaddrmsg1(int cmd, struct
 
 	m = rt_msg1(ncmd, , , sizeof(ifam));
 	if (m == NULL)
-		return;
+		

CVS commit: [pgoyette-compat] src/sys

2018-10-12 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Oct 12 22:30:54 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_50_mod.c compat_mod.h
rndpseudo_50.c
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_50.c
src/sys/kern [pgoyette-compat]: compat_stub.c kern_rndq.c
src/sys/sys [pgoyette-compat]: compat_stub.h

Log Message:
Use a MP-safe hook for the rnd_ioctl compat_50 calls.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/sys/compat/common/compat_50_mod.c
cvs rdiff -u -r1.1.42.22 -r1.1.42.23 src/sys/compat/common/compat_mod.h
cvs rdiff -u -r1.2.38.1 -r1.2.38.2 src/sys/compat/common/rndpseudo_50.c
cvs rdiff -u -r1.32.16.12 -r1.32.16.13 \
src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.89.16.3 -r1.89.16.4 src/sys/kern/kern_rndq.c
cvs rdiff -u -r1.1.2.38 -r1.1.2.39 src/sys/sys/compat_stub.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/compat/common/compat_50_mod.c
diff -u src/sys/compat/common/compat_50_mod.c:1.1.2.16 src/sys/compat/common/compat_50_mod.c:1.1.2.17
--- src/sys/compat/common/compat_50_mod.c:1.1.2.16	Sun Sep 23 04:31:17 2018
+++ src/sys/compat/common/compat_50_mod.c	Fri Oct 12 22:30:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_50_mod.c,v 1.1.2.16 2018/09/23 04:31:17 pgoyette Exp $	*/
+/*	$NetBSD: compat_50_mod.c,v 1.1.2.17 2018/10/12 22:30:54 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.16 2018/09/23 04:31:17 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.17 2018/10/12 22:30:54 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -85,6 +85,7 @@ compat_50_init(void)
 	puffs_50_init();
 	wsevent_50_init();
 	vnd_50_init();
+	rndpseudo_50_init();
 
 	return error;
 
@@ -105,6 +106,7 @@ compat_50_fini(void)
 {
 	int error = 0;
 
+	rndpseudo_50_fini();
 	vnd_50_fini();
 	wsevent_50_fini();
 	puffs_50_fini();
@@ -146,6 +148,7 @@ compat_50_fini(void)
 	puffs_50_init();
 	wsevent_50_init();
 	vnd_50_init();
+	rndpseudo_50_init();
 
 	return error;
 }

Index: src/sys/compat/common/compat_mod.h
diff -u src/sys/compat/common/compat_mod.h:1.1.42.22 src/sys/compat/common/compat_mod.h:1.1.42.23
--- src/sys/compat/common/compat_mod.h:1.1.42.22	Wed Sep 19 04:12:43 2018
+++ src/sys/compat/common/compat_mod.h	Fri Oct 12 22:30:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.h,v 1.1.42.22 2018/09/19 04:12:43 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.h,v 1.1.42.23 2018/10/12 22:30:54 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -72,6 +72,8 @@ void uipc_syscalls_50_init(void);
 void uipc_syscalls_50_fini(void);
 void vnd_50_init(void);
 void vnd_50_fini(void);
+void rndpseudo_50_init(void);
+void rndpseudo_50_fini(void);
 #endif
 
 #ifdef COMPAT_40

Index: src/sys/compat/common/rndpseudo_50.c
diff -u src/sys/compat/common/rndpseudo_50.c:1.2.38.1 src/sys/compat/common/rndpseudo_50.c:1.2.38.2
--- src/sys/compat/common/rndpseudo_50.c:1.2.38.1	Wed Mar 21 02:01:34 2018
+++ src/sys/compat/common/rndpseudo_50.c	Fri Oct 12 22:30:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: rndpseudo_50.c,v 1.2.38.1 2018/03/21 02:01:34 pgoyette Exp $	*/
+/*	$nETbsD: rndpseudo_50.c,v 1.2.38.1 2018/03/21 02:01:34 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rndpseudo_50.c,v 1.2.38.1 2018/03/21 02:01:34 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rndpseudo_50.c,v 1.2.38.2 2018/10/12 22:30:54 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -40,7 +40,11 @@ __KERNEL_RCSID(0, "$NetBSD: rndpseudo_50
 #include 
 
 #include 
+#include 
+#include 
+
 #include 
+#include 
 
 /*
  * Convert from rndsource_t to rndsource50_t, for the results from
@@ -116,3 +120,20 @@ compat_50_rnd_ioctl(struct file *fp, u_l
 
 	return ret;
 }
+
+MODULE_SET_HOOK(rnd_ioctl_50_hook, "rnd_50", compat_50_rnd_ioctl);
+MODULE_UNSET_HOOK(rnd_ioctl_50_hook);
+
+void
+rndpseudo_50_init(void)
+{
+
+	rnd_ioctl_50_hook_set();
+}
+
+void
+rndpseudo_50_fini(void)
+{
+
+	rnd_ioctl_50_hook_unset();
+}

Index: src/sys/compat/netbsd32/netbsd32_compat_50.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.32.16.12 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.32.16.13
--- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.32.16.12	Wed Oct  3 11:59:21 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_50.c	Fri Oct 12 22:30:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_50.c,v 1.32.16.12 2018/10/03 11:59:21 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_50.c,v 1.32.16.13 2018/10/12 22:30:54 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.

CVS commit: [pgoyette-compat] src/sys/sys

2018-10-12 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Oct 12 10:28:29 UTC 2018

Modified Files:
src/sys/sys [pgoyette-compat]: module_hook.h

Log Message:
Use private-namespace variable ``__hooked'' instead of ``hooked''


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/sys/module_hook.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/sys/module_hook.h
diff -u src/sys/sys/module_hook.h:1.1.2.6 src/sys/sys/module_hook.h:1.1.2.7
--- src/sys/sys/module_hook.h:1.1.2.6	Thu Oct  4 02:24:26 2018
+++ src/sys/sys/module_hook.h	Fri Oct 12 10:28:29 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: module_hook.h,v 1.1.2.6 2018/10/04 02:24:26 pgoyette Exp $	*/
+/* $NetBSD: module_hook.h,v 1.1.2.7 2018/10/12 10:28:29 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -173,18 +173,18 @@ hook ## _ ## which ## _call decl;
 int\
 hook ## _ ## which ## _call decl\
 {\
-	bool hooked;		\
+	bool __hooked;		\
 	int __hook_error, __hook_s;\
 \
 	__hook_s = pserialize_read_enter();			\
-	hooked = hook.hooked;	\
-	if (hooked) {		\
+	__hooked = hook.hooked;	\
+	if (__hooked) {		\
 		membar_consumer();\
 		localcount_acquire();			\
 	}			\
 	pserialize_read_exit(__hook_s);\
 \
-	if (hooked) {		\
+	if (__hooked) {		\
 		__hook_error = (*hook.which)args;		\
 		localcount_release(, ,		\
 		);	\



CVS commit: [pgoyette-compat] src/doc

2018-10-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Oct 12 04:12:07 UTC 2018

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Remove the last item in the need-for-merge section.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.17 src/doc/TODO.compat-module:1.1.2.18
--- src/doc/TODO.compat-module:1.1.2.17	Tue Oct  2 22:00:47 2018
+++ src/doc/TODO.compat-module	Fri Oct 12 04:12:06 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.17 2018/10/02 22:00:47 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.18 2018/10/12 04:12:06 pgoyette Exp $ */
 
 DONE
 
@@ -55,19 +55,13 @@ DONE
 framework, and split version-specific code from baseline code as
 needed.
 
-TODO - Required for branch merge
-
-16. The ieee_80211 compat code needs to be verified to make sure it is
-handling the if43_20 compat routine cvtcmd() correctly.
-
-
 TODO - Not required for branch merge
 
-17. Audit the entire code base for any remaining embedded #ifdef's for
+16. Audit the entire code base for any remaining embedded #ifdef's for
 COMPAT_xx.  When found, move the actual compat code into the compat
 hierarchy and replace originals with indirect (vectored) calls.
 
-18. The rtsock compat code is a disaster, with rtsock_50.c #include-ing
+17. The rtsock compat code is a disaster, with rtsock_50.c #include-ing
 the main rtsock.c code with various manipulations of the COMPAT_50
 macro.  Once rtsock is separated, compat_14 references to rtsock_50
 routines needs to be verified.
@@ -77,7 +71,7 @@ TODO - Not required for branch merge
 the compat code can be executed, neither on the branch nor on
 HEAD.
 
-19. The compat_60 module still needs some work for XEN systems.  We
+18. The compat_60 module still needs some work for XEN systems.  We
 probably need some build infrastructure changes to ensure that
 XEN (and, for i386, XEN-PAE) modules are build with the correct
 macros defined and with -I directories specified in the same order
@@ -85,7 +79,7 @@ TODO - Not required for branch merge
 prevents loading of micro-code updates for amd64 processors running
 XEN kernels.  This limitation also exists on HEAD.
 
-20. There seems to be quite a bit of MD compat_xx code, in the various
+19. There seems to be quite a bit of MD compat_xx code, in the various
 sys/arch/ directories.  I haven't yet looked at any of this.  But it
 seems to me that the MI compat build infrastructure should have some
 mechanism to "reach over" to the MD code, #include a Makefile.inc file,
@@ -103,12 +97,12 @@ TODO - Not required for branch merge
 into the monolithic COMPAT module on HEAD.  Thus, its absence from
 any of the version-specific modules is not a regression.
 
-21. For compat_50, in addition to rtsock there are some things in dev/gpio
+20. For compat_50, in addition to rtsock there are some things in dev/gpio
 and dev/wscons/wsmux that I haven't been able to cleanly separate.
 These items are not currently included in the monolithic COMPAT module
 on HEAD, so lack of integration on the branch is not a regression.
 
-22. Find all the remaining dependencies on the compat_utils routines and
+21. Find all the remaining dependencies on the compat_utils routines and
 deal with them appropriately.  For now, we simply ensure that they
 are included in every kernel via 'options COMPAT_UTILS' in file
 sys/conf/std



CVS commit: [pgoyette-compat] src/sys/sys

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Oct  4 02:24:26 UTC 2018

Modified Files:
src/sys/sys [pgoyette-compat]: module_hook.h

Log Message:
Also in the UNSET_HOOK2 case, release the mutex before destroying it.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/sys/module_hook.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/sys/module_hook.h
diff -u src/sys/sys/module_hook.h:1.1.2.5 src/sys/sys/module_hook.h:1.1.2.6
--- src/sys/sys/module_hook.h:1.1.2.5	Thu Oct  4 01:56:03 2018
+++ src/sys/sys/module_hook.h	Thu Oct  4 02:24:26 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: module_hook.h,v 1.1.2.5 2018/10/04 01:56:03 pgoyette Exp $	*/
+/* $NetBSD: module_hook.h,v 1.1.2.6 2018/10/04 02:24:26 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -158,6 +158,8 @@ static void (hook ## _unset)(void)\
 	/* Wait for existing localcount references to drain.  */\
 	localcount_drain(, , );	\
 \
+	/* Release the mutex and clean up all resources */	\
+	mutex_exit();	\
 	localcount_fini();\
 	cv_destroy();	\
 	mutex_destroy();\



CVS commit: [pgoyette-compat] src/sys/modules/compat_netbsd32

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Oct  4 02:20:29 UTC 2018

Modified Files:
src/sys/modules/compat_netbsd32 [pgoyette-compat]: Makefile

Log Message:
Add missing file to the build


To generate a diff of this commit:
cvs rdiff -u -r1.20.12.14 -r1.20.12.15 \
src/sys/modules/compat_netbsd32/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_netbsd32/Makefile
diff -u src/sys/modules/compat_netbsd32/Makefile:1.20.12.14 src/sys/modules/compat_netbsd32/Makefile:1.20.12.15
--- src/sys/modules/compat_netbsd32/Makefile:1.20.12.14	Thu Sep 27 02:44:24 2018
+++ src/sys/modules/compat_netbsd32/Makefile	Thu Oct  4 02:20:29 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20.12.14 2018/09/27 02:44:24 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.20.12.15 2018/10/04 02:20:29 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -28,6 +28,7 @@ SRCS+=	netbsd32_core.c netbsd32_event.c
 SRCS+=	netbsd32_exec_elf32.c
 SRCS+=	netbsd32_execve.c netbsd32_fs.c
 SRCS+=	netbsd32_ioctl.c
+SRCS+=	netbsd32_kern_proc.c
 SRCS+=	netbsd32_lwp.c netbsd32_netbsd.c
 SRCS+=	netbsd32_select.c
 SRCS+=	netbsd32_sem.c netbsd32_signal.c



CVS commit: [pgoyette-compat] src/sys/sys

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Oct  4 01:56:03 UTC 2018

Modified Files:
src/sys/sys [pgoyette-compat]: module_hook.h

Log Message:
Grab the mutex for UNSET_HOOK2 (fixed previously for UNSET_HOOK)


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/sys/module_hook.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/sys/module_hook.h
diff -u src/sys/sys/module_hook.h:1.1.2.4 src/sys/sys/module_hook.h:1.1.2.5
--- src/sys/sys/module_hook.h:1.1.2.4	Sat Sep 29 21:36:15 2018
+++ src/sys/sys/module_hook.h	Thu Oct  4 01:56:03 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: module_hook.h,v 1.1.2.4 2018/09/29 21:36:15 pgoyette Exp $	*/
+/* $NetBSD: module_hook.h,v 1.1.2.5 2018/10/04 01:56:03 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -146,6 +146,9 @@ static void (hook ## _unset)(void)\
 	KASSERT(hook.f1);	\
 	KASSERT(hook.f2);	\
 \
+	/* Grab the mutex */	\
+	mutex_enter();	\
+\
 	/* Prevent new localcount_acquire calls.  */		\
 	hook.hooked = false;	\
 \



CVS commit: [pgoyette-compat] src/sys/modules/compat_raid_80

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Oct  4 01:55:17 UTC 2018

Modified Files:
src/sys/modules/compat_raid_80 [pgoyette-compat]: Makefile

Log Message:
Don't include common compat_80 code in the raid-speific module


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_raid_80/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_raid_80/Makefile
diff -u src/sys/modules/compat_raid_80/Makefile:1.1.2.1 src/sys/modules/compat_raid_80/Makefile:1.1.2.2
--- src/sys/modules/compat_raid_80/Makefile:1.1.2.1	Sat Sep 22 22:21:46 2018
+++ src/sys/modules/compat_raid_80/Makefile	Thu Oct  4 01:55:17 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.1 2018/09/22 22:21:46 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.2 2018/10/04 01:55:17 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -8,8 +8,6 @@ KMOD=	compat_raid_80
 
 CPPFLAGS+=	-DCOMPAT_80
 
-SRCS+=	compat_80_mod.c
-
 .PATH:	${S}/dev/raidframe
 
 SRCS+=	rf_compat80.c 



CVS commit: [pgoyette-compat] src/sys/kern

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Oct  3 22:53:52 UTC 2018

Modified Files:
src/sys/kern [pgoyette-compat]: kern_module.c

Log Message:
Better diagnostic message


To generate a diff of this commit:
cvs rdiff -u -r1.130.2.23 -r1.130.2.24 src/sys/kern/kern_module.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_module.c
diff -u src/sys/kern/kern_module.c:1.130.2.23 src/sys/kern/kern_module.c:1.130.2.24
--- src/sys/kern/kern_module.c:1.130.2.23	Sun Sep  9 11:54:10 2018
+++ src/sys/kern/kern_module.c	Wed Oct  3 22:53:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.130.2.23 2018/09/09 11:54:10 pgoyette Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.130.2.24 2018/10/03 22:53:52 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.130.2.23 2018/09/09 11:54:10 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.130.2.24 2018/10/03 22:53:52 pgoyette Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -1453,8 +1453,8 @@ module_fetch_info(module_t *mod)
 		return error;
 	}
 	if (size != sizeof(modinfo_t **)) {
-		module_error("`link_set_modules' section wrong size %zu != %zu",
-		size, sizeof(modinfo_t **));
+		module_error("`link_set_modules' section wrong size "
+		"(got %zu, wanted %zu)", size, sizeof(modinfo_t **));
 		return ENOEXEC;
 	}
 	mod->mod_info = *(modinfo_t **)addr;



CVS commit: [pgoyette-compat] src/sys/modules

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Oct  3 22:50:51 UTC 2018

Modified Files:
src/sys/modules/compat_50 [pgoyette-compat]: Makefile
src/sys/modules/compat_80 [pgoyette-compat]: Makefile

Log Message:
There are version-specific raid modules so don't include their code in
the "generic" version-specific module.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/sys/modules/compat_50/Makefile
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/modules/compat_80/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/compat_50/Makefile
diff -u src/sys/modules/compat_50/Makefile:1.1.2.10 src/sys/modules/compat_50/Makefile:1.1.2.11
--- src/sys/modules/compat_50/Makefile:1.1.2.10	Sun Sep 23 01:33:25 2018
+++ src/sys/modules/compat_50/Makefile	Wed Oct  3 22:50:50 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.10 2018/09/23 01:33:25 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.11 2018/10/03 22:50:50 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -14,10 +14,6 @@ SRCS+=	vfs_syscalls_50.c uipc_syscalls_5
 SRCS+=	rndpseudo_50.c clockctl_50.c if_spppsubr50.c
 SRCS+=	rtsock_50.c
 
-.PATH:	${S}/dev/raidframe
-
-SRCS+=	rf_compat50.c
-
 .PATH:	${S}/fs/puffs
 
 SRCS+=	puffs_compat.c

Index: src/sys/modules/compat_80/Makefile
diff -u src/sys/modules/compat_80/Makefile:1.1.2.3 src/sys/modules/compat_80/Makefile:1.1.2.4
--- src/sys/modules/compat_80/Makefile:1.1.2.3	Tue Apr  3 08:29:44 2018
+++ src/sys/modules/compat_80/Makefile	Wed Oct  3 22:50:50 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.3 2018/04/03 08:29:44 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.4 2018/10/03 22:50:50 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -11,8 +11,4 @@ CPPFLAGS+=	-DCOMPAT_80
 SRCS+=	compat_80_mod.c
 SRCS+=	kern_mod_80.c
 
-.PATH:	${S}/dev/raidframe
-
-SRCS+=	rf_compat80.c 
-
 .include 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Oct  3 21:52:02 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: if_43.c if_43.h

Log Message:
Don't define if_43_{init,fini}() in multiple .h files.


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.8 -r1.14.2.9 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.1.20.1 -r1.1.20.2 src/sys/compat/common/if_43.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/compat/common/if_43.c
diff -u src/sys/compat/common/if_43.c:1.14.2.8 src/sys/compat/common/if_43.c:1.14.2.9
--- src/sys/compat/common/if_43.c:1.14.2.8	Wed Oct  3 21:27:14 2018
+++ src/sys/compat/common/if_43.c	Wed Oct  3 21:52:02 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.c,v 1.14.2.8 2018/10/03 21:27:14 pgoyette Exp $	*/
+/*	$NetBSD: if_43.c,v 1.14.2.9 2018/10/03 21:52:02 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.8 2018/10/03 21:27:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.9 2018/10/03 21:52:02 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -73,6 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.
 #include 
 
 #include 
+#include 
 #include 
 #include 
 

Index: src/sys/compat/common/if_43.h
diff -u src/sys/compat/common/if_43.h:1.1.20.1 src/sys/compat/common/if_43.h:1.1.20.2
--- src/sys/compat/common/if_43.h:1.1.20.1	Wed Oct  3 21:27:14 2018
+++ src/sys/compat/common/if_43.h	Wed Oct  3 21:52:02 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.h,v 1.1.20.1 2018/10/03 21:27:14 pgoyette Exp $	*/
+/*	$NetBSD: if_43.h,v 1.1.20.2 2018/10/03 21:52:02 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -36,9 +36,6 @@
 extern u_long (*vec_compat_cvtcmd)(u_long); 
 extern int (*vec_compat_ifioctl)(struct socket *, u_long, u_long, 
 void *, struct lwp *);
-
-int if_43_init(void);
-int if_43_fini(void);
 #endif
 
 #endif /* !_COMPAT_IF_43_H_ */



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Oct  3 21:27:14 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: if_43.c if_43.h

Log Message:
Make if_43_{init,fini} return an int, for consistency with all the
related *_{init,fini} routines.


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.7 -r1.14.2.8 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.1 -r1.1.20.1 src/sys/compat/common/if_43.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/compat/common/if_43.c
diff -u src/sys/compat/common/if_43.c:1.14.2.7 src/sys/compat/common/if_43.c:1.14.2.8
--- src/sys/compat/common/if_43.c:1.14.2.7	Sun Sep 30 01:45:49 2018
+++ src/sys/compat/common/if_43.c	Wed Oct  3 21:27:14 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.c,v 1.14.2.7 2018/09/30 01:45:49 pgoyette Exp $	*/
+/*	$NetBSD: if_43.c,v 1.14.2.8 2018/10/03 21:27:14 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.7 2018/09/30 01:45:49 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.8 2018/10/03 21:27:14 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -301,17 +301,19 @@ compat_ifioctl(struct socket *so, u_long
 MODULE_SET_HOOK2(if_43_hook, "if_43", do_compat_cvtcmd, compat_ifioctl);
 MODULE_UNSET_HOOK2(if_43_hook);
 
-void
+int
 if_43_init(void)
 {
 
 	if_43_hook_set();
+	return 0;
 }
 
-void
+int
 if_43_fini(void)
 {
 
 	if_43_hook_unset();
+	return 0;
 }
 #endif /* defined(COMPAT_43) */

Index: src/sys/compat/common/if_43.h
diff -u src/sys/compat/common/if_43.h:1.1 src/sys/compat/common/if_43.h:1.1.20.1
--- src/sys/compat/common/if_43.h:1.1	Sat Nov  5 23:30:22 2016
+++ src/sys/compat/common/if_43.h	Wed Oct  3 21:27:14 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.h,v 1.1 2016/11/05 23:30:22 pgoyette Exp $	*/
+/*	$NetBSD: if_43.h,v 1.1.20.1 2018/10/03 21:27:14 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -37,8 +37,8 @@ extern u_long (*vec_compat_cvtcmd)(u_lon
 extern int (*vec_compat_ifioctl)(struct socket *, u_long, u_long, 
 void *, struct lwp *);
 
-void if_43_init(void);
-void if_43_fini(void);
+int if_43_init(void);
+int if_43_fini(void);
 #endif
 
 #endif /* !_COMPAT_IF_43_H_ */



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Oct  3 11:59:21 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_09.c
netbsd32_compat_12.c netbsd32_compat_13.c netbsd32_compat_16.c
netbsd32_compat_20.c netbsd32_compat_30.c netbsd32_compat_40.c
netbsd32_compat_50.c netbsd32_compat_60.c

Log Message:
Normalize the required lists.  Each compat_netbsd32_xx needs the
non-32bit module of the same version _and_ the 32-bit module for
the next higher version.


To generate a diff of this commit:
cvs rdiff -u -r1.18.86.5 -r1.18.86.6 \
src/sys/compat/netbsd32/netbsd32_compat_09.c
cvs rdiff -u -r1.33.36.8 -r1.33.36.9 \
src/sys/compat/netbsd32/netbsd32_compat_12.c
cvs rdiff -u -r1.26.28.8 -r1.26.28.9 \
src/sys/compat/netbsd32/netbsd32_compat_13.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/netbsd32/netbsd32_compat_16.c
cvs rdiff -u -r1.36.10.9 -r1.36.10.10 \
src/sys/compat/netbsd32/netbsd32_compat_20.c
cvs rdiff -u -r1.31.16.12 -r1.31.16.13 \
src/sys/compat/netbsd32/netbsd32_compat_30.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/netbsd32/netbsd32_compat_40.c
cvs rdiff -u -r1.32.16.11 -r1.32.16.12 \
src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.3.2.8 -r1.3.2.9 src/sys/compat/netbsd32/netbsd32_compat_60.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_compat_09.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.5 src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.6
--- src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.5	Tue Sep 11 21:18:32 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_09.c	Wed Oct  3 11:59:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_09.c,v 1.18.86.5 2018/09/11 21:18:32 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_09.c,v 1.18.86.6 2018/10/03 11:59:21 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18.86.5 2018/09/11 21:18:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18.86.6 2018/10/03 11:59:21 pgoyette Exp $");
 
 #include 
 #include 
@@ -100,7 +100,7 @@ static struct syscall_package compat_net
 { 0, 0, NULL }
 };
 
-MODULE(MODULE_CLASS_EXEC, compat_netbsd32_09, "compat_netbsd32,compat_09");
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_09, "compat_netbsd32_12,compat_09");
 
 static int
 compat_netbsd32_09_modcmd(modcmd_t cmd, void *arg)

Index: src/sys/compat/netbsd32/netbsd32_compat_12.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.8 src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.9
--- src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.8	Wed Oct  3 07:03:17 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_12.c	Wed Oct  3 11:59:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.8 2018/10/03 07:03:17 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.9 2018/10/03 11:59:21 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.8 2018/10/03 07:03:17 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.9 2018/10/03 11:59:21 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -229,8 +229,7 @@ static struct syscall_package compat_net
 	{ 0, 0, NULL }
 };
 
-MODULE(MODULE_CLASS_EXEC, compat_netbsd32_12,
-"compat_netbsd32,compat_netbsd32_13,compat_12");
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_12, "compat_netbsd32_13,compat_12");
 
 static int
 compat_netbsd32_12_modcmd(modcmd_t cmd, void *arg)

Index: src/sys/compat/netbsd32/netbsd32_compat_13.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.8 src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.9
--- src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.8	Sat Sep 29 07:52:39 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_13.c	Wed Oct  3 11:59:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_13.c,v 1.26.28.8 2018/09/29 07:52:39 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_13.c,v 1.26.28.9 2018/10/03 11:59:21 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.26.28.8 2018/09/29 07:52:39 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.26.28.9 2018/10/03 11:59:21 pgoyette Exp $");
 
 #include 
 #include 
@@ -104,8 +104,7 @@ static struct syscall_package compat_net
 	{ 0, 0, NULL }
 }; 
 
-MODULE(MODULE_CLASS_EXEC, compat_netbsd32_13,
-"compat_netbsd32,compat_13,compat_netbsd32_16");
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_13, "compat_13,compat_netbsd32_16");
 
 static int
 compat_netbsd32_13_modcmd(modcmd_t cmd, void *arg)

Index: 

CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Oct  3 07:03:17 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_12.c
netbsd32_compat_16.c netbsd32_compat_20.c netbsd32_compat_30.c
netbsd32_compat_40.c netbsd32_compat_50.c netbsd32_compat_60.c

Log Message:
Make sure that each version-specific compat_netbsd32_xx module depends
on all higher-version-specific modules, similar to the non-32bit
compat_xx modules.


To generate a diff of this commit:
cvs rdiff -u -r1.33.36.7 -r1.33.36.8 \
src/sys/compat/netbsd32/netbsd32_compat_12.c
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/netbsd32/netbsd32_compat_16.c
cvs rdiff -u -r1.36.10.8 -r1.36.10.9 \
src/sys/compat/netbsd32/netbsd32_compat_20.c
cvs rdiff -u -r1.31.16.11 -r1.31.16.12 \
src/sys/compat/netbsd32/netbsd32_compat_30.c
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/netbsd32/netbsd32_compat_40.c
cvs rdiff -u -r1.32.16.10 -r1.32.16.11 \
src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.3.2.7 -r1.3.2.8 src/sys/compat/netbsd32/netbsd32_compat_60.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_compat_12.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.7 src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.8
--- src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.7	Tue Sep 11 21:18:32 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_12.c	Wed Oct  3 07:03:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.7 2018/09/11 21:18:32 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.8 2018/10/03 07:03:17 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.7 2018/09/11 21:18:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.8 2018/10/03 07:03:17 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -229,7 +229,8 @@ static struct syscall_package compat_net
 	{ 0, 0, NULL }
 };
 
-MODULE(MODULE_CLASS_EXEC, compat_netbsd32_12, "compat_netbsd32,compat_12");
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_12,
+"compat_netbsd32,compat_netbsd32_13,compat_12");
 
 static int
 compat_netbsd32_12_modcmd(modcmd_t cmd, void *arg)

Index: src/sys/compat/netbsd32/netbsd32_compat_16.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_16.c:1.1.2.3 src/sys/compat/netbsd32/netbsd32_compat_16.c:1.1.2.4
--- src/sys/compat/netbsd32/netbsd32_compat_16.c:1.1.2.3	Fri Sep 14 08:38:37 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_16.c	Wed Oct  3 07:03:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_16.c,v 1.1.2.3 2018/09/14 08:38:37 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_16.c,v 1.1.2.4 2018/10/03 07:03:17 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_16.c,v 1.1.2.3 2018/09/14 08:38:37 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_16.c,v 1.1.2.4 2018/10/03 07:03:17 pgoyette Exp $");
 
 #include 
 #include 
@@ -53,7 +53,8 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 
 struct uvm_object *emul_netbsd32_object;
 
-MODULE(MODULE_CLASS_EXEC, compat_netbsd32_16, "compat_netbsd32,compat_16");
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_16,
+"compat_netbsd32,compat_netbsd32_20,compat_16");
 
 static int
 compat_netbsd32_16_modcmd(modcmd_t cmd, void *arg)

Index: src/sys/compat/netbsd32/netbsd32_compat_20.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_20.c:1.36.10.8 src/sys/compat/netbsd32/netbsd32_compat_20.c:1.36.10.9
--- src/sys/compat/netbsd32/netbsd32_compat_20.c:1.36.10.8	Tue Sep 11 21:18:32 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_20.c	Wed Oct  3 07:03:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_20.c,v 1.36.10.8 2018/09/11 21:18:32 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_20.c,v 1.36.10.9 2018/10/03 07:03:17 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.36.10.8 2018/09/11 21:18:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.36.10.9 2018/10/03 07:03:17 pgoyette Exp $");
 
 #include 
 #include 
@@ -232,7 +232,8 @@ static struct syscall_package compat_net
 	{ 0, 0, NULL }
 };
 
-MODULE(MODULE_CLASS_EXEC, compat_netbsd32_20, "compat_netbsd32,compat_20");
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_20,
+"compat_netbsd32,compat_netbsd32_30,compat_20");
 
 static int
 compat_netbsd32_20_modcmd(modcmd_t cmd, void *arg)

Index: src/sys/compat/netbsd32/netbsd32_compat_30.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_30.c:1.31.16.11 src/sys/compat/netbsd32/netbsd32_compat_30.c:1.31.16.12
--- 

CVS commit: [pgoyette-compat] src/doc

2018-10-02 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Oct  2 22:00:47 UTC 2018

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Update


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/TODO.compat-module

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.16 src/doc/TODO.compat-module:1.1.2.17
--- src/doc/TODO.compat-module:1.1.2.16	Sun Sep 30 01:48:27 2018
+++ src/doc/TODO.compat-module	Tue Oct  2 22:00:47 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.16 2018/09/30 01:48:27 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.17 2018/10/02 22:00:47 pgoyette Exp $ */
 
 DONE
 
@@ -51,14 +51,12 @@ DONE
 14. Cleaned up some previous vectored routines (related to if_43.c) to
 use the MP-safe mechanism.
 
+15. Organized netbsd32 machine-dependent code to fit a common build
+framework, and split version-specific code from baseline code as
+needed.
 
 TODO - Required for branch merge
 
-15.  Need to finish cleaning up the netbsd32 machine-dependent code, since
-the MI code assumes that there's MD file available.  This is done, but
-there's still an issue with the compat_netbsd32 for sparc64 - it wants
-to reference emul_sunos but doesn't include sunos_exec.c in the build.
-
 16. The ieee_80211 compat code needs to be verified to make sure it is
 handling the if43_20 compat routine cvtcmd() correctly.
 



CVS commit: [pgoyette-compat] src/sys/arch/sparc64/sparc64

2018-10-02 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Oct  2 22:00:15 UTC 2018

Modified Files:
src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep_13.c
netbsd32_machdep_16.c

Log Message:
Remove conditional compilation based on COMPAT_SUNOS - just update the
sf_scp field regardless.  We've previously removed the comparison that
checks if a lwp's emul is emul_sunos, so now we can also remove the
include for "opt_sunos.h"


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c \
src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c

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/sparc64/sparc64/netbsd32_machdep_13.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c:1.1.2.1 src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c:1.1.2.2
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c:1.1.2.1	Sun Sep 30 00:17:55 2018
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c	Tue Oct  2 22:00:15 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep_13.c,v 1.1.2.1 2018/09/30 00:17:55 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep_13.c,v 1.1.2.2 2018/10/02 22:00:15 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,11 +27,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_13.c,v 1.1.2.1 2018/09/30 00:17:55 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_13.c,v 1.1.2.2 2018/10/02 22:00:15 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
-#include "opt_compat_sunos.h"
 #include "opt_modular.h"
 #include "opt_execfmt.h"
 #include "firm_events.h"
Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c:1.1.2.1 src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c:1.1.2.2
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c:1.1.2.1	Sun Sep 30 00:17:55 2018
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c	Tue Oct  2 22:00:15 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep_16.c,v 1.1.2.1 2018/09/30 00:17:55 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep_16.c,v 1.1.2.2 2018/10/02 22:00:15 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,11 +27,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.1.2.1 2018/09/30 00:17:55 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.1.2.2 2018/10/02 22:00:15 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
-#include "opt_compat_sunos.h"
 #include "opt_modular.h"
 #include "opt_execfmt.h"
 #include "firm_events.h"
@@ -153,9 +152,7 @@ netbsd32_sendsig_sigcontext(const ksigin
 	 */
 	sf.sf_signo = sig;
 	sf.sf_code = (u_int)ksi->ksi_trap;
-#if defined(COMPAT_SUNOS) || defined(MODULAR)
 	sf.sf_scp = (u_long)>sf_sc;
-#endif
 	sf.sf_addr = 0;			/* XXX */
 
 	/*



  1   2   3   4   5   6   >