CVS commit: src/sys/compat/linux/arch/m68k

2017-02-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  3 07:54:39 UTC 2017

Modified Files:
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.101 -r1.102 \
src/sys/compat/linux/arch/m68k/linux_syscallargs.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/linux/arch/m68k/linux_syscall.h
diff -u src/sys/compat/linux/arch/m68k/linux_syscall.h:1.102 src/sys/compat/linux/arch/m68k/linux_syscall.h:1.103
--- src/sys/compat/linux/arch/m68k/linux_syscall.h:1.102	Mon Jan 16 00:11:09 2017
+++ src/sys/compat/linux/arch/m68k/linux_syscall.h	Fri Feb  3 07:54:39 2017
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.102 2017/01/16 00:11:09 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.103 2017/02/03 07:54:39 martin Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.91 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.92 2017/02/03 07:54:26 martin Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -720,6 +720,9 @@
 /* syscall: "pipe2" ret: "int" args: "int *" "int" */
 #define	LINUX_SYS_pipe2	327
 
-#define	LINUX_SYS_MAXSYSCALL	337
+/* syscall: "accept4" ret: "int" args: "int" "struct osockaddr *" "int *" "int" */
+#define	LINUX_SYS_accept4	361
+
+#define	LINUX_SYS_MAXSYSCALL	362
 #define	LINUX_SYS_NSYSENT	512
 #endif /* _LINUX_SYS_SYSCALL_H_ */
Index: src/sys/compat/linux/arch/m68k/linux_syscalls.c
diff -u src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.102 src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.103
--- src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.102	Mon Jan 16 00:11:09 2017
+++ src/sys/compat/linux/arch/m68k/linux_syscalls.c	Fri Feb  3 07:54:39 2017
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.102 2017/01/16 00:11:09 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.103 2017/02/03 07:54:39 martin Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.91 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.92 2017/02/03 07:54:26 martin Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.102 2017/01/16 00:11:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.103 2017/02/03 07:54:39 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -391,31 +391,31 @@ const char *const linux_syscallnames[] =
 	/* 334 */	"#334 (unimplemented get_thread_area)",
 	/* 335 */	"#335 (unimplemented atomic_cmpxchg_32)",
 	/* 336 */	"#336 (unimplemented atomic_barrier)",
-	/* 337 */	"# filler",
-	/* 338 */	"# filler",
-	/* 339 */	"# filler",
-	/* 340 */	"# filler",
-	/* 341 */	"# filler",
-	/* 342 */	"# filler",
-	/* 343 */	"# filler",
-	/* 344 */	"# filler",
-	/* 345 */	"# filler",
-	/* 346 */	"# filler",
-	/* 347 */	"# filler",
-	/* 348 */	"# filler",
-	/* 349 */	"# filler",
-	/* 350 */	"# filler",
-	/* 351 */	"# filler",
-	/* 352 */	"# filler",
-	/* 353 */	"# filler",
-	/* 354 */	"# filler",
-	/* 355 */	"# filler",
-	/* 356 */	"# filler",
-	/* 357 */	"# filler",
-	/* 358 */	"# filler",
-	/* 359 */	"# filler",
-	/* 360 */	"# filler",
-	/* 361 */	"# filler",
+	/* 337 */	"#337 (unimplemented)",
+	/* 338 */	"#338 (unimplemented)",
+	/* 339 */	"#339 (unimplemented)",
+	/* 340 */	"#340 (unimplemented)",
+	/* 341 */	"#341 (unimplemented)",
+	/* 342 */	"#342 (unimplemented)",
+	/* 343 */	"#343 (unimplemented)",
+	/* 344 */	"#344 (unimplemented)",
+	/* 345 */	"#345 (unimplemented)",
+	/* 346 */	"#346 (unimplemented)",
+	/* 347 */	"#347 (unimplemented)",
+	/* 348 */	"#348 (unimplemented)",
+	/* 349 */	"#349 (unimplemented)",
+	/* 350 */	"#350 (unimplemented)",
+	/* 351 */	"#351 (unimplemented)",
+	/* 352 */	"#352 (unimplemented)",
+	/* 353 */	"#353 (unimplemented)",
+	/* 354 */	"#354 (unimplemented)",
+	/* 355 */	"#355 (unimplemented)",
+	/* 356 */	"#356 (unimplemented)",
+	/* 357 */	"#357 (unimplemented)",
+	/* 358 */	"#358 (unimplemented)",
+	/* 359 */	"#359 (unimplemented)",
+	/* 360 */	"#360 (unimplemented)",
+	/* 361 */	"accept4",
 	/* 362 */	"# filler",
 	/* 363 */	"# filler",
 	/* 364 */	"# filler",
@@ -929,31 +929,31 @@ const char *const altlinux_syscallnames[
 	/* 334 */	NULL, /* unimplemented get_thread_area */
 	/* 335 */	NULL, /* unimplemented atomic_cmpxchg_32 */
 	/* 336 */	NULL, /* unimplemented atomic_barrier */
-	/* 337 */	NULL, /* filler */
-	/* 338 */	NULL, /* filler */
-	/* 339 */	NULL, /* filler */
-	/* 340 */	NULL, /* filler */
-	/* 341 */	NULL, /* filler */
-	/* 342 */	NULL, /* fille

CVS commit: src/sys/compat/linux/arch/m68k

2017-02-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  3 07:54:26 UTC 2017

Modified Files:
src/sys/compat/linux/arch/m68k: syscalls.master

Log Message:
Add accept4


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/arch/m68k/syscalls.master

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/arch/m68k/syscalls.master
diff -u src/sys/compat/linux/arch/m68k/syscalls.master:1.91 src/sys/compat/linux/arch/m68k/syscalls.master:1.92
--- src/sys/compat/linux/arch/m68k/syscalls.master:1.91	Mon Jan  2 16:32:09 2017
+++ src/sys/compat/linux/arch/m68k/syscalls.master	Fri Feb  3 07:54:26 2017
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.91 2017/01/02 16:32:09 manu Exp $
+	$NetBSD: syscalls.master,v 1.92 2017/02/03 07:54:26 martin Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -558,3 +558,31 @@
 334	UNIMPL		get_thread_area
 335	UNIMPL		atomic_cmpxchg_32
 336	UNIMPL		atomic_barrier
+337	UNIMPL
+338	UNIMPL
+339	UNIMPL
+340	UNIMPL
+341	UNIMPL
+342	UNIMPL
+343	UNIMPL
+344	UNIMPL
+345	UNIMPL
+346	UNIMPL
+347	UNIMPL
+348	UNIMPL
+349	UNIMPL
+350	UNIMPL
+351	UNIMPL
+352	UNIMPL
+353	UNIMPL
+354	UNIMPL
+355	UNIMPL
+356	UNIMPL
+357	UNIMPL
+358	UNIMPL
+359	UNIMPL
+360	UNIMPL
+361	STD		{ int|linux_sys||accept4(int s, \
+			struct osockaddr *name, \
+			int *anamelen, int flags); }
+



CVS commit: src/sys/compat/linux/arch

2017-02-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  3 06:07:29 UTC 2017

Modified Files:
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c

Log Message:
Regen for accept4


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.102 -r1.103 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.104 -r1.105 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/linux/arch/arm/linux_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/linux/arch/alpha/linux_syscall.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.103 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.104
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.103	Mon Jan 16 00:11:09 2017
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Fri Feb  3 06:07:29 2017
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.103 2017/01/16 00:11:09 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.104 2017/02/03 06:07:29 martin Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.92 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.93 2017/02/03 06:06:08 martin Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -660,6 +660,9 @@
 /* syscall: "pipe2" ret: "int" args: "int *" "int" */
 #define	LINUX_SYS_pipe2	488
 
-#define	LINUX_SYS_MAXSYSCALL	494
+/* syscall: "accept4" ret: "int" args: "int" "struct osockaddr *" "int *" "int" */
+#define	LINUX_SYS_accept4	502
+
+#define	LINUX_SYS_MAXSYSCALL	503
 #define	LINUX_SYS_NSYSENT	512
 #endif /* _LINUX_SYS_SYSCALL_H_ */
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.103 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.104
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.103	Mon Jan 16 00:11:09 2017
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Fri Feb  3 06:07:29 2017
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.103 2017/01/16 00:11:09 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.104 2017/02/03 06:07:29 martin Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.92 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.93 2017/02/03 06:06:08 martin Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.103 2017/01/16 00:11:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.104 2017/02/03 06:07:29 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"
@@ -1969,8 +1969,10 @@ struct sysent linux_sysent[] = {
 		.sy_call = linux_sys_nosys,
 	},		/* 501 = filler */
 	{
-		.sy_call = linux_sys_nosys,
-	},		/* 502 = filler */
+		ns(struct linux_sys_accept4_args),
+		.sy_flags = SYCALL_ARG_PTR,
+		.sy_call = (sy_call_t *)linux_sys_accept4
+	},		/* 502 = accept4 */
 	{
 		.sy_call = linux_sys_nosys,
 	},		/* 503 = filler */

Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.102 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.103
--- src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.102	Mon Jan 16 00:11:09 2017
+++ src/sys/compat/linux/arch/alpha/linux_syscallargs.h	Fri Feb  3 06:07:29 2017
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.102 2017/01/16 00:11:09 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.103 2017/02/03 06:07:29 martin Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.92 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.93 2017/02/03 06:06:08 martin Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -1127,6 +1127,14 @@ struct linux_sys_pipe2_args {
 };
 check_syscall_args(linux_sys_pipe2)
 
+struct linux_sys_accept4_args {
+	syscallarg(int) s;
+	syscallarg(struct osockaddr *) name;
+	syscallarg(int *) anamelen;
+	syscallarg(int) flags;
+};
+check_syscall_args(linux_sys_accept4)
+
 /*
  * System call prototypes.
  */
@@ -1597,4 +1605,6 @@ int	linux_sys_dup3(struct lwp *, const s
 
 int	linux_sys_pipe2(struct lwp *, const struct linux_sys_pipe2_args *, register_t *);
 
+int	linux_sys_accept4(s

CVS commit: src/sys/compat/linux/arch

2017-02-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  3 06:06:09 UTC 2017

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master

Log Message:
Add accept4 definitions


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/linux/arch/arm/syscalls.master

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/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.92 src/sys/compat/linux/arch/alpha/syscalls.master:1.93
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.92	Mon Jan  2 16:32:09 2017
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Fri Feb  3 06:06:08 2017
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.92 2017/01/02 16:32:09 manu Exp $
+	$NetBSD: syscalls.master,v 1.93 2017/02/03 06:06:08 martin Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -771,3 +771,15 @@
 491	UNIMPL		pwritev
 492	UNIMPL		rt_tgsigqueueinfo
 493	UNIMPL		perf_counter_open
+494	UNIMPL
+495	UNIMPL
+496	UNIMPL
+497	UNIMPL
+498	UNIMPL
+499	UNIMPL
+500	UNIMPL
+501	UNIMPL
+502	STD		{ int|linux_sys||accept4(int s, \
+			struct osockaddr *name, \
+			int *anamelen, int flags); }
+

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.65 src/sys/compat/linux/arch/arm/syscalls.master:1.66
--- src/sys/compat/linux/arch/arm/syscalls.master:1.65	Mon Jan  2 16:32:09 2017
+++ src/sys/compat/linux/arch/arm/syscalls.master	Fri Feb  3 06:06:09 2017
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.65 2017/01/02 16:32:09 manu Exp $
+	$NetBSD: syscalls.master,v 1.66 2017/02/03 06:06:09 martin Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -570,7 +570,9 @@
 363	UNIMPL		rt_tgsigqueueinfo
 364	UNIMPL		perf_counter_open
 365	UNIMPL		recvmmsg
-366	UNIMPL
+366	STD		{ int|linux_sys||accept4(int s, \
+			struct osockaddr *name, \
+			int *anamelen, int flags); }
 367	UNIMPL
 368	UNIMPL
 369	UNIMPL



CVS commit: src/sys/compat/linux/common

2017-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb  2 15:36:55 UTC 2017

Modified Files:
src/sys/compat/linux/common: linux_socket.c

Log Message:
implement accept4


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/compat/linux/common/linux_socket.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_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.133 src/sys/compat/linux/common/linux_socket.c:1.134
--- src/sys/compat/linux/common/linux_socket.c:1.133	Tue Sep 13 03:01:07 2016
+++ src/sys/compat/linux/common/linux_socket.c	Thu Feb  2 10:36:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.c,v 1.133 2016/09/13 07:01:07 martin Exp $	*/
+/*	$NetBSD: linux_socket.c,v 1.134 2017/02/02 15:36:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.133 2016/09/13 07:01:07 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.134 2017/02/02 15:36:55 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1707,3 +1707,38 @@ linux_sys_accept(struct lwp *l, const st
 
 	return (0);
 }
+
+int
+linux_sys_accept4(struct lwp *l, const struct linux_sys_accept4_args *uap, register_t *retval)
+{
+	/* {
+		syscallarg(int) s;
+		syscallarg(struct osockaddr *) name;
+		syscallarg(int *) anamelen;
+		syscallarg(int) flags;
+	} */
+	int error, flags;
+	struct sockaddr_big name;
+
+	if ((flags = linux_to_bsd_type(SCARG(uap, flags))) == -1)
+		return EINVAL;
+
+	name.sb_len = UCHAR_MAX;
+	error = do_sys_accept(l, SCARG(uap, s), (struct sockaddr *)&name,
+	retval, NULL, flags, 0);
+	if (error != 0)
+		return error;
+
+	error = copyout_sockname_sb((struct sockaddr *)SCARG(uap, name),
+	SCARG(uap, anamelen), MSG_LENUSRSPACE, &name);
+	if (error != 0) {
+		int fd = (int)*retval;
+		if (fd_getfile(fd) != NULL)
+			(void)fd_close(fd);
+		return error;
+	}
+	if (SCARG(uap, name) && (error = linux_sa_put(SCARG(uap, name
+		return error;
+
+	return 0;
+}



CVS commit: src/sys/compat/linux/arch

2017-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb  2 15:36:12 UTC 2017

Modified Files:
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.8 -r1.9 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.71 -r1.72 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.70 -r1.71 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.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/arch/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.64 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.65
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.64	Sun Jan 15 19:11:09 2017
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Thu Feb  2 10:36:12 2017
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.64 2017/01/16 00:11:09 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.65 2017/02/02 15:36:12 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.58 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.59 2017/02/02 15:35:46 christos Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -645,6 +645,9 @@
 /* syscall: "utimensat" ret: "int" args: "int" "const char *" "struct linux_timespec *" "int" */
 #define	LINUX_SYS_utimensat	280
 
+/* syscall: "accept4" ret: "int" args: "int" "struct osockaddr *" "int *" "int" */
+#define	LINUX_SYS_accept4	288
+
 /* syscall: "dup3" ret: "int" args: "int" "int" "int" */
 #define	LINUX_SYS_dup3	292
 
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.64 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.65
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.64	Sun Jan 15 19:11:09 2017
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Thu Feb  2 10:36:12 2017
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.64 2017/01/16 00:11:09 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.65 2017/02/02 15:36:12 christos Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.58 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.59 2017/02/02 15:35:46 christos Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -1004,6 +1004,14 @@ struct linux_sys_utimensat_args {
 };
 check_syscall_args(linux_sys_utimensat)
 
+struct linux_sys_accept4_args {
+	syscallarg(int) s;
+	syscallarg(struct osockaddr *) name;
+	syscallarg(int *) anamelen;
+	syscallarg(int) flags;
+};
+check_syscall_args(linux_sys_accept4)
+
 struct linux_sys_dup3_args {
 	syscallarg(int) from;
 	syscallarg(int) to;
@@ -1448,6 +1456,8 @@ int	linux_sys_get_robust_list(struct lwp
 
 int	linux_sys_utimensat(struct lwp *, const struct linux_sys_utimensat_args *, register_t *);
 
+int	linux_sys_accept4(struct lwp *, const struct linux_sys_accept4_args *, register_t *);
+
 int	linux_sys_dup3(struct lwp *, const struct linux_sys_dup3_args *, register_t *);
 
 int	linux_sys_pipe2(struct lwp *, const struct linux_sys_pipe2_args *, register_t *);
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.64 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.65
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.64	Sun Jan 15 19:11:09 2017
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Thu Feb  2 10:36:12 2017
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.64 2017/01/16 00:11:09 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.65 2017/02/02 15:36:12 christos Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.58 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.59 2017/02/02 15:35:46 christos Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.64 2017/01/16 00:11:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.65 2017/02/02 15:36:12 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -354,7 +354,7 @@ const char *const linux_syscallnames[] =
 	/* 285 */	"#285 (unimplemented f

CVS commit: src/sys/compat/linux/arch

2017-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb  2 15:35:46 UTC 2017

Modified Files:
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master

Log Message:
implement accept4
XXX: mips looks busted (the syscalls file has lots of NOARGS syscalls that
should be STD).


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/linux/arch/mips/syscalls.master

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/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.58 src/sys/compat/linux/arch/amd64/syscalls.master:1.59
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.58	Mon Jan  2 11:32:09 2017
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Thu Feb  2 10:35:46 2017
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.58 2017/01/02 16:32:09 manu Exp $
+	$NetBSD: syscalls.master,v 1.59 2017/02/02 15:35:46 christos Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -516,7 +516,9 @@
 285	UNIMPL		fallocate
 286	UNIMPL		timerfd_settime
 287	UNIMPL		timerfd_gettime
-288	UNIMPL		accept4
+288	STD		{ int|linux_sys||accept4(int s, \
+			struct osockaddr *name, \
+			int *anamelen, int flags); }
 289	UNIMPL		signalfd4
 290	UNIMPL		eventfd2
 291	UNIMPL		epoll_create1

Index: src/sys/compat/linux/arch/mips/syscalls.master
diff -u src/sys/compat/linux/arch/mips/syscalls.master:1.61 src/sys/compat/linux/arch/mips/syscalls.master:1.62
--- src/sys/compat/linux/arch/mips/syscalls.master:1.61	Mon Jan  2 11:32:10 2017
+++ src/sys/compat/linux/arch/mips/syscalls.master	Thu Feb  2 10:35:46 2017
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.61 2017/01/02 16:32:10 manu Exp $  
+	$NetBSD: syscalls.master,v 1.62 2017/02/02 15:35:46 christos Exp $  
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -543,5 +543,7 @@
 331	UNIMPL		pwritev
 332	UNIMPL		rt_tgsigqueueinfo
 333	UNIMPL		perf_event_open
-334	UNIMPL		accept4
+334	STD		{ int|linux_sys||accept4(int s, \
+			struct osockaddr *name, \
+			int *anamelen, int flags); }
 335	UNIMPL		recvmmsg



CVS commit: src/sys/compat/linux32/common

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 21:54:57 UTC 2017

Modified Files:
src/sys/compat/linux32/common: linux32_dirent.c

Log Message:
avoid the shadow


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/compat/linux32/common/linux32_dirent.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_dirent.c
diff -u src/sys/compat/linux32/common/linux32_dirent.c:1.16 src/sys/compat/linux32/common/linux32_dirent.c:1.17
--- src/sys/compat/linux32/common/linux32_dirent.c:1.16	Sat Jan 28 10:09:55 2017
+++ src/sys/compat/linux32/common/linux32_dirent.c	Sat Jan 28 16:54:57 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_dirent.c,v 1.16 2017/01/28 15:09:55 christos Exp $ */
+/*	$NetBSD: linux32_dirent.c,v 1.17 2017/01/28 21:54:57 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.16 2017/01/28 15:09:55 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.17 2017/01/28 21:54:57 christos Exp $");
 
 #include 
 #include 
@@ -215,9 +215,9 @@ again:
 			idb.d_off = (linux32_off_t)off;
 			idb.d_reclen = (u_short)linux32_reclen;
 		}
-		size_t l = MIN(sizeof(idb.d_name) - 1, bdp->d_namlen + 1);
-		memcpy(idb.d_name, bdp->d_name, l);
-		idb.d_name[l + 1] = bdp->d_type;
+		size_t dirl = MIN(sizeof(idb.d_name) - 1, bdp->d_namlen + 1);
+		memcpy(idb.d_name, bdp->d_name, dirl);
+		idb.d_name[dirl + 1] = bdp->d_type;
 		if ((error = copyout((void *)&idb, outp, linux32_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat/linux32/common

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 15:09:55 UTC 2017

Modified Files:
src/sys/compat/linux32/common: linux32_dirent.c

Log Message:
we have space for one more.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/linux32/common/linux32_dirent.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_dirent.c
diff -u src/sys/compat/linux32/common/linux32_dirent.c:1.15 src/sys/compat/linux32/common/linux32_dirent.c:1.16
--- src/sys/compat/linux32/common/linux32_dirent.c:1.15	Sat Jan 28 10:08:06 2017
+++ src/sys/compat/linux32/common/linux32_dirent.c	Sat Jan 28 10:09:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_dirent.c,v 1.15 2017/01/28 15:08:06 christos Exp $ */
+/*	$NetBSD: linux32_dirent.c,v 1.16 2017/01/28 15:09:55 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.15 2017/01/28 15:08:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.16 2017/01/28 15:09:55 christos Exp $");
 
 #include 
 #include 
@@ -215,7 +215,7 @@ again:
 			idb.d_off = (linux32_off_t)off;
 			idb.d_reclen = (u_short)linux32_reclen;
 		}
-		size_t l = MIN(sizeof(idb.d_name) - 2, bdp->d_namlen + 1);
+		size_t l = MIN(sizeof(idb.d_name) - 1, bdp->d_namlen + 1);
 		memcpy(idb.d_name, bdp->d_name, l);
 		idb.d_name[l + 1] = bdp->d_type;
 		if ((error = copyout((void *)&idb, outp, linux32_reclen)))



CVS commit: src/sys/compat/linux32/common

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 15:08:06 UTC 2017

Modified Files:
src/sys/compat/linux32/common: linux32_dirent.c

Log Message:
fix size computation


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/linux32/common/linux32_dirent.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_dirent.c
diff -u src/sys/compat/linux32/common/linux32_dirent.c:1.14 src/sys/compat/linux32/common/linux32_dirent.c:1.15
--- src/sys/compat/linux32/common/linux32_dirent.c:1.14	Fri Jan 13 16:02:05 2017
+++ src/sys/compat/linux32/common/linux32_dirent.c	Sat Jan 28 10:08:06 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_dirent.c,v 1.14 2017/01/13 21:02:05 christos Exp $ */
+/*	$NetBSD: linux32_dirent.c,v 1.15 2017/01/28 15:08:06 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.14 2017/01/13 21:02:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.15 2017/01/28 15:08:06 christos Exp $");
 
 #include 
 #include 
@@ -215,9 +215,9 @@ again:
 			idb.d_off = (linux32_off_t)off;
 			idb.d_reclen = (u_short)linux32_reclen;
 		}
-		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name), 
-		bdp->d_namlen));
-		idb.d_name[strlen(idb.d_name) + 1] = bdp->d_type;
+		size_t l = MIN(sizeof(idb.d_name) - 2, bdp->d_namlen + 1);
+		memcpy(idb.d_name, bdp->d_name, l);
+		idb.d_name[l + 1] = bdp->d_type;
 		if ((error = copyout((void *)&idb, outp, linux32_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat/linux/common

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 15:01:01 UTC 2017

Modified Files:
src/sys/compat/linux/common: linux_file64.c linux_misc.c

Log Message:
copy the terminating NUL (njoly)


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/linux/common/linux_file64.c
cvs rdiff -u -r1.236 -r1.237 src/sys/compat/linux/common/linux_misc.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_file64.c
diff -u src/sys/compat/linux/common/linux_file64.c:1.57 src/sys/compat/linux/common/linux_file64.c:1.58
--- src/sys/compat/linux/common/linux_file64.c:1.57	Fri Jan 13 17:46:43 2017
+++ src/sys/compat/linux/common/linux_file64.c	Sat Jan 28 10:01:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file64.c,v 1.57 2017/01/13 22:46:43 christos Exp $	*/
+/*	$NetBSD: linux_file64.c,v 1.58 2017/01/28 15:01:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.57 2017/01/13 22:46:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.58 2017/01/28 15:01:01 christos Exp $");
 
 #include 
 #include 
@@ -355,7 +355,7 @@ again:
 		idb.d_off = off;
 		idb.d_reclen = (u_short)linux_reclen;
 		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name),
-		   bdp->d_namlen));
+		   bdp->d_namlen + 1));
 		if ((error = copyout((void *)&idb, outp, linux_reclen)))
 			goto out;
 		/* advance past this real entry */

Index: src/sys/compat/linux/common/linux_misc.c
diff -u src/sys/compat/linux/common/linux_misc.c:1.236 src/sys/compat/linux/common/linux_misc.c:1.237
--- src/sys/compat/linux/common/linux_misc.c:1.236	Fri Jan 13 17:45:15 2017
+++ src/sys/compat/linux/common/linux_misc.c	Sat Jan 28 10:01:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc.c,v 1.236 2017/01/13 22:45:15 christos Exp $	*/
+/*	$NetBSD: linux_misc.c,v 1.237 2017/01/28 15:01:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.236 2017/01/13 22:45:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.237 2017/01/28 15:01:01 christos Exp $");
 
 #include 
 #include 
@@ -788,7 +788,7 @@ again:
 			*((char *)&idb + idb.d_reclen - 1) = bdp->d_type;
 		}
 		memcpy(idb.d_name, bdp->d_name,
-		MIN(sizeof(idb.d_name), bdp->d_namlen));
+		MIN(sizeof(idb.d_name), bdp->d_namlen + 1));
 		if ((error = copyout((void *)&idb, outp, linux_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat/netbsd32

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 21:45:39 UTC 2017

Modified Files:
src/sys/compat/netbsd32: netbsd32_exec.h

Log Message:
Catch netbsd32_copyargs() up to changes in r1.441 src/sys/kern/kern_exec.c


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/netbsd32_exec.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_exec.h
diff -u src/sys/compat/netbsd32/netbsd32_exec.h:1.32 src/sys/compat/netbsd32/netbsd32_exec.h:1.33
--- src/sys/compat/netbsd32/netbsd32_exec.h:1.32	Fri Oct 24 21:07:55 2014
+++ src/sys/compat/netbsd32/netbsd32_exec.h	Wed Jan 25 21:45:39 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_exec.h,v 1.32 2014/10/24 21:07:55 christos Exp $	*/
+/*	$NetBSD: netbsd32_exec.h,v 1.33 2017/01/25 21:45:39 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -94,13 +94,12 @@ netbsd32_copyargs(struct lwp *l, struct 
 	int envc = arginfo->ps_nenvstr;
 	int error;
 
-	NETBSD32PTR32(dp, cpp + 
+	NETBSD32PTR32(dp, (char *)(cpp +
 	1 +/* int argc */
 	argc +			/* char *argv[] */
 	1 +/* \0 */
 	envc +			/* char *env[] */
-	1 +/* \0 */
-	/* XXX auxinfo multiplied by ptr size? */
+	1) +			/* \0 */
 	pack->ep_esch->es_arglen);	/* auxinfo */
 	sp = argp;
 



CVS commit: src/sys/compat/linux32

2017-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 17:39:59 UTC 2017

Modified Files:
src/sys/compat/linux32: Makefile.inc
Added Files:
src/sys/compat/linux32: Makefile

Log Message:
Descend


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux32/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux32/Makefile.inc

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/Makefile.inc
diff -u src/sys/compat/linux32/Makefile.inc:1.3 src/sys/compat/linux32/Makefile.inc:1.4
--- src/sys/compat/linux32/Makefile.inc:1.3	Tue Jan 14 13:51:25 2014
+++ src/sys/compat/linux32/Makefile.inc	Mon Jan 16 12:39:59 2017
@@ -1,5 +1,7 @@
-#	$NetBSD: Makefile.inc,v 1.3 2014/01/14 18:51:25 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2017/01/16 17:39:59 christos Exp $
 
+.if !defined(SUBDIR)
 SYSCALL_PREFIX=linux32
 
 .include 
+.endif

Added files:

Index: src/sys/compat/linux32/Makefile
diff -u /dev/null src/sys/compat/linux32/Makefile:1.1
--- /dev/null	Mon Jan 16 12:39:59 2017
+++ src/sys/compat/linux32/Makefile	Mon Jan 16 12:39:59 2017
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile,v 1.1 2017/01/16 17:39:59 christos Exp $
+SUBDIR= arch
+.include 



CVS commit: src/sys/compat

2017-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 17:42:52 UTC 2017

Added Files:
src/sys/compat: Makefile.syscall

Log Message:
Add a Makefile to rebuild the syscall files for all emulations


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/compat/Makefile.syscall

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

Added files:

Index: src/sys/compat/Makefile.syscall
diff -u /dev/null src/sys/compat/Makefile.syscall:1.1
--- /dev/null	Mon Jan 16 12:42:52 2017
+++ src/sys/compat/Makefile.syscall	Mon Jan 16 12:42:52 2017
@@ -0,0 +1,6 @@
+#	$NetBSD: Makefile.syscall,v 1.1 2017/01/16 17:42:52 christos Exp $
+
+SUBDIR	=	aoutm68k freebsd ibcs2 linux linux32 netbsd32
+SUBDIR +=	osf1 sunos sunos32 svr4 svr4_32 ultrix
+
+.include 



CVS commit: src/sys/compat

2017-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 17:43:05 UTC 2017

Modified Files:
src/sys/compat/aoutm68k: aoutm68k_syscall.h aoutm68k_syscallargs.h
aoutm68k_syscalls.c aoutm68k_sysent.c
src/sys/compat/freebsd: freebsd_syscall.h freebsd_syscallargs.h
freebsd_syscalls.c freebsd_sysent.c
src/sys/compat/ibcs2: ibcs2_syscall.h ibcs2_syscallargs.h
ibcs2_syscalls.c ibcs2_sysent.c
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_syscalls_autoload.c netbsd32_sysent.c
netbsd32_systrace_args.c
src/sys/compat/osf1: osf1_syscall.h osf1_syscallargs.h osf1_syscalls.c
osf1_sysent.c
src/sys/compat/sunos: sunos_syscall.h sunos_syscallargs.h
sunos_syscalls.c sunos_sysent.c
src/sys/compat/sunos32: sunos32_syscall.h sunos32_syscallargs.h
sunos32_syscalls.c sunos32_sysent.c
src/sys/compat/svr4: svr4_syscall.h svr4_syscallargs.h svr4_syscalls.c
svr4_sysent.c
src/sys/compat/svr4_32: svr4_32_syscall.h svr4_32_syscallargs.h
svr4_32_syscalls.c svr4_32_sysent.c
src/sys/compat/ultrix: ultrix_syscall.h ultrix_syscallargs.h
ultrix_syscalls.c ultrix_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/compat/aoutm68k/aoutm68k_syscall.h
cvs rdiff -u -r1.44 -r1.45 src/sys/compat/aoutm68k/aoutm68k_syscallargs.h
cvs rdiff -u -r1.43 -r1.44 src/sys/compat/aoutm68k/aoutm68k_syscalls.c
cvs rdiff -u -r1.48 -r1.49 src/sys/compat/aoutm68k/aoutm68k_sysent.c
cvs rdiff -u -r1.82 -r1.83 src/sys/compat/freebsd/freebsd_syscall.h \
src/sys/compat/freebsd/freebsd_syscalls.c
cvs rdiff -u -r1.85 -r1.86 src/sys/compat/freebsd/freebsd_syscallargs.h
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/freebsd/freebsd_sysent.c
cvs rdiff -u -r1.53 -r1.54 src/sys/compat/ibcs2/ibcs2_syscall.h
cvs rdiff -u -r1.54 -r1.55 src/sys/compat/ibcs2/ibcs2_syscallargs.h \
src/sys/compat/ibcs2/ibcs2_syscalls.c
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/ibcs2/ibcs2_sysent.c
cvs rdiff -u -r1.127 -r1.128 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.126 -r1.127 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.9 -r1.10 \
src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.17 -r1.18 src/sys/compat/netbsd32/netbsd32_systrace_args.c
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/osf1/osf1_syscall.h
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/osf1/osf1_syscallargs.h \
src/sys/compat/osf1/osf1_sysent.c
cvs rdiff -u -r1.63 -r1.64 src/sys/compat/osf1/osf1_syscalls.c
cvs rdiff -u -r1.90 -r1.91 src/sys/compat/sunos/sunos_syscall.h
cvs rdiff -u -r1.74 -r1.75 src/sys/compat/sunos/sunos_syscallargs.h
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/sunos/sunos_syscalls.c
cvs rdiff -u -r1.85 -r1.86 src/sys/compat/sunos/sunos_sysent.c
cvs rdiff -u -r1.31 -r1.32 src/sys/compat/sunos32/sunos32_syscall.h
cvs rdiff -u -r1.30 -r1.31 src/sys/compat/sunos32/sunos32_syscallargs.h \
src/sys/compat/sunos32/sunos32_syscalls.c
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/sunos32/sunos32_sysent.c
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/svr4/svr4_syscall.h \
src/sys/compat/svr4/svr4_syscalls.c
cvs rdiff -u -r1.87 -r1.88 src/sys/compat/svr4/svr4_syscallargs.h
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/svr4/svr4_sysent.c
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/svr4_32/svr4_32_syscall.h \
src/sys/compat/svr4_32/svr4_32_syscallargs.h \
src/sys/compat/svr4_32/svr4_32_syscalls.c
cvs rdiff -u -r1.26 -r1.27 src/sys/compat/svr4_32/svr4_32_sysent.c
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/ultrix/ultrix_syscall.h
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/ultrix/ultrix_syscallargs.h
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/ultrix/ultrix_syscalls.c
cvs rdiff -u -r1.68 -r1.69 src/sys/compat/ultrix/ultrix_sysent.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/aoutm68k/aoutm68k_syscall.h
diff -u src/sys/compat/aoutm68k/aoutm68k_syscall.h:1.46 src/sys/compat/aoutm68k/aoutm68k_syscall.h:1.47
--- src/sys/compat/aoutm68k/aoutm68k_syscall.h:1.46	Fri Jan 13 01:19:35 2017
+++ src/sys/compat/aoutm68k/aoutm68k_syscall.h	Mon Jan 16 12:43:04 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: aoutm68k_syscall.h,v 1.46 2017/01/13 06:19:35 christos Exp $ */
+/* $NetBSD: aoutm68k_syscall.h,v 1.47 2017/01/16 17:43:04 christos Exp $ */
 
 /*
  * System call numbers.

Index: src/sys/compat/aoutm68k/aoutm68k_syscallargs.h
diff -u src/sys/compat/aoutm68k/aoutm68k_syscallargs.h:1.44 src/sys/compat/aoutm68k/aoutm68k_syscallargs.h:1.45
--- src/sys/compat/aoutm68k/aoutm68k_syscallargs.h:1.44	Fri Jan 13 01:19:35 2017
+++ src/sys/compat/aoutm68k/aoutm68k_syscallargs.h	Mon Jan 16 12:43:

CVS commit: src/sys/compat/linux32/arch

2017-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 17:39:22 UTC 2017

Modified Files:
src/sys/compat/linux32/arch/amd64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
linux32_systrace_args.c
Added Files:
src/sys/compat/linux32/arch: Makefile

Log Message:
descend and regen


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux32/arch/Makefile
cvs rdiff -u -r1.76 -r1.77 \
src/sys/compat/linux32/arch/amd64/linux32_syscall.h \
src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \
src/sys/compat/linux32/arch/amd64/linux32_sysent.c
cvs rdiff -u -r1.3 -r1.4 \
src/sys/compat/linux32/arch/amd64/linux32_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/linux32/arch/amd64/linux32_syscall.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.76 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.77
--- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.76	Fri Jan 13 01:19:36 2017
+++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h	Mon Jan 16 12:39:22 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_syscall.h,v 1.76 2017/01/13 06:19:36 christos Exp $ */
+/* $NetBSD: linux32_syscall.h,v 1.77 2017/01/16 17:39:22 christos Exp $ */
 
 /*
  * System call numbers.
Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.76 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.77
--- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.76	Fri Jan 13 01:19:36 2017
+++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h	Mon Jan 16 12:39:22 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_syscallargs.h,v 1.76 2017/01/13 06:19:36 christos Exp $ */
+/* $NetBSD: linux32_syscallargs.h,v 1.77 2017/01/16 17:39:22 christos Exp $ */
 
 /*
  * System call argument lists.
Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.76 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.77
--- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.76	Fri Jan 13 01:19:36 2017
+++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c	Mon Jan 16 12:39:22 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_syscalls.c,v 1.76 2017/01/13 06:19:36 christos Exp $ */
+/* $NetBSD: linux32_syscalls.c,v 1.77 2017/01/16 17:39:22 christos Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.76 2017/01/13 06:19:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.77 2017/01/16 17:39:22 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include 
Index: src/sys/compat/linux32/arch/amd64/linux32_sysent.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.76 src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.77
--- src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.76	Fri Jan 13 01:19:36 2017
+++ src/sys/compat/linux32/arch/amd64/linux32_sysent.c	Mon Jan 16 12:39:22 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_sysent.c,v 1.76 2017/01/13 06:19:36 christos Exp $ */
+/* $NetBSD: linux32_sysent.c,v 1.77 2017/01/16 17:39:22 christos Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.76 2017/01/13 06:19:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.77 2017/01/16 17:39:22 christos Exp $");
 
 #include 
 #include 

Index: src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c:1.3 src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c:1.4
--- src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c:1.3	Fri Jan 13 01:19:36 2017
+++ src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c	Mon Jan 16 12:39:22 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_systrace_args.c,v 1.3 2017/01/13 06:19:36 christos Exp $ */
+/* $NetBSD: linux32_systrace_args.c,v 1.4 2017/01/16 17:39:22 christos Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.

Added files:

Index: src/sys/compat/linux32/arch/Makefile
diff -u /dev/null src/sys/compat/linux32/arch/Makefile:1.1
--- /dev/null	Mon Jan 16 12:39:22 2017
+++ src/sys/compat/linux32/arch/Makefile	Mon Jan 16 12:39:22 2017
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile,v 1.1 2017/01/16 17:39:22 christos Exp $
+SUBDIR= amd64
+.include 



CVS commit: src/sys/compat/linux

2017-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 17:37:29 UTC 2017

Modified Files:
src/sys/compat/linux: Makefile.inc

Log Message:
Don't re-define rules for subdir Makefile


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux/Makefile.inc

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/Makefile.inc
diff -u src/sys/compat/linux/Makefile.inc:1.6 src/sys/compat/linux/Makefile.inc:1.7
--- src/sys/compat/linux/Makefile.inc:1.6	Tue Jan 14 13:51:25 2014
+++ src/sys/compat/linux/Makefile.inc	Mon Jan 16 12:37:29 2017
@@ -1,5 +1,7 @@
-#	$NetBSD: Makefile.inc,v 1.6 2014/01/14 18:51:25 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.7 2017/01/16 17:37:29 christos Exp $
 
+.if !defined(SUBDIR)
 SYSCALL_PREFIX=linux
 
 .include 
+.endif



CVS commit: src/sys/compat/linux/arch

2017-01-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 00:11:10 UTC 2017

Modified Files:
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
regen all


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.101 -r1.102 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.103 -r1.104 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.63 -r1.64 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.7 -r1.8 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.8 -r1.9 src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.111 -r1.112 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.112 -r1.113 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.101 -r1.102 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.100 -r1.101 \
src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.70 -r1.71 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.c
cvs rdiff -u -r1.79 -r1.80 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.78 -r1.79 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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/arch/alpha/linux_syscall.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.102 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.103
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.102	Fri Jan 13 01:18:31 2017
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Sun Jan 15 19:11:09 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.h,v 1.102 2017/01/13 06:18:31 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.103 2017/01/16 00:11:09 christos Exp $ */
 
 /*
  * System call numbers.
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.102 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.103
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.102	Fri Jan 13 01:18:31 2017
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Sun Jan 15 19:11:09 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sysent.c,v 1.102 2017/01/13 06:18:31 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.103 2017/01/16 00:11:09 christos Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.102 2017/01/13 06:18:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.103 2017/01/16 00:11:09 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"

Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.101 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.102
--- src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.101	Fri Jan 13 01:18:31 2017
+++ src/sys/compat/linux/arch/alpha/linux_syscallargs.h	Sun Jan 15 19:11:09 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscallargs.

CVS commit: src/sys/compat/linux

2017-01-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 00:11:42 UTC 2017

Added Files:
src/sys/compat/linux: Makefile
src/sys/compat/linux/arch: Makefile

Log Message:
add Makefile struct


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.5 src/sys/compat/linux/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/arch/Makefile

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

Added files:

Index: src/sys/compat/linux/Makefile
diff -u /dev/null src/sys/compat/linux/Makefile:1.5
--- /dev/null	Sun Jan 15 19:11:42 2017
+++ src/sys/compat/linux/Makefile	Sun Jan 15 19:11:41 2017
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile,v 1.5 2017/01/16 00:11:41 christos Exp $
+SUBDIR= arch
+.include 

Index: src/sys/compat/linux/arch/Makefile
diff -u /dev/null src/sys/compat/linux/arch/Makefile:1.1
--- /dev/null	Sun Jan 15 19:11:42 2017
+++ src/sys/compat/linux/arch/Makefile	Sun Jan 15 19:11:42 2017
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2017/01/16 00:11:42 christos Exp $
+
+SUBDIR=alpha amd64 arm i386 m68k mips powerpc sparc sparc64
+
+.include 



CVS commit: src/sys/compat/linux/arch/arm

2017-01-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 15 17:00:37 UTC 2017

Modified Files:
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/linux/arch/arm/linux_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/linux/arch/arm/linux_syscall.h
diff -u src/sys/compat/linux/arch/arm/linux_syscall.h:1.74 src/sys/compat/linux/arch/arm/linux_syscall.h:1.75
--- src/sys/compat/linux/arch/arm/linux_syscall.h:1.74	Sun Jan 15 10:20:15 2017
+++ src/sys/compat/linux/arch/arm/linux_syscall.h	Sun Jan 15 12:00:37 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.h,v 1.74 2017/01/15 15:20:15 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.75 2017/01/15 17:00:37 christos Exp $ */
 
 /*
  * System call numbers.
Index: src/sys/compat/linux/arch/arm/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.74 src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.75
--- src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.74	Sun Jan 15 10:20:15 2017
+++ src/sys/compat/linux/arch/arm/linux_syscallargs.h	Sun Jan 15 12:00:37 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscallargs.h,v 1.74 2017/01/15 15:20:15 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.75 2017/01/15 17:00:37 christos Exp $ */
 
 /*
  * System call argument lists.
Index: src/sys/compat/linux/arch/arm/linux_syscalls.c
diff -u src/sys/compat/linux/arch/arm/linux_syscalls.c:1.74 src/sys/compat/linux/arch/arm/linux_syscalls.c:1.75
--- src/sys/compat/linux/arch/arm/linux_syscalls.c:1.74	Sun Jan 15 10:20:15 2017
+++ src/sys/compat/linux/arch/arm/linux_syscalls.c	Sun Jan 15 12:00:37 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscalls.c,v 1.74 2017/01/15 15:20:15 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.75 2017/01/15 17:00:37 christos Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.74 2017/01/15 15:20:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.75 2017/01/15 17:00:37 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include 
Index: src/sys/compat/linux/arch/arm/linux_sysent.c
diff -u src/sys/compat/linux/arch/arm/linux_sysent.c:1.74 src/sys/compat/linux/arch/arm/linux_sysent.c:1.75
--- src/sys/compat/linux/arch/arm/linux_sysent.c:1.74	Sun Jan 15 10:20:15 2017
+++ src/sys/compat/linux/arch/arm/linux_sysent.c	Sun Jan 15 12:00:37 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sysent.c,v 1.74 2017/01/15 15:20:15 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.75 2017/01/15 17:00:37 christos Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.74 2017/01/15 15:20:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.75 2017/01/15 17:00:37 christos Exp $");
 
 #include 
 #include 

Index: src/sys/compat/linux/arch/arm/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.7 src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.8
--- src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.7	Sun Jan 15 10:20:15 2017
+++ src/sys/compat/linux/arch/arm/linux_systrace_args.c	Sun Jan 15 12:00:37 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_systrace_args.c,v 1.7 2017/01/15 15:20:15 christos Exp $ */
+/* $NetBSD: linux_systrace_args.c,v 1.8 2017/01/15 17:00:37 christos Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.
@@ -302,7 +302,7 @@ systrace_args(register_t sysnum, const v
 	case 48: {
 		const struct linux_sys_signal_args *p = params;
 		iarg[0] = SCARG(p, signum); /* int */
-		uarg[1] = (intptr_t) SCARG(p, handler).i32; /* linux_handler_t */
+		uarg[1] = (intptr_t) SCARG(p, handler); /* linux_handler_t */
 		*n_args = 2;
 		break;
 	}



CVS commit: src/sys/compat/linux/arch/arm

2017-01-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 15 15:20:15 UTC 2017

Modified Files:
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux/arch/arm/linux_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/linux/arch/arm/linux_syscall.h
diff -u src/sys/compat/linux/arch/arm/linux_syscall.h:1.73 src/sys/compat/linux/arch/arm/linux_syscall.h:1.74
--- src/sys/compat/linux/arch/arm/linux_syscall.h:1.73	Sun Jan 15 10:19:33 2017
+++ src/sys/compat/linux/arch/arm/linux_syscall.h	Sun Jan 15 10:20:15 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.h,v 1.73 2017/01/15 15:19:33 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.74 2017/01/15 15:20:15 christos Exp $ */
 
 /*
  * System call numbers.
Index: src/sys/compat/linux/arch/arm/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.73 src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.74
--- src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.73	Sun Jan 15 10:19:33 2017
+++ src/sys/compat/linux/arch/arm/linux_syscallargs.h	Sun Jan 15 10:20:15 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscallargs.h,v 1.73 2017/01/15 15:19:33 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.74 2017/01/15 15:20:15 christos Exp $ */
 
 /*
  * System call argument lists.
Index: src/sys/compat/linux/arch/arm/linux_syscalls.c
diff -u src/sys/compat/linux/arch/arm/linux_syscalls.c:1.73 src/sys/compat/linux/arch/arm/linux_syscalls.c:1.74
--- src/sys/compat/linux/arch/arm/linux_syscalls.c:1.73	Sun Jan 15 10:19:33 2017
+++ src/sys/compat/linux/arch/arm/linux_syscalls.c	Sun Jan 15 10:20:15 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscalls.c,v 1.73 2017/01/15 15:19:33 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.74 2017/01/15 15:20:15 christos Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.73 2017/01/15 15:19:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.74 2017/01/15 15:20:15 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include 
Index: src/sys/compat/linux/arch/arm/linux_sysent.c
diff -u src/sys/compat/linux/arch/arm/linux_sysent.c:1.73 src/sys/compat/linux/arch/arm/linux_sysent.c:1.74
--- src/sys/compat/linux/arch/arm/linux_sysent.c:1.73	Sun Jan 15 10:19:33 2017
+++ src/sys/compat/linux/arch/arm/linux_sysent.c	Sun Jan 15 10:20:15 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sysent.c,v 1.73 2017/01/15 15:19:33 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.74 2017/01/15 15:20:15 christos Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.73 2017/01/15 15:19:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.74 2017/01/15 15:20:15 christos Exp $");
 
 #include 
 #include 

Index: src/sys/compat/linux/arch/arm/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.6 src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.7
--- src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.6	Sun Jan 15 10:19:33 2017
+++ src/sys/compat/linux/arch/arm/linux_systrace_args.c	Sun Jan 15 10:20:15 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_systrace_args.c,v 1.6 2017/01/15 15:19:33 christos Exp $ */
+/* $NetBSD: linux_systrace_args.c,v 1.7 2017/01/15 15:20:15 christos Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.
@@ -302,11 +302,7 @@ systrace_args(register_t sysnum, const v
 	case 48: {
 		const struct linux_sys_signal_args *p = params;
 		iarg[0] = SCARG(p, signum); /* int */
-<<< linux_systrace_args.c
 		uarg[1] = (intptr_t) SCARG(p, handler).i32; /* linux_handler_t */
-===
-		iarg[1] = (intptr_t) SCARG(p, handler); /* linux_handler_t */
->>> 1.5
 		*n_args = 2;
 		break;
 	}



CVS commit: src/sys/compat/linux/arch/arm

2017-01-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 15 15:19:33 UTC 2017

Modified Files:
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.5 -r1.6 src/sys/compat/linux/arch/arm/linux_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/linux/arch/arm/linux_syscall.h
diff -u src/sys/compat/linux/arch/arm/linux_syscall.h:1.72 src/sys/compat/linux/arch/arm/linux_syscall.h:1.73
--- src/sys/compat/linux/arch/arm/linux_syscall.h:1.72	Fri Jan 13 01:18:31 2017
+++ src/sys/compat/linux/arch/arm/linux_syscall.h	Sun Jan 15 10:19:33 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.h,v 1.72 2017/01/13 06:18:31 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.73 2017/01/15 15:19:33 christos Exp $ */
 
 /*
  * System call numbers.
Index: src/sys/compat/linux/arch/arm/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.72 src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.73
--- src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.72	Fri Jan 13 01:18:31 2017
+++ src/sys/compat/linux/arch/arm/linux_syscallargs.h	Sun Jan 15 10:19:33 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscallargs.h,v 1.72 2017/01/13 06:18:31 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.73 2017/01/15 15:19:33 christos Exp $ */
 
 /*
  * System call argument lists.
Index: src/sys/compat/linux/arch/arm/linux_syscalls.c
diff -u src/sys/compat/linux/arch/arm/linux_syscalls.c:1.72 src/sys/compat/linux/arch/arm/linux_syscalls.c:1.73
--- src/sys/compat/linux/arch/arm/linux_syscalls.c:1.72	Fri Jan 13 01:18:31 2017
+++ src/sys/compat/linux/arch/arm/linux_syscalls.c	Sun Jan 15 10:19:33 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscalls.c,v 1.72 2017/01/13 06:18:31 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.73 2017/01/15 15:19:33 christos Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.72 2017/01/13 06:18:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.73 2017/01/15 15:19:33 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include 
Index: src/sys/compat/linux/arch/arm/linux_sysent.c
diff -u src/sys/compat/linux/arch/arm/linux_sysent.c:1.72 src/sys/compat/linux/arch/arm/linux_sysent.c:1.73
--- src/sys/compat/linux/arch/arm/linux_sysent.c:1.72	Fri Jan 13 01:18:31 2017
+++ src/sys/compat/linux/arch/arm/linux_sysent.c	Sun Jan 15 10:19:33 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sysent.c,v 1.72 2017/01/13 06:18:31 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.73 2017/01/15 15:19:33 christos Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.72 2017/01/13 06:18:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.73 2017/01/15 15:19:33 christos Exp $");
 
 #include 
 #include 

Index: src/sys/compat/linux/arch/arm/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.5 src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.6
--- src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.5	Sun Jan 15 06:46:21 2017
+++ src/sys/compat/linux/arch/arm/linux_systrace_args.c	Sun Jan 15 10:19:33 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_systrace_args.c,v 1.5 2017/01/15 11:46:21 martin Exp $ */
+/* $NetBSD: linux_systrace_args.c,v 1.6 2017/01/15 15:19:33 christos Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.
@@ -302,7 +302,11 @@ systrace_args(register_t sysnum, const v
 	case 48: {
 		const struct linux_sys_signal_args *p = params;
 		iarg[0] = SCARG(p, signum); /* int */
+<<< linux_systrace_args.c
+		uarg[1] = (intptr_t) SCARG(p, handler).i32; /* linux_handler_t */
+===
 		iarg[1] = (intptr_t) SCARG(p, handler); /* linux_handler_t */
+>>> 1.5
 		*n_args = 2;
 		break;
 	}



CVS commit: src/sys/compat/linux/arch/arm

2017-01-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 15 11:46:21 UTC 2017

Modified Files:
src/sys/compat/linux/arch/arm: linux_systrace_args.c

Log Message:
Cast pointer to int via intptr_t


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/arm/linux_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/linux/arch/arm/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.4 src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.5
--- src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.4	Fri Jan 13 06:18:31 2017
+++ src/sys/compat/linux/arch/arm/linux_systrace_args.c	Sun Jan 15 11:46:21 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_systrace_args.c,v 1.4 2017/01/13 06:18:31 christos Exp $ */
+/* $NetBSD: linux_systrace_args.c,v 1.5 2017/01/15 11:46:21 martin Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.
@@ -302,7 +302,7 @@ systrace_args(register_t sysnum, const v
 	case 48: {
 		const struct linux_sys_signal_args *p = params;
 		iarg[0] = SCARG(p, signum); /* int */
-		iarg[1] = SCARG(p, handler); /* linux_handler_t */
+		iarg[1] = (intptr_t) SCARG(p, handler); /* linux_handler_t */
 		*n_args = 2;
 		break;
 	}



CVS commit: src/sys/compat/linux/common

2017-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 13 22:46:44 UTC 2017

Modified Files:
src/sys/compat/linux/common: linux_file64.c

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/compat/linux/common/linux_file64.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_file64.c
diff -u src/sys/compat/linux/common/linux_file64.c:1.56 src/sys/compat/linux/common/linux_file64.c:1.57
--- src/sys/compat/linux/common/linux_file64.c:1.56	Fri Jan 13 16:02:05 2017
+++ src/sys/compat/linux/common/linux_file64.c	Fri Jan 13 17:46:43 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file64.c,v 1.56 2017/01/13 21:02:05 christos Exp $	*/
+/*	$NetBSD: linux_file64.c,v 1.57 2017/01/13 22:46:43 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.56 2017/01/13 21:02:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.57 2017/01/13 22:46:43 christos Exp $");
 
 #include 
 #include 
@@ -355,7 +355,7 @@ again:
 		idb.d_off = off;
 		idb.d_reclen = (u_short)linux_reclen;
 		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name),
-		   bdp.d_namlen);
+		   bdp->d_namlen));
 		if ((error = copyout((void *)&idb, outp, linux_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat/linux/common

2017-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 13 22:45:15 UTC 2017

Modified Files:
src/sys/compat/linux/common: linux_misc.c

Log Message:
no namlen on linux


To generate a diff of this commit:
cvs rdiff -u -r1.235 -r1.236 src/sys/compat/linux/common/linux_misc.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_misc.c
diff -u src/sys/compat/linux/common/linux_misc.c:1.235 src/sys/compat/linux/common/linux_misc.c:1.236
--- src/sys/compat/linux/common/linux_misc.c:1.235	Fri Jan 13 15:24:37 2017
+++ src/sys/compat/linux/common/linux_misc.c	Fri Jan 13 17:45:15 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc.c,v 1.235 2017/01/13 20:24:37 christos Exp $	*/
+/*	$NetBSD: linux_misc.c,v 1.236 2017/01/13 22:45:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.235 2017/01/13 20:24:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.236 2017/01/13 22:45:15 christos Exp $");
 
 #include 
 #include 
@@ -788,7 +788,7 @@ again:
 			*((char *)&idb + idb.d_reclen - 1) = bdp->d_type;
 		}
 		memcpy(idb.d_name, bdp->d_name,
-		MIN(sizeof(idb.d_name), idb.d_namlen));
+		MIN(sizeof(idb.d_name), bdp->d_namlen));
 		if ((error = copyout((void *)&idb, outp, linux_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat/common

2017-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 13 22:29:59 UTC 2017

Modified Files:
src/sys/compat/common: vfs_syscalls_12.c

Log Message:
use bdp, to avoid compiler warning.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/common/vfs_syscalls_12.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/vfs_syscalls_12.c
diff -u src/sys/compat/common/vfs_syscalls_12.c:1.32 src/sys/compat/common/vfs_syscalls_12.c:1.33
--- src/sys/compat/common/vfs_syscalls_12.c:1.32	Fri Jan 13 15:58:59 2017
+++ src/sys/compat/common/vfs_syscalls_12.c	Fri Jan 13 17:29:59 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_12.c,v 1.32 2017/01/13 20:58:59 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls_12.c,v 1.33 2017/01/13 22:29:59 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_12.c,v 1.32 2017/01/13 20:58:59 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_12.c,v 1.33 2017/01/13 22:29:59 christos Exp $");
 
 #include 
 #include 
@@ -197,7 +197,7 @@ again:
 		idb.d_type = (uint8_t)bdp->d_type;
 		idb.d_namlen = (uint8_t)bdp->d_namlen;
 		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name),
-		idb.d_namlen));
+		bdp->d_namlen));
 		if ((error = copyout(&idb, outp, old_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat

2017-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 13 21:02:05 UTC 2017

Modified Files:
src/sys/compat/linux/common: linux_file64.c
src/sys/compat/linux32/common: linux32_dirent.c

Log Message:
convert strcpy to a bounded copy to avoid compiler warnings, although the
reclen test prevents overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/common/linux_file64.c
cvs rdiff -u -r1.13 -r1.14 src/sys/compat/linux32/common/linux32_dirent.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_file64.c
diff -u src/sys/compat/linux/common/linux_file64.c:1.55 src/sys/compat/linux/common/linux_file64.c:1.56
--- src/sys/compat/linux/common/linux_file64.c:1.55	Fri Dec 27 09:17:11 2013
+++ src/sys/compat/linux/common/linux_file64.c	Fri Jan 13 16:02:05 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file64.c,v 1.55 2013/12/27 14:17:11 njoly Exp $	*/
+/*	$NetBSD: linux_file64.c,v 1.56 2017/01/13 21:02:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.55 2013/12/27 14:17:11 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.56 2017/01/13 21:02:05 christos Exp $");
 
 #include 
 #include 
@@ -354,7 +354,8 @@ again:
 		idb.d_type = bdp->d_type;
 		idb.d_off = off;
 		idb.d_reclen = (u_short)linux_reclen;
-		strcpy(idb.d_name, bdp->d_name);
+		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name),
+		   bdp.d_namlen);
 		if ((error = copyout((void *)&idb, outp, linux_reclen)))
 			goto out;
 		/* advance past this real entry */

Index: src/sys/compat/linux32/common/linux32_dirent.c
diff -u src/sys/compat/linux32/common/linux32_dirent.c:1.13 src/sys/compat/linux32/common/linux32_dirent.c:1.14
--- src/sys/compat/linux32/common/linux32_dirent.c:1.13	Fri Oct 14 05:23:29 2011
+++ src/sys/compat/linux32/common/linux32_dirent.c	Fri Jan 13 16:02:05 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_dirent.c,v 1.13 2011/10/14 09:23:29 hannken Exp $ */
+/*	$NetBSD: linux32_dirent.c,v 1.14 2017/01/13 21:02:05 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.13 2011/10/14 09:23:29 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.14 2017/01/13 21:02:05 christos Exp $");
 
 #include 
 #include 
@@ -215,7 +215,8 @@ again:
 			idb.d_off = (linux32_off_t)off;
 			idb.d_reclen = (u_short)linux32_reclen;
 		}
-		strcpy(idb.d_name, bdp->d_name);
+		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name), 
+		bdp->d_namlen));
 		idb.d_name[strlen(idb.d_name) + 1] = bdp->d_type;
 		if ((error = copyout((void *)&idb, outp, linux32_reclen)))
 			goto out;



CVS commit: src/sys/compat/common

2017-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 13 20:58:59 UTC 2017

Modified Files:
src/sys/compat/common: vfs_syscalls_12.c

Log Message:
convert strcpy to a bounded copy to avoid compiler warnings, although the
reclen test prevents overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/compat/common/vfs_syscalls_12.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/vfs_syscalls_12.c
diff -u src/sys/compat/common/vfs_syscalls_12.c:1.31 src/sys/compat/common/vfs_syscalls_12.c:1.32
--- src/sys/compat/common/vfs_syscalls_12.c:1.31	Fri Sep  5 05:21:54 2014
+++ src/sys/compat/common/vfs_syscalls_12.c	Fri Jan 13 15:58:59 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_12.c,v 1.31 2014/09/05 09:21:54 matt Exp $	*/
+/*	$NetBSD: vfs_syscalls_12.c,v 1.32 2017/01/13 20:58:59 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_12.c,v 1.31 2014/09/05 09:21:54 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_12.c,v 1.32 2017/01/13 20:58:59 christos Exp $");
 
 #include 
 #include 
@@ -196,7 +196,8 @@ again:
 		idb.d_reclen = (uint16_t)old_reclen;
 		idb.d_type = (uint8_t)bdp->d_type;
 		idb.d_namlen = (uint8_t)bdp->d_namlen;
-		strcpy(idb.d_name, bdp->d_name);
+		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name),
+		idb.d_namlen));
 		if ((error = copyout(&idb, outp, old_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat/common

2017-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 13 20:25:35 UTC 2017

Modified Files:
src/sys/compat/common: vfs_syscalls_43.c

Log Message:
convert strcpy to a bounded copy to avoid compiler warnings, although the
reclen test prevents overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/common/vfs_syscalls_43.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/vfs_syscalls_43.c
diff -u src/sys/compat/common/vfs_syscalls_43.c:1.58 src/sys/compat/common/vfs_syscalls_43.c:1.59
--- src/sys/compat/common/vfs_syscalls_43.c:1.58	Fri Aug 19 20:34:42 2016
+++ src/sys/compat/common/vfs_syscalls_43.c	Fri Jan 13 15:25:35 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_43.c,v 1.58 2016/08/20 00:34:42 mrg Exp $	*/
+/*	$NetBSD: vfs_syscalls_43.c,v 1.59 2017/01/13 20:25:35 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.58 2016/08/20 00:34:42 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.59 2017/01/13 20:25:35 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -475,7 +475,8 @@ again:
 		idb.d_fileno = (uint32_t)bdp->d_fileno;
 		idb.d_reclen = (uint16_t)old_reclen;
 		idb.d_namlen = (uint16_t)bdp->d_namlen;
-		strcpy(idb.d_name, bdp->d_name);
+		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name),
+		idb.d_namlen));
 		if ((error = copyout(&idb, outp, old_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat/linux/common

2017-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 13 20:24:37 UTC 2017

Modified Files:
src/sys/compat/linux/common: linux_misc.c

Log Message:
convert strcpy to a bounded copy to avoid compiler warnings, although the
reclen test prevents overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/sys/compat/linux/common/linux_misc.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_misc.c
diff -u src/sys/compat/linux/common/linux_misc.c:1.234 src/sys/compat/linux/common/linux_misc.c:1.235
--- src/sys/compat/linux/common/linux_misc.c:1.234	Mon Jan  2 11:32:10 2017
+++ src/sys/compat/linux/common/linux_misc.c	Fri Jan 13 15:24:37 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc.c,v 1.234 2017/01/02 16:32:10 manu Exp $	*/
+/*	$NetBSD: linux_misc.c,v 1.235 2017/01/13 20:24:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.234 2017/01/02 16:32:10 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.235 2017/01/13 20:24:37 christos Exp $");
 
 #include 
 #include 
@@ -787,7 +787,8 @@ again:
 			/* Linux puts d_type at the end of each record */
 			*((char *)&idb + idb.d_reclen - 1) = bdp->d_type;
 		}
-		strcpy(idb.d_name, bdp->d_name);
+		memcpy(idb.d_name, bdp->d_name,
+		MIN(sizeof(idb.d_name), idb.d_namlen));
 		if ((error = copyout((void *)&idb, outp, linux_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat/linux/common

2017-01-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan  2 20:10:44 UTC 2017

Modified Files:
src/sys/compat/linux/common: linux_signal.h

Log Message:
Provide a dummy linux_sigset_t for all architectures that do not have
any machdep one. This make kdump compile again.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/compat/linux/common/linux_signal.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/linux/common/linux_signal.h
diff -u src/sys/compat/linux/common/linux_signal.h:1.31 src/sys/compat/linux/common/linux_signal.h:1.32
--- src/sys/compat/linux/common/linux_signal.h:1.31	Mon Jan  2 16:32:10 2017
+++ src/sys/compat/linux/common/linux_signal.h	Mon Jan  2 20:10:44 2017
@@ -1,4 +1,4 @@
-/* 	$NetBSD: linux_signal.h,v 1.31 2017/01/02 16:32:10 manu Exp $	*/
+/* 	$NetBSD: linux_signal.h,v 1.32 2017/01/02 20:10:44 martin Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -46,6 +46,8 @@
 #include 
 #elif defined(__amd64__)
 #include 
+#else
+typedef void linux_sigset_t;
 #endif
 
 typedef struct {



CVS commit: src/sys/compat/linux

2017-01-02 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jan  2 16:32:10 UTC 2017

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_misc.c linux_signal.h

Log Message:
Add pselect6 Linux system call.
This lets Matlab R2016A run on NetBSD/amd64


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.121 -r1.122 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.90 -r1.91 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.60 -r1.61 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.233 -r1.234 src/sys/compat/linux/common/linux_misc.c
cvs rdiff -u -r1.30 -r1.31 src/sys/compat/linux/common/linux_signal.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/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.91 src/sys/compat/linux/arch/alpha/syscalls.master:1.92
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.91	Sun Jul 24 13:22:01 2016
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Mon Jan  2 16:32:09 2017
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.91 2016/07/24 13:22:01 njoly Exp $
+	$NetBSD: syscalls.master,v 1.92 2017/01/02 16:32:09 manu Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -731,7 +731,10 @@
 			linux_umode_t mode); }
 462	STD		{ int|linux_sys||faccessat(int fd, const char *path, \
 			int amode); }
-463	UNIMPL		pselect6
+463	STD		{ int|linux_sys||pselect6(int nfds, fd_set *readfds, \
+			   fd_set *writefds, fd_set *exceptfds, \
+			   struct linux_timespec *timeout, \
+			   linux_sized_sigset_t *ss); }
 464	STD		{ int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
 			struct linux_timespec *timeout, \
 			linux_sigset_t *sigset); }

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.57 src/sys/compat/linux/arch/amd64/syscalls.master:1.58
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.57	Sun Jul 24 13:22:01 2016
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Mon Jan  2 16:32:09 2017
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.57 2016/07/24 13:22:01 njoly Exp $
+	$NetBSD: syscalls.master,v 1.58 2017/01/02 16:32:09 manu Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -489,7 +489,10 @@
 			linux_umode_t mode); }
 269	STD		{ int|linux_sys||faccessat(int fd, const char *path, \
 			int amode); }
-270	UNIMPL		pselect6
+270	STD		{ int|linux_sys||pselect6(int nfds, fd_set *readfds, \
+			   fd_set *writefds, fd_set *exceptfds, \
+			   struct linux_timespec *timeout, \
+			   linux_sized_sigset_t *ss); }
 271	STD		{ int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
 			struct linux_timespec *timeout, \
 			linux_sigset_t *sigset); }

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.64 src/sys/compat/linux/arch/arm/syscalls.master:1.65
--- src/sys/compat/linux/arch/arm/syscalls.master:1.64	Sun Jul 24 13:22:01 2016
+++ src/sys/compat/linux/arch/arm/syscalls.master	Mon Jan  2 16:32:09 2017
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.64 2016/07/24 13:22:01 njoly Exp $
+	$NetBSD: syscalls.master,v 1.65 2017/01/02 16:32:09 manu Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -530,7 +530,10 @@
 			linux_umode_t mode); }
 334	STD		{ int|linux_sys||faccessat(int fd, const char *path, \
 			int amode); }
-335	UNIMPL		pselect6
+335	STD		{ int|linux_sys||pselect6(int nfds, fd_set *readfds, \
+			   fd_set *writefds, fd_set *exceptfds, \
+			   struct linux_timespec *timeout, \
+			   linux_sized_sigset_t *ss); }
 336	STD		{ int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
 			struct linux_timespec *timeout, \
 			linux_sigset_t *sigset); }

Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.121 src/sys/compat/linux/arch/i386/syscalls.master:1.122
--- src/sys/compat/linux/arch/i386/syscalls.master:1.121	Sun Jul 24 13:22:01 2016
+++ src/sys/compat/linux/arch/i386/syscalls.master	Mon Jan  2 16:32:09 2017
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.121 2016/07/24 13:22:01 njoly Exp $

CVS commit: src/sys/compat/netbsd32

2016-11-30 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Dec  1 05:07:27 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_fs.c

Log Message:
s/netbds32_copyout_statvfs/netbsd32_copyout_statvfs/


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/compat/netbsd32/netbsd32_fs.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_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.78 src/sys/compat/netbsd32/netbsd32_fs.c:1.79
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.78	Fri Oct 21 07:45:16 2016
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Thu Dec  1 05:07:27 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.78 2016/10/21 07:45:16 mrg Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.79 2016/12/01 05:07:27 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.78 2016/10/21 07:45:16 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.79 2016/12/01 05:07:27 mrg Exp $");
 
 #include 
 #include 
@@ -385,7 +385,7 @@ netbsd32___utimes50(struct lwp *l, const
 }
 
 static int
-netbds32_copyout_statvfs(const void *kp, void *up, size_t len)
+netbsd32_copyout_statvfs(const void *kp, void *up, size_t len)
 {
 	struct netbsd32_statvfs *sbuf_32;
 	int error;
@@ -412,7 +412,7 @@ netbsd32_statvfs1(struct lwp *l, const s
 	sb = STATVFSBUF_GET();
 	error = do_sys_pstatvfs(l, SCARG_P32(uap, path), SCARG(uap, flags), sb);
 	if (error == 0)
-		error = netbds32_copyout_statvfs(sb, SCARG_P32(uap, buf), 0);
+		error = netbsd32_copyout_statvfs(sb, SCARG_P32(uap, buf), 0);
 	STATVFSBUF_PUT(sb);
 	return error;
 }
@@ -431,7 +431,7 @@ netbsd32_fstatvfs1(struct lwp *l, const 
 	sb = STATVFSBUF_GET();
 	error = do_sys_fstatvfs(l, SCARG(uap, fd), SCARG(uap, flags), sb);
 	if (error == 0)
-		error = netbds32_copyout_statvfs(sb, SCARG_P32(uap, buf), 0);
+		error = netbsd32_copyout_statvfs(sb, SCARG_P32(uap, buf), 0);
 	STATVFSBUF_PUT(sb);
 	return error;
 }
@@ -446,7 +446,7 @@ netbsd32_getvfsstat(struct lwp *l, const
 	} */
 
 	return do_sys_getvfsstat(l, SCARG_P32(uap, buf), SCARG(uap, bufsize),
-	SCARG(uap, flags), netbds32_copyout_statvfs,
+	SCARG(uap, flags), netbsd32_copyout_statvfs,
 	sizeof (struct netbsd32_statvfs), retval);
 }
 
@@ -467,7 +467,7 @@ netbsd32___fhstatvfs140(struct lwp *l, c
 	SCARG(uap, flags));
 
 	if (error == 0)
-		error = netbds32_copyout_statvfs(sb, SCARG_P32(uap, buf), 0);
+		error = netbsd32_copyout_statvfs(sb, SCARG_P32(uap, buf), 0);
 	STATVFSBUF_PUT(sb);
 
 	return error;



CVS commit: src/sys/compat/netbsd32

2016-11-20 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 21 03:50:50 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_ioctl.c

Log Message:
Handle CLOCKCTL_NTP_ADJTIME32 even when compiled with !NTP;
just return ENOTTY in order to avoid possible failure when
main kernel and compat_netbsd32 module are compiled with
different NTP options in future.

Suggested and approved by mlelstv


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/compat/netbsd32/netbsd32_ioctl.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_ioctl.c
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.86 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.87
--- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.86	Tue Nov 15 10:57:57 2016
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c	Mon Nov 21 03:50:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.c,v 1.86 2016/11/15 10:57:57 rin Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.c,v 1.87 2016/11/21 03:50:50 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.86 2016/11/15 10:57:57 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.87 2016/11/21 03:50:50 rin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -1324,8 +1324,8 @@ netbsd32_ioctl(struct lwp *l, const stru
 	case CLOCKCTL_CLOCK_SETTIME32:
 		IOCTL_STRUCT_CONV_TO(CLOCKCTL_CLOCK_SETTIME,
 		clockctl_clock_settime);
-#ifdef NTP
 	case CLOCKCTL_NTP_ADJTIME32:
+#ifdef NTP
 		{
 			size = IOCPARM_LEN(CLOCKCTL_NTP_ADJTIME);
 			if (size > sizeof(stkbuf))
@@ -1346,7 +1346,10 @@ netbsd32_ioctl(struct lwp *l, const stru
 
 			break;
 		}
-#endif
+#else
+		error = ENOTTY;
+		break;
+#endif /* NTP */
 
 	case KIOCGSYMBOL32:
 		IOCTL_STRUCT_CONV_TO(KIOCGSYMBOL, ksyms_gsymbol);



CVS commit: src/sys/compat/netbsd32

2016-11-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Nov 15 10:57:57 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_ioctl.c

Log Message:
Protect NPT stuff by "#ifdef NTP". Fix non-NTP kernel.
Approved by martin.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/compat/netbsd32/netbsd32_ioctl.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_ioctl.c
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.85 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.86
--- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.85	Sat Nov 12 16:06:04 2016
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c	Tue Nov 15 10:57:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.c,v 1.85 2016/11/12 16:06:04 mlelstv Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.c,v 1.86 2016/11/15 10:57:57 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.85 2016/11/12 16:06:04 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.86 2016/11/15 10:57:57 rin Exp $");
+
+#if defined(_KERNEL_OPT)
+#include "opt_ntp.h"
+#endif
 
 #include 
 #include 
@@ -422,6 +426,7 @@ netbsd32_to_clockctl_clock_settime(
 	p->tp = NETBSD32PTR64(s32p->tp);
 }
 
+#ifdef NTP
 static inline void
 netbsd32_to_clockctl_ntp_adjtime(
 const struct netbsd32_clockctl_ntp_adjtime *s32p,
@@ -432,6 +437,7 @@ netbsd32_to_clockctl_ntp_adjtime(
 	p->tp = NETBSD32PTR64(s32p->tp);
 	p->retval = s32p->retval;
 }
+#endif
 
 static inline void
 netbsd32_to_ksyms_gsymbol(
@@ -842,6 +848,7 @@ netbsd32_from_clockctl_clock_settime(
 	NETBSD32PTR32(s32p->tp, p->tp);
 }
 
+#ifdef NTP
 static inline void
 netbsd32_from_clockctl_ntp_adjtime(
 const struct clockctl_ntp_adjtime *p,
@@ -852,6 +859,7 @@ netbsd32_from_clockctl_ntp_adjtime(
 	NETBSD32PTR32(s32p->tp, p->tp);
 	s32p->retval = p->retval;
 }
+#endif
 
 static inline void
 netbsd32_from_ksyms_gsymbol(
@@ -922,6 +930,7 @@ netbsd32_from_devrescanargs(
 	NETBSD32PTR32(s32p->locators, p->locators);
 }
 
+#ifdef NTP
 static int
 netbsd32_do_clockctl_ntp_adjtime(struct clockctl_ntp_adjtime *args)
 {
@@ -944,6 +953,7 @@ netbsd32_do_clockctl_ntp_adjtime(struct 
 
 	return error;
 }
+#endif
 
 /*
  * main ioctl syscall.
@@ -1314,6 +1324,7 @@ netbsd32_ioctl(struct lwp *l, const stru
 	case CLOCKCTL_CLOCK_SETTIME32:
 		IOCTL_STRUCT_CONV_TO(CLOCKCTL_CLOCK_SETTIME,
 		clockctl_clock_settime);
+#ifdef NTP
 	case CLOCKCTL_NTP_ADJTIME32:
 		{
 			size = IOCPARM_LEN(CLOCKCTL_NTP_ADJTIME);
@@ -1335,6 +1346,7 @@ netbsd32_ioctl(struct lwp *l, const stru
 
 			break;
 		}
+#endif
 
 	case KIOCGSYMBOL32:
 		IOCTL_STRUCT_CONV_TO(KIOCGSYMBOL, ksyms_gsymbol);



CVS commit: src/sys/compat/netbsd32

2016-11-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Nov 13 13:59:45 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_conv.h

Log Message:
correct wrong casting. some are considered harmless, but
- tv_sec in netbsd32_timeval is netbsd32_time_t (aka netbsd32_int64_t)
  rather than time_t (int64_t)
- tv_sec in netbsd32_timespec is netbsd32_time_t rather than
  netbsd32_long (y2038 problem)
approved by martin


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 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.30 src/sys/compat/netbsd32/netbsd32_conv.h:1.31
--- src/sys/compat/netbsd32/netbsd32_conv.h:1.30	Mon Jun 22 10:35:00 2015
+++ src/sys/compat/netbsd32/netbsd32_conv.h	Sun Nov 13 13:59:45 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_conv.h,v 1.30 2015/06/22 10:35:00 mrg Exp $	*/
+/*	$NetBSD: netbsd32_conv.h,v 1.31 2016/11/13 13:59:45 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -63,7 +63,7 @@ netbsd32_from_timeval50(const struct tim
 struct netbsd32_timeval50 *tv32)
 {
 
-	tv32->tv_sec = (netbsd32_long)tv->tv_sec;
+	tv32->tv_sec = (netbsd32_time50_t)tv->tv_sec;
 	tv32->tv_usec = (netbsd32_long)tv->tv_usec;
 }
 
@@ -72,8 +72,8 @@ netbsd32_from_timeval(const struct timev
 struct netbsd32_timeval *tv32)
 {
 
-	tv32->tv_sec = (time_t)tv->tv_sec;
-	tv32->tv_usec = (suseconds_t)tv->tv_usec;
+	tv32->tv_sec = (netbsd32_time_t)tv->tv_sec;
+	tv32->tv_usec = tv->tv_usec;
 }
 
 static __inline void
@@ -82,7 +82,7 @@ netbsd32_to_timeval50(const struct netbs
 {
 
 	tv->tv_sec = (time_t)tv32->tv_sec;
-	tv->tv_usec = (suseconds_t)tv32->tv_usec;
+	tv->tv_usec = tv32->tv_usec;
 }
 
 static __inline void
@@ -91,7 +91,7 @@ netbsd32_to_timeval(const struct netbsd3
 {
 
 	tv->tv_sec = (time_t)tv32->tv_sec;
-	tv->tv_usec = (suseconds_t)tv32->tv_usec;
+	tv->tv_usec = tv32->tv_usec;
 }
 
 static __inline void
@@ -157,7 +157,7 @@ netbsd32_from_timespec50(const struct ti
 struct netbsd32_timespec50 *s32p)
 {
 
-	s32p->tv_sec = (netbsd32_long)p->tv_sec;
+	s32p->tv_sec = (netbsd32_time50_t)p->tv_sec;
 	s32p->tv_nsec = (netbsd32_long)p->tv_nsec;
 }
 
@@ -166,7 +166,7 @@ netbsd32_from_timespec(const struct time
 struct netbsd32_timespec *s32p)
 {
 
-	s32p->tv_sec = (netbsd32_long)p->tv_sec;
+	s32p->tv_sec = (netbsd32_time_t)p->tv_sec;
 	s32p->tv_nsec = (netbsd32_long)p->tv_nsec;
 }
 



CVS commit: src/sys/compat/netbsd32

2016-11-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Nov 13 13:52:41 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
tv_usec in netbsd32_timeval is suseconds_t (aka int32_t) rather than
netbsd32_long (considered harmless)

approved by martin


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/compat/netbsd32/netbsd32.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.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.113 src/sys/compat/netbsd32/netbsd32.h:1.114
--- src/sys/compat/netbsd32/netbsd32.h:1.113	Wed Oct 19 09:44:01 2016
+++ src/sys/compat/netbsd32/netbsd32.h	Sun Nov 13 13:52:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.113 2016/10/19 09:44:01 skrll Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.114 2016/11/13 13:52:41 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -210,7 +210,7 @@ struct netbsd32_timeval50 {
 typedef netbsd32_pointer_t netbsd32_timevalp_t;
 struct netbsd32_timeval {
 	netbsd32_time_t	tv_sec;		/* seconds */
-	netbsd32_long	tv_usec;	/* and microseconds */
+	suseconds_t	tv_usec;	/* and microseconds */
 };
 
 typedef netbsd32_pointer_t netbsd32_timezonep_t;



CVS commit: src/sys/compat/netbsd32

2016-11-12 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Nov 12 16:06:04 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h

Log Message:
Fix netbsd32 emulation for clockctl_ntp_adjtime.

The ioctl args reference a timex structure that needs to be
transformed to 64bit layout and back.

The 32bit ioctl definition was wrong for mips, as register_t is 64bit
for N32 abi.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.54 -r1.55 src/sys/compat/netbsd32/netbsd32_ioctl.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_ioctl.c
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.84 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.85
--- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.84	Wed Jul 13 11:11:53 2016
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c	Sat Nov 12 16:06:04 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.c,v 1.84 2016/07/13 11:11:53 jmcneill Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.c,v 1.85 2016/11/12 16:06:04 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.84 2016/07/13 11:11:53 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.85 2016/11/12 16:06:04 mlelstv Exp $");
 
 #include 
 #include 
@@ -83,6 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_ioc
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -921,6 +922,29 @@ netbsd32_from_devrescanargs(
 	NETBSD32PTR32(s32p->locators, p->locators);
 }
 
+static int
+netbsd32_do_clockctl_ntp_adjtime(struct clockctl_ntp_adjtime *args)
+{
+
+	struct netbsd32_timex ntv32;
+	struct timex ntv;
+	int error;
+
+	error = copyin(args->tp, &ntv32, sizeof(ntv32));
+	if (error)
+		return (error);
+
+	netbsd32_to_timex(&ntv32, &ntv);
+	ntp_adjtime1(&ntv);
+	netbsd32_from_timex(&ntv, &ntv32);
+
+	error = copyout(&ntv32, args->tp, sizeof(ntv));
+	if (error == 0)
+		args->retval = ntp_timestatus();
+
+	return error;
+}
+
 /*
  * main ioctl syscall.
  *
@@ -1291,8 +1315,26 @@ netbsd32_ioctl(struct lwp *l, const stru
 		IOCTL_STRUCT_CONV_TO(CLOCKCTL_CLOCK_SETTIME,
 		clockctl_clock_settime);
 	case CLOCKCTL_NTP_ADJTIME32:
-		IOCTL_STRUCT_CONV_TO(CLOCKCTL_NTP_ADJTIME,
-		clockctl_ntp_adjtime);
+		{
+			size = IOCPARM_LEN(CLOCKCTL_NTP_ADJTIME);
+			if (size > sizeof(stkbuf))
+data = memp = kmem_alloc(size, KM_SLEEP);
+			else
+data = (void *)stkbuf;
+
+			netbsd32_to_clockctl_ntp_adjtime(
+(const struct netbsd32_clockctl_ntp_adjtime *)data32,
+(struct clockctl_ntp_adjtime *)data,
+CLOCKCTL_NTP_ADJTIME);
+			error = netbsd32_do_clockctl_ntp_adjtime(
+(struct clockctl_ntp_adjtime *)data);
+			netbsd32_from_clockctl_ntp_adjtime(
+(const struct clockctl_ntp_adjtime *)data,
+(struct netbsd32_clockctl_ntp_adjtime *)data32,
+CLOCKCTL_NTP_ADJTIME);
+
+			break;
+		}
 
 	case KIOCGSYMBOL32:
 		IOCTL_STRUCT_CONV_TO(KIOCGSYMBOL, ksyms_gsymbol);

Index: src/sys/compat/netbsd32/netbsd32_ioctl.h
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.54 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.55
--- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.54	Wed Jul 13 11:11:53 2016
+++ src/sys/compat/netbsd32/netbsd32_ioctl.h	Sat Nov 12 16:06:04 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.h,v 1.54 2016/07/13 11:11:53 jmcneill Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.h,v 1.55 2016/11/12 16:06:04 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -552,7 +552,7 @@ struct netbsd32_clockctl_clock_settime {
 
 struct netbsd32_clockctl_ntp_adjtime {
 	netbsd32_timexp_t tp;
-	/* register_t */ int32_t retval;
+	register32_t retval;
 };
 
 #define CLOCKCTL_NTP_ADJTIME32 _IOWR('C', 0x8, \



CVS commit: src/sys/compat

2016-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 10 17:00:51 UTC 2016

Modified Files:
src/sys/compat/linux/common: linux_misc.c
src/sys/compat/linux32/common: linux32_wait.c
src/sys/compat/osf1: osf1_misc.c
src/sys/compat/svr4: svr4_misc.c
src/sys/compat/svr4_32: svr4_32_misc.c

Log Message:
GC WOPTSCHECKED


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/sys/compat/linux/common/linux_misc.c
cvs rdiff -u -r1.11 -r1.12 src/sys/compat/linux32/common/linux32_wait.c
cvs rdiff -u -r1.86 -r1.87 src/sys/compat/osf1/osf1_misc.c
cvs rdiff -u -r1.156 -r1.157 src/sys/compat/svr4/svr4_misc.c
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/svr4_32/svr4_32_misc.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_misc.c
diff -u src/sys/compat/linux/common/linux_misc.c:1.232 src/sys/compat/linux/common/linux_misc.c:1.233
--- src/sys/compat/linux/common/linux_misc.c:1.232	Wed Aug 31 04:12:44 2016
+++ src/sys/compat/linux/common/linux_misc.c	Thu Nov 10 12:00:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc.c,v 1.232 2016/08/31 08:12:44 njoly Exp $	*/
+/*	$NetBSD: linux_misc.c,v 1.233 2016/11/10 17:00:51 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.232 2016/08/31 08:12:44 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.233 2016/11/10 17:00:51 christos Exp $");
 
 #include 
 #include 
@@ -223,10 +223,10 @@ linux_sys_wait4(struct lwp *l, const str
 	proc_t *p;
 
 	linux_options = SCARG(uap, options);
-	options = WOPTSCHECKED;
 	if (linux_options & ~(LINUX_WAIT4_KNOWNFLAGS))
 		return (EINVAL);
 
+	options = 0;
 	if (linux_options & LINUX_WAIT4_WNOHANG)
 		options |= WNOHANG;
 	if (linux_options & LINUX_WAIT4_WUNTRACED)

Index: src/sys/compat/linux32/common/linux32_wait.c
diff -u src/sys/compat/linux32/common/linux32_wait.c:1.11 src/sys/compat/linux32/common/linux32_wait.c:1.12
--- src/sys/compat/linux32/common/linux32_wait.c:1.11	Wed Nov  4 16:23:03 2009
+++ src/sys/compat/linux32/common/linux32_wait.c	Thu Nov 10 12:00:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_wait.c,v 1.11 2009/11/04 21:23:03 rmind Exp $ */
+/*	$NetBSD: linux32_wait.c,v 1.12 2016/11/10 17:00:51 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_wait.c,v 1.11 2009/11/04 21:23:03 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_wait.c,v 1.12 2016/11/10 17:00:51 christos Exp $");
 
 #include 
 #include 
@@ -105,10 +105,10 @@ linux32_sys_wait4(struct lwp *l, const s
 	proc_t *p;
 
 	linux_options = SCARG(uap, options);
-	options = WOPTSCHECKED;
 	if (linux_options & ~(LINUX_WAIT4_KNOWNFLAGS))
 		return EINVAL;
 
+	options = 0;
 	if (linux_options & LINUX_WAIT4_WNOHANG)
 		options |= WNOHANG;
 	if (linux_options & LINUX_WAIT4_WUNTRACED)

Index: src/sys/compat/osf1/osf1_misc.c
diff -u src/sys/compat/osf1/osf1_misc.c:1.86 src/sys/compat/osf1/osf1_misc.c:1.87
--- src/sys/compat/osf1/osf1_misc.c:1.86	Fri Jul 22 06:02:08 2011
+++ src/sys/compat/osf1/osf1_misc.c	Thu Nov 10 12:00:51 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_misc.c,v 1.86 2011/07/22 10:02:08 njoly Exp $ */
+/* $NetBSD: osf1_misc.c,v 1.87 2016/11/10 17:00:51 christos Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: osf1_misc.c,v 1.86 2011/07/22 10:02:08 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_misc.c,v 1.87 2016/11/10 17:00:51 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_syscall_debug.h"
@@ -406,7 +406,7 @@ osf1_sys_wait4(struct lwp *l, const stru
 	if (leftovers != 0)
 		return (EINVAL);
 
-	error = do_sys_wait(&pid, &status, options | WOPTSCHECKED,
+	error = do_sys_wait(&pid, &status, options,
 	SCARG(uap, rusage) != NULL ? &netbsd_rusage : NULL);
 
 	retval[0] = pid;

Index: src/sys/compat/svr4/svr4_misc.c
diff -u src/sys/compat/svr4/svr4_misc.c:1.156 src/sys/compat/svr4/svr4_misc.c:1.157
--- src/sys/compat/svr4/svr4_misc.c:1.156	Fri Sep  5 05:21:55 2014
+++ src/sys/compat/svr4/svr4_misc.c	Thu Nov 10 12:00:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_misc.c,v 1.156 2014/09/05 09:21:55 matt Exp $	 */
+/*	$NetBSD: svr4_misc.c,v 1.157 2016/11/10 17:00:51 christos Exp $	 */
 
 /*-
  * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.156 2014/09/05 09:21:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.157 2016/11/10 17:00:51 christos Exp $");
 
 #include 
 #include 
@@ -1030,7 +1030,7 @@ svr4_sys_waitsys(struct lwp *l, const st
 	}
 
 	/* Translate options */
-	options = WOPTSCHECKED;
+	options = 0;
 	if (SCARG(uap, options) & SVR4_WNOWAIT)
 		op

CVS commit: src/sys/compat/common

2016-11-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov  3 22:23:04 UTC 2016

Modified Files:
src/sys/compat/common: Makefile Makefile.sysio

Log Message:
Move if_43.c out of Makefile.sysio and into the main Makefile.

The former location gets included in both libcompat and the compat
module, leading to redefined symbols when the module is loaded.  By
moving it to the main Makefile, it gets included only in libcompat.

XXX This still isn't an ideal solution, but it will suffice until
XXX PR kern/51598 is addressed.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/common/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/Makefile.sysio

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/Makefile
diff -u src/sys/compat/common/Makefile:1.58 src/sys/compat/common/Makefile:1.59
--- src/sys/compat/common/Makefile:1.58	Thu Nov  3 04:26:58 2016
+++ src/sys/compat/common/Makefile	Thu Nov  3 22:23:03 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.58 2016/11/03 04:26:58 riastradh Exp $
+#	$NetBSD: Makefile,v 1.59 2016/11/03 22:23:03 pgoyette Exp $
 
 LIB=		compat
 NOPIC=		# defined
@@ -11,6 +11,11 @@ CPPFLAGS=	${COMPATCPPFLAGS} ${SKIP_AUTOD
 # Common compatibility code, used by all emulations
 SRCS=	compat_exec.c compat_util.c
 
+# Compatability code for 4.3BSD 
+SRCS+=	if_43.c
+
+# Include compatability code common to libcompat and the compat module
+
 .include "Makefile.sysio"
 .include "Makefile.sysv"
 

Index: src/sys/compat/common/Makefile.sysio
diff -u src/sys/compat/common/Makefile.sysio:1.5 src/sys/compat/common/Makefile.sysio:1.6
--- src/sys/compat/common/Makefile.sysio:1.5	Thu Nov  3 11:32:15 2016
+++ src/sys/compat/common/Makefile.sysio	Thu Nov  3 22:23:03 2016
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile.sysio,v 1.5 2016/11/03 11:32:15 pgoyette Exp $
+#	$NetBSD: Makefile.sysio,v 1.6 2016/11/03 22:23:03 pgoyette Exp $
 
 # Sources for syscall and ioctl compatibility across the versions.
 
 # Compatibility code for 4.3BSD
 SRCS+=	kern_exit_43.c kern_info_43.c kern_resource_43.c kern_sig_43.c \
-	tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c if_43.c
+	tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c
 
 # Compatibility code for NetBSD 0.9
 SRCS+=	kern_info_09.c



CVS commit: src/sys/compat/common

2016-11-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov  3 11:32:15 UTC 2016

Modified Files:
src/sys/compat/common: Makefile.sysio

Log Message:
Hmmm, if we omit if_43.c from the SRCS list, then we break the i386
build for one of the XEN kernels.

Adding it back to the list.  At least the build will be successful.

XXX This is probably not the end of this saga, as we still have the
XXX redefined-symbol issue when loading the compat module on amd64.
XXX But for now, a working build for the vast majority of users
XXX (including our automated test suites) is more important than a
XXX successfully-loadable compat module.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/Makefile.sysio

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/Makefile.sysio
diff -u src/sys/compat/common/Makefile.sysio:1.4 src/sys/compat/common/Makefile.sysio:1.5
--- src/sys/compat/common/Makefile.sysio:1.4	Thu Nov  3 06:54:08 2016
+++ src/sys/compat/common/Makefile.sysio	Thu Nov  3 11:32:15 2016
@@ -1,19 +1,10 @@
-#	$NetBSD: Makefile.sysio,v 1.4 2016/11/03 06:54:08 pgoyette Exp $
+#	$NetBSD: Makefile.sysio,v 1.5 2016/11/03 11:32:15 pgoyette Exp $
 
 # Sources for syscall and ioctl compatibility across the versions.
 
 # Compatibility code for 4.3BSD
 SRCS+=	kern_exit_43.c kern_info_43.c kern_resource_43.c kern_sig_43.c \
-	tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c
-
-# if_43.o gets included from libcompat automatically, due to two calls
-# to compat_cvtcmd() in if.c.  Ideally, if.c would be modified to have
-# a pointer to a no-op compat_cvtcmd() and that pointer would get
-# replaced by compat_mnodcmd(MODULE_CMD_INIT, ...) code.  But for now,
-# just don't include it in the compat module at all.
-#
-#SRCS+=	if_43.c
-#
+	tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c if_43.c
 
 # Compatibility code for NetBSD 0.9
 SRCS+=	kern_info_09.c



CVS commit: src/sys/compat/common

2016-11-02 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov  3 06:54:08 UTC 2016

Modified Files:
src/sys/compat/common: Makefile.sysio

Log Message:
Really comment out if_43.c this time.  (I need sleep and/or caffeine.)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/common/Makefile.sysio

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/Makefile.sysio
diff -u src/sys/compat/common/Makefile.sysio:1.3 src/sys/compat/common/Makefile.sysio:1.4
--- src/sys/compat/common/Makefile.sysio:1.3	Thu Nov  3 06:28:04 2016
+++ src/sys/compat/common/Makefile.sysio	Thu Nov  3 06:54:08 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sysio,v 1.3 2016/11/03 06:28:04 pgoyette Exp $
+#	$NetBSD: Makefile.sysio,v 1.4 2016/11/03 06:54:08 pgoyette Exp $
 
 # Sources for syscall and ioctl compatibility across the versions.
 
@@ -11,8 +11,8 @@ SRCS+=	kern_exit_43.c kern_info_43.c ker
 # a pointer to a no-op compat_cvtcmd() and that pointer would get
 # replaced by compat_mnodcmd(MODULE_CMD_INIT, ...) code.  But for now,
 # just don't include it in the compat module at all.
-
-SRCS+=	if_43.c
+#
+#SRCS+=	if_43.c
 #
 
 # Compatibility code for NetBSD 0.9



CVS commit: src/sys/compat/common

2016-11-02 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov  3 06:28:04 UTC 2016

Modified Files:
src/sys/compat/common: Makefile.sysio

Log Message:
Use proper characgter to introduce comments!


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/Makefile.sysio

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/Makefile.sysio
diff -u src/sys/compat/common/Makefile.sysio:1.2 src/sys/compat/common/Makefile.sysio:1.3
--- src/sys/compat/common/Makefile.sysio:1.2	Thu Nov  3 06:22:29 2016
+++ src/sys/compat/common/Makefile.sysio	Thu Nov  3 06:28:04 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sysio,v 1.2 2016/11/03 06:22:29 pgoyette Exp $
+#	$NetBSD: Makefile.sysio,v 1.3 2016/11/03 06:28:04 pgoyette Exp $
 
 # Sources for syscall and ioctl compatibility across the versions.
 
@@ -6,15 +6,14 @@
 SRCS+=	kern_exit_43.c kern_info_43.c kern_resource_43.c kern_sig_43.c \
 	tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c
 
-/*
- * if_43.o gets included from libcompat automatically, due to two calls
- * to compat_cvtcmd() in if.c.  Ideally, if.c would be modified to have
- * a pointer to a no-op compat_cvtcmd() and that pointer would get
- * replaced by compat_mnodcmd(MODULE_CMD_INIT, ...) code.  But for now,
- * just don't include it in the compat module at all.
+# if_43.o gets included from libcompat automatically, due to two calls
+# to compat_cvtcmd() in if.c.  Ideally, if.c would be modified to have
+# a pointer to a no-op compat_cvtcmd() and that pointer would get
+# replaced by compat_mnodcmd(MODULE_CMD_INIT, ...) code.  But for now,
+# just don't include it in the compat module at all.
 
 SRCS+=	if_43.c
- */
+#
 
 # Compatibility code for NetBSD 0.9
 SRCS+=	kern_info_09.c



CVS commit: src/sys/compat/common

2016-11-02 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov  3 06:22:29 UTC 2016

Modified Files:
src/sys/compat/common: Makefile.sysio

Log Message:
if_43.o gets included from libcompat automatically, due to two calls
to compat_cvtcmd() in if.c.  Ideally, if.c would be modified to have
a pointer to a no-op compat_cvtcmd() and that pointer would get
replaced by compat_modcmd(MODULE_CMD_INIT, ...) code.  But for now,
just don't include it in the compat module at all.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/common/Makefile.sysio

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/Makefile.sysio
diff -u src/sys/compat/common/Makefile.sysio:1.1 src/sys/compat/common/Makefile.sysio:1.2
--- src/sys/compat/common/Makefile.sysio:1.1	Thu Nov  3 04:26:58 2016
+++ src/sys/compat/common/Makefile.sysio	Thu Nov  3 06:22:29 2016
@@ -1,10 +1,20 @@
-#	$NetBSD: Makefile.sysio,v 1.1 2016/11/03 04:26:58 riastradh Exp $
+#	$NetBSD: Makefile.sysio,v 1.2 2016/11/03 06:22:29 pgoyette Exp $
 
 # Sources for syscall and ioctl compatibility across the versions.
 
 # Compatibility code for 4.3BSD
 SRCS+=	kern_exit_43.c kern_info_43.c kern_resource_43.c kern_sig_43.c \
-	tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c if_43.c
+	tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c
+
+/*
+ * if_43.o gets included from libcompat automatically, due to two calls
+ * to compat_cvtcmd() in if.c.  Ideally, if.c would be modified to have
+ * a pointer to a no-op compat_cvtcmd() and that pointer would get
+ * replaced by compat_mnodcmd(MODULE_CMD_INIT, ...) code.  But for now,
+ * just don't include it in the compat module at all.
+
+SRCS+=	if_43.c
+ */
 
 # Compatibility code for NetBSD 0.9
 SRCS+=	kern_info_09.c



CVS commit: src/sys/compat/common

2016-11-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Nov  3 03:37:06 UTC 2016

Modified Files:
src/sys/compat/common: kern_time_30.c rtsock_14.c

Log Message:
Sprinkle #ifdef _KERNEL_OPT.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/kern_time_30.c \
src/sys/compat/common/rtsock_14.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/kern_time_30.c
diff -u src/sys/compat/common/kern_time_30.c:1.4 src/sys/compat/common/kern_time_30.c:1.5
--- src/sys/compat/common/kern_time_30.c:1.4	Wed Jan 19 10:21:16 2011
+++ src/sys/compat/common/kern_time_30.c	Thu Nov  3 03:37:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time_30.c,v 1.4 2011/01/19 10:21:16 tsutsui Exp $	*/
+/*	$NetBSD: kern_time_30.c,v 1.5 2016/11/03 03:37:06 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,9 +36,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time_30.c,v 1.4 2011/01/19 10:21:16 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_30.c,v 1.5 2016/11/03 03:37:06 riastradh Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_ntp.h"
+#endif
 
 #include 
 #include 
Index: src/sys/compat/common/rtsock_14.c
diff -u src/sys/compat/common/rtsock_14.c:1.4 src/sys/compat/common/rtsock_14.c:1.5
--- src/sys/compat/common/rtsock_14.c:1.4	Sun Jul 17 20:54:50 2011
+++ src/sys/compat/common/rtsock_14.c	Thu Nov  3 03:37:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_14.c,v 1.4 2011/07/17 20:54:50 joerg Exp $	*/
+/*	$NetBSD: rtsock_14.c,v 1.5 2016/11/03 03:37:06 riastradh Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,9 +61,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_14.c,v 1.4 2011/07/17 20:54:50 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_14.c,v 1.5 2016/11/03 03:37:06 riastradh Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_inet.h"
+#endif
 
 #include 
 #include 



CVS commit: src/sys/compat/netbsd32

2016-10-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 28 23:44:54 UTC 2016

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.124 -r1.125 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.15 -r1.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.125 src/sys/compat/netbsd32/netbsd32_syscall.h:1.126
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.125	Wed Oct 19 05:45:25 2016
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Fri Oct 28 19:44:54 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.125 2016/10/19 09:45:25 skrll Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.126 2016/10/28 23:44:54 christos Exp $ */
 
 /*
  * System call numbers.
Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.125 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.126
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.125	Wed Oct 19 05:45:25 2016
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Fri Oct 28 19:44:54 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.125 2016/10/19 09:45:25 skrll Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.126 2016/10/28 23:44:54 christos Exp $ */
 
 /*
  * System call argument lists.

Index: src/sys/compat/netbsd32/netbsd32_syscalls.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.124 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.125
--- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.124	Wed Oct 19 05:45:25 2016
+++ src/sys/compat/netbsd32/netbsd32_syscalls.c	Fri Oct 28 19:44:54 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_syscalls.c,v 1.124 2016/10/19 09:45:25 skrll Exp $ */
+/* $NetBSD: netbsd32_syscalls.c,v 1.125 2016/10/28 23:44:54 christos Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.124 2016/10/19 09:45:25 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.125 2016/10/28 23:44:54 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
Index: src/sys/compat/netbsd32/netbsd32_sysent.c
diff -u src/sys/compat/netbsd32/netbsd32_sysent.c:1.124 src/sys/compat/netbsd32/netbsd32_sysent.c:1.125
--- src/sys/compat/netbsd32/netbsd32_sysent.c:1.124	Wed Oct 19 05:45:25 2016
+++ src/sys/compat/netbsd32/netbsd32_sysent.c	Fri Oct 28 19:44:54 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_sysent.c,v 1.124 2016/10/19 09:45:25 skrll Exp $ */
+/* $NetBSD: netbsd32_sysent.c,v 1.125 2016/10/28 23:44:54 christos Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.124 2016/10/19 09:45:25 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.125 2016/10/28 23:44:54 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -774,10 +774,12 @@ struct sysent netbsd32_sysent[] = {
 	},		/* 172 = filler */
 	{
 		ns(struct netbsd32_pread_args),
+		.sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG4_64,
 		.sy_call = (sy_call_t *)netbsd32_pread
 	},		/* 173 = netbsd32_pread */
 	{
 		ns(struct netbsd32_pwrite_args),
+		.sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG4_64,
 		.sy_call = (sy_call_t *)netbsd32_pwrite
 	},		/* 174 = netbsd32_pwrite */
 #if defined(NTP) || !defined(_KERNEL_OPT)
@@ -870,6 +872,7 @@ struct sysent netbsd32_sysent[] = {
 	},		/* 196 = compat_12_netbsd32_getdirentries */
 	{
 		ns(struct netbsd32_mmap_args),
+		.sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG6_64,
 		.sy_call = (sy_call_t *)netbsd32_mmap
 	},		/* 197 = netbsd32_mmap */
 	{
@@ -879,14 +882,17 @@ struct sysent netbsd32_sysent[] = {
 	},		/* 198 = netbsd32syscall */
 	{
 		ns(struct netbsd32_lseek_args),
+		.sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG2_64 | SYCALL_RET_64,
 		.sy_call = (sy_call_t *)netbsd32_lseek
 	},		/* 199 = netbsd32_lseek */
 	{
 		ns(struct netbsd32_truncate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG2_64,
 		.sy_call = (sy_call_t *)netbsd32_truncate
 	},		/* 200 = netbsd32_truncate */
 	{
 		ns(struct netbsd32_ftruncate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG2_64,
 		.sy_call = (sy_call_t *)netbsd32_ftruncate
 	},		/* 201 = netbsd32_ftruncate */
 	{
@@ -1224,10 +1230,12 @@ struct sysent netbsd32_sysent[] = {
 	},		/* 288 = netbsd32_fktrace */
 	{
 		ns(struct

CVS commit: src/sys/compat/netbsd32

2016-10-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Oct 21 07:45:16 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_fs.c

Log Message:
add a ktrgenio() call to netbsd32___getdents30().
from dholland, tested by me.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/compat/netbsd32/netbsd32_fs.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_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.77 src/sys/compat/netbsd32/netbsd32_fs.c:1.78
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.77	Wed Oct 19 09:55:10 2016
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Fri Oct 21 07:45:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.77 2016/10/19 09:55:10 skrll Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.78 2016/10/21 07:45:16 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.77 2016/10/19 09:55:10 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.78 2016/10/21 07:45:16 mrg Exp $");
 
 #include 
 #include 
@@ -519,6 +519,7 @@ netbsd32___getdents30(struct lwp *l,
 	}
 	error = vn_readdir(fp, SCARG_P32(uap, buf),
 	UIO_USERSPACE, SCARG(uap, count), &done, l, 0, 0);
+	ktrgenio(SCARG(uap, fd), UIO_READ, SCARG_P32(uap, buf), done, error);
 	*retval = done;
  out:
 	fd_putfile(SCARG(uap, fd));



CVS commit: src/sys/compat/netbsd32

2016-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct 19 09:55:10 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_fs.c

Log Message:
Oops... unintended commit - one day maybe.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/netbsd32/netbsd32_fs.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_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.76 src/sys/compat/netbsd32/netbsd32_fs.c:1.77
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.76	Wed Oct 19 09:44:01 2016
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Wed Oct 19 09:55:10 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.76 2016/10/19 09:44:01 skrll Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.77 2016/10/19 09:55:10 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.76 2016/10/19 09:44:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.77 2016/10/19 09:55:10 skrll Exp $");
 
 #include 
 #include 
@@ -519,7 +519,6 @@ netbsd32___getdents30(struct lwp *l,
 	}
 	error = vn_readdir(fp, SCARG_P32(uap, buf),
 	UIO_USERSPACE, SCARG(uap, count), &done, l, 0, 0);
-	ktrgenio(SCARG(uap, fd), UIO_READ, SCARG_P32(uap, buf), done, error);
 	*retval = done;
  out:
 	fd_putfile(SCARG(uap, fd));



CVS commit: src/sys/compat/netbsd32

2016-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct 19 09:45:25 UTC 2016

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

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.123 -r1.124 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.14 -r1.15 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.124 src/sys/compat/netbsd32/netbsd32_syscall.h:1.125
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.124	Fri Sep 23 14:12:24 2016
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Wed Oct 19 09:45:25 2016
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.124 2016/09/23 14:12:24 skrll Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.125 2016/10/19 09:45:25 skrll Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.114 2016/09/23 14:10:28 skrll Exp
+ * created from	NetBSD: syscalls.master,v 1.115 2016/10/19 09:44:01 skrll Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.124 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.125
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.124	Fri Sep 23 14:12:24 2016
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Wed Oct 19 09:45:25 2016
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.124 2016/09/23 14:12:24 skrll Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.125 2016/10/19 09:45:25 skrll Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.114 2016/09/23 14:10:28 skrll Exp
+ * created from	NetBSD: syscalls.master,v 1.115 2016/10/19 09:44:01 skrll Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_

Index: src/sys/compat/netbsd32/netbsd32_syscalls.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.123 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.124
--- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.123	Fri Sep 23 14:12:24 2016
+++ src/sys/compat/netbsd32/netbsd32_syscalls.c	Wed Oct 19 09:45:25 2016
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls.c,v 1.123 2016/09/23 14:12:24 skrll Exp $ */
+/* $NetBSD: netbsd32_syscalls.c,v 1.124 2016/10/19 09:45:25 skrll Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.114 2016/09/23 14:10:28 skrll Exp
+ * created from	NetBSD: syscalls.master,v 1.115 2016/10/19 09:44:01 skrll Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.123 2016/09/23 14:12:24 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.124 2016/10/19 09:45:25 skrll Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
Index: src/sys/compat/netbsd32/netbsd32_sysent.c
diff -u src/sys/compat/netbsd32/netbsd32_sysent.c:1.123 src/sys/compat/netbsd32/netbsd32_sysent.c:1.124
--- src/sys/compat/netbsd32/netbsd32_sysent.c:1.123	Fri Sep 23 14:12:25 2016
+++ src/sys/compat/netbsd32/netbsd32_sysent.c	Wed Oct 19 09:45:25 2016
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_sysent.c,v 1.123 2016/09/23 14:12:25 skrll Exp $ */
+/* $NetBSD: netbsd32_sysent.c,v 1.124 2016/10/19 09:45:25 skrll Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.114 2016/09/23 14:10:28 skrll Exp
+ * created from	NetBSD: syscalls.master,v 1.115 2016/10/19 09:44:01 skrll Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.123 2016/09/23 14:12:25 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.124 2016/10/19 09:45:25 skrll Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -220,7 +220,7 @@ struct sysent netbsd32_sysent[] = {
 	},		/* 25 = geteuid */
 	{
 		ns(struct netbsd32_ptrace_args),
-		.sy_call = (sy_call_t *)netbsd32_ptrace
+		.sy_call = (sy_call_t *)sys_nomodule
 	},		/* 26 = netbsd32_ptrace */
 	{
 		ns(struct netbsd32_recvmsg_args),

Index: src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c:1.6 src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c:1.7
--- src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c:1.6	Fri Sep 23 14:12:25 2016
+++ src/sys/compat/netbsd32/netbsd32_sy

CVS commit: src/sys/compat/netbsd32

2016-10-16 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Oct 16 20:09:53 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_fs.c

Log Message:
Use ktrgeniov, not ktrgenio, in writev.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/compat/netbsd32/netbsd32_fs.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_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.74 src/sys/compat/netbsd32/netbsd32_fs.c:1.75
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.74	Mon Mar 21 22:42:56 2016
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Sun Oct 16 20:09:53 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.74 2016/03/21 22:42:56 mrg Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.75 2016/10/16 20:09:53 dholland Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.74 2016/03/21 22:42:56 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.75 2016/10/16 20:09:53 dholland Exp $");
 
 #include 
 #include 
@@ -307,7 +307,7 @@ dofilewritev32(int fd, struct file *fp, 
 	}
 	cnt -= auio.uio_resid;
 	if (ktriov != NULL) {
-		ktrgenio(fd, UIO_WRITE, ktriov, cnt, error);
+		ktrgeniov(fd, UIO_WRITE, ktriov, cnt, error);
 		kmem_free(ktriov, iovlen);
 	}
 	*retval = cnt;



CVS commit: src/sys/compat/netbsd32

2016-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 15 06:50:13 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_nfssvc.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/netbsd32/netbsd32_nfssvc.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_nfssvc.c
diff -u src/sys/compat/netbsd32/netbsd32_nfssvc.c:1.4 src/sys/compat/netbsd32/netbsd32_nfssvc.c:1.5
--- src/sys/compat/netbsd32/netbsd32_nfssvc.c:1.4	Tue Dec  1 09:12:23 2015
+++ src/sys/compat/netbsd32/netbsd32_nfssvc.c	Sat Oct 15 06:50:13 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_nfssvc.c,v 1.4 2015/12/01 09:12:23 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_nfssvc.c,v 1.5 2016/10/15 06:50:13 skrll Exp $	*/
 
 /*
  * Copyright (c) 2015 Matthew R. Green
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_nfssvc.c,v 1.4 2015/12/01 09:12:23 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_nfssvc.c,v 1.5 2016/10/15 06:50:13 skrll Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_nfs.h"
@@ -198,11 +198,11 @@ static const struct syscall_package comp
 
 MODULE(MODULE_CLASS_EXEC, compat_netbsd32_nfssrv, "nfsserver,compat_netbsd32");
 
-static int  
+static int
 compat_netbsd32_nfssrv_modcmd(modcmd_t cmd, void *arg)
-{   
-	int error;  
-
+{
+	int error;
+
 	switch (cmd) {
 	case MODULE_CMD_INIT:
 		error = syscall_establish(&emul_netbsd32,



CVS commit: src/sys/compat

2016-10-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Oct  8 15:48:07 UTC 2016

Modified Files:
src/sys/compat/sunos: sunos_ioctl.c
src/sys/compat/ultrix: ultrix_ioctl.c

Log Message:
Uninitialized var, found by mootja; not tested, but obvious enough


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/compat/sunos/sunos_ioctl.c
cvs rdiff -u -r1.36 -r1.37 src/sys/compat/ultrix/ultrix_ioctl.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/sunos/sunos_ioctl.c
diff -u src/sys/compat/sunos/sunos_ioctl.c:1.67 src/sys/compat/sunos/sunos_ioctl.c:1.68
--- src/sys/compat/sunos/sunos_ioctl.c:1.67	Sat Dec 12 17:48:18 2015
+++ src/sys/compat/sunos/sunos_ioctl.c	Sat Oct  8 15:48:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos_ioctl.c,v 1.67 2015/12/12 17:48:18 nakayama Exp $	*/
+/*	$NetBSD: sunos_ioctl.c,v 1.68 2016/10/08 15:48:07 maxv Exp $	*/
 
 /*
  * Copyright (c) 1993 Markus Wild.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.67 2015/12/12 17:48:18 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.68 2016/10/08 15:48:07 maxv Exp $");
 
 #include 
 #include 
@@ -443,7 +443,7 @@ sunos_sys_ioctl(struct lwp *l, const str
 	{
 		int x;	/* unused */
 
-		error = copyin((void *)&x, SCARG(uap, data), sizeof x);
+		error = copyin(SCARG(uap, data), (void *)&x, sizeof x);
 		break;
 	}
 	case _IOR('t', 100, int):	/* sun SUNOS_TIOCSSOFTCAR */

Index: src/sys/compat/ultrix/ultrix_ioctl.c
diff -u src/sys/compat/ultrix/ultrix_ioctl.c:1.36 src/sys/compat/ultrix/ultrix_ioctl.c:1.37
--- src/sys/compat/ultrix/ultrix_ioctl.c:1.36	Mon Dec 14 00:47:12 2009
+++ src/sys/compat/ultrix/ultrix_ioctl.c	Sat Oct  8 15:48:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ultrix_ioctl.c,v 1.36 2009/12/14 00:47:12 matt Exp $ */
+/*	$NetBSD: ultrix_ioctl.c,v 1.37 2016/10/08 15:48:07 maxv Exp $ */
 /*	from : NetBSD: sunos_ioctl.c,v 1.21 1995/10/07 06:27:31 mycroft Exp */
 
 /*
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.36 2009/12/14 00:47:12 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.37 2016/10/08 15:48:07 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_ultrix.h"
@@ -491,7 +491,7 @@ ultrix_sys_ioctl(struct lwp *l, const st
 	{
 		int x;	/* unused */
 
-		return copyin(&x, SCARG(&ap, data), sizeof x);
+		return copyin(SCARG(&ap, data), &x, sizeof x);
 	}
 	case _IOR('t', 100, int):	/* sun SUNOS_TIOCSSOFTCAR */
 	{



CVS commit: src/sys/compat/netbsd32

2016-09-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Sep 23 14:16:32 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_time.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.47 -r1.48 src/sys/compat/netbsd32/netbsd32_time.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.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.111 src/sys/compat/netbsd32/netbsd32.h:1.112
--- src/sys/compat/netbsd32/netbsd32.h:1.111	Fri Sep 23 14:12:00 2016
+++ src/sys/compat/netbsd32/netbsd32.h	Fri Sep 23 14:16:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.111 2016/09/23 14:12:00 skrll Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.112 2016/09/23 14:16:32 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -276,7 +276,7 @@ struct netbsd32_export_args30 {
 	int	ex_addrlen;		/* and the net address length */
 	netbsd32_pointer_t ex_mask;	/* mask of valid bits in saddr */
 	int	ex_masklen;		/* and the smask length */
-	netbsd32_charp ex_indexfile;	/* index file for WebNFS URLs */ 
+	netbsd32_charp ex_indexfile;	/* index file for WebNFS URLs */
 };
 
 /* from  */

Index: src/sys/compat/netbsd32/netbsd32_time.c
diff -u src/sys/compat/netbsd32/netbsd32_time.c:1.47 src/sys/compat/netbsd32/netbsd32_time.c:1.48
--- src/sys/compat/netbsd32/netbsd32_time.c:1.47	Fri Sep 23 14:09:39 2016
+++ src/sys/compat/netbsd32/netbsd32_time.c	Fri Sep 23 14:16:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_time.c,v 1.47 2016/09/23 14:09:39 skrll Exp $	*/
+/*	$NetBSD: netbsd32_time.c,v 1.48 2016/09/23 14:16:32 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.47 2016/09/23 14:09:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.48 2016/09/23 14:16:32 skrll Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_tim
 #ifdef NTP
 
 int
-netbsd32___ntp_gettime50(struct lwp *l, 
+netbsd32___ntp_gettime50(struct lwp *l,
 const struct netbsd32___ntp_gettime50_args *uap, register_t *retval)
 {
 	/* {
@@ -83,7 +83,7 @@ netbsd32___ntp_gettime50(struct lwp *l, 
 
 #ifdef COMPAT_50
 int
-compat_50_netbsd32_ntp_gettime(struct lwp *l, 
+compat_50_netbsd32_ntp_gettime(struct lwp *l,
 const struct compat_50_netbsd32_ntp_gettime_args *uap, register_t *retval)
 {
 	/* {
@@ -327,7 +327,7 @@ netbsd32___adjtime50(struct lwp *l, cons
 		if (error)
 			return (error);
 	}
-	
+
 	if (SCARG_P32(uap, delta)) {
 		error = copyin(SCARG_P32(uap, delta), &atv, sizeof(atv));
 		if (error)



CVS commit: src/sys/compat/netbsd32

2016-09-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Sep 23 14:12:00 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
Types for wait6 and clock_getcpuclockid2


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/compat/netbsd32/netbsd32.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.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.110 src/sys/compat/netbsd32/netbsd32.h:1.111
--- src/sys/compat/netbsd32/netbsd32.h:1.110	Sat Sep 17 02:44:38 2016
+++ src/sys/compat/netbsd32/netbsd32.h	Fri Sep 23 14:12:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.110 2016/09/17 02:44:38 christos Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.111 2016/09/23 14:12:00 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -187,6 +187,7 @@ typedef int32_t netbsd32_timer_t;
 typedef	int32_t netbsd32_time50_t;
 typedef	netbsd32_int64 netbsd32_time_t;
 typedef netbsd32_pointer_t netbsd32_timerp_t;
+typedef netbsd32_pointer_t netbsd32_clockidp_t;
 
 typedef netbsd32_pointer_t netbsd32_timespec50p_t;
 struct netbsd32_timespec50 {
@@ -383,6 +384,12 @@ struct	netbsd32_rusage {
 	netbsd32_long	ru_nivcsw;	/* involuntary " */
 };
 
+typedef netbsd32_pointer_t netbsd32_wrusagep_t;
+struct netbsd32_wrusage {
+	struct netbsd32_rusage	wru_self;
+	struct netbsd32_rusage	wru_children;
+};
+
 typedef netbsd32_pointer_t netbsd32_orlimitp_t;
 
 typedef netbsd32_pointer_t netbsd32_rlimitp_t;



CVS commit: src/sys/compat/netbsd32

2016-09-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Sep 23 14:12:25 UTC 2016

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.122 -r1.123 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.5 -r1.6 src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.13 -r1.14 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.123 src/sys/compat/netbsd32/netbsd32_syscall.h:1.124
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.123	Sat Sep 10 08:19:58 2016
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Fri Sep 23 14:12:24 2016
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.123 2016/09/10 08:19:58 skrll Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.124 2016/09/23 14:12:24 skrll Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.113 2016/09/10 08:18:45 skrll Exp
+ * created from	NetBSD: syscalls.master,v 1.114 2016/09/23 14:10:28 skrll Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
@@ -1257,6 +1257,12 @@
 /* syscall: "netbsd32_fdiscard" ret: "int" args: "int" "int" "netbsd32_off_t" "netbsd32_off_t" */
 #define	NETBSD32_SYS_netbsd32_fdiscard	480
 
-#define	NETBSD32_SYS_MAXSYSCALL	481
+/* syscall: "netbsd32_wait6" ret: "int" args: "idtype_t" "id_t" "netbsd32_intp" "int" "netbsd32_wrusagep_t" "netbsd32_siginfop_t" */
+#define	NETBSD32_SYS_netbsd32_wait6	481
+
+/* syscall: "netbsd32_clock_getcpuclockid2" ret: "int" args: "idtype_t" "id_t" "netbsd32_clockidp_t" */
+#define	NETBSD32_SYS_netbsd32_clock_getcpuclockid2	482
+
+#define	NETBSD32_SYS_MAXSYSCALL	483
 #define	NETBSD32_SYS_NSYSENT	512
 #endif /* _NETBSD32_SYS_SYSCALL_H_ */
Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.123 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.124
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.123	Sat Sep 10 08:19:58 2016
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Fri Sep 23 14:12:24 2016
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.123 2016/09/10 08:19:58 skrll Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.124 2016/09/23 14:12:24 skrll Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.113 2016/09/10 08:18:45 skrll Exp
+ * created from	NetBSD: syscalls.master,v 1.114 2016/09/23 14:10:28 skrll Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_
@@ -2583,6 +2583,23 @@ struct netbsd32_fdiscard_args {
 };
 check_syscall_args(netbsd32_fdiscard)
 
+struct netbsd32_wait6_args {
+	syscallarg(idtype_t) idtype;
+	syscallarg(id_t) id;
+	syscallarg(netbsd32_intp) status;
+	syscallarg(int) options;
+	syscallarg(netbsd32_wrusagep_t) wru;
+	syscallarg(netbsd32_siginfop_t) info;
+};
+check_syscall_args(netbsd32_wait6)
+
+struct netbsd32_clock_getcpuclockid2_args {
+	syscallarg(idtype_t) idtype;
+	syscallarg(id_t) id;
+	syscallarg(netbsd32_clockidp_t) clock_id;
+};
+check_syscall_args(netbsd32_clock_getcpuclockid2)
+
 /*
  * System call prototypes.
  */
@@ -3402,4 +3419,8 @@ int	netbsd32_posix_fallocate(struct lwp 
 
 int	netbsd32_fdiscard(struct lwp *, const struct netbsd32_fdiscard_args *, register_t *);
 
+int	netbsd32_wait6(struct lwp *, const struct netbsd32_wait6_args *, register_t *);
+
+int	netbsd32_clock_getcpuclockid2(struct lwp *, const struct netbsd32_clock_getcpuclockid2_args *, register_t *);
+
 #endif /* _NETBSD32_SYS_SYSCALLARGS_H_ */

Index: src/sys/compat/netbsd32/netbsd32_syscalls.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.122 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.123
--- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.122	Sat Sep 10 08:19:58 2016
+++ src/sys/compat/netbsd32/netbsd32_syscalls.c	Fri Sep 23 14:12:24 2016
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls.c,v 1.122 2016/09/10 08:19:58 skrll Exp $ */
+/* $NetBSD: netbsd32_syscalls.c,v 1.123 2016/09/23 14:12:24 skrll Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.113 2016/09/10 08:18:45 skrll Exp
+ * created from	NetBSD: syscalls.master,v 1.114 2016/09/23 14:10:28 skrll Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.122 2016/09/10 08:19:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls

CVS commit: src/sys/compat/netbsd32

2016-09-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Sep 23 14:10:28 UTC 2016

Modified Files:
src/sys/compat/netbsd32: syscalls.master

Log Message:
Add wait6 and clock_getcpuclockid2


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/compat/netbsd32/syscalls.master

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/syscalls.master
diff -u src/sys/compat/netbsd32/syscalls.master:1.113 src/sys/compat/netbsd32/syscalls.master:1.114
--- src/sys/compat/netbsd32/syscalls.master:1.113	Sat Sep 10 08:18:45 2016
+++ src/sys/compat/netbsd32/syscalls.master	Fri Sep 23 14:10:28 2016
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.113 2016/09/10 08:18:45 skrll Exp $
+	$NetBSD: syscalls.master,v 1.114 2016/09/23 14:10:28 skrll Exp $
 
 ;	from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
@@ -1053,4 +1053,9 @@
 			netbsd32_off_t pos, netbsd32_off_t len); }
 480	STD		{ int|netbsd32||fdiscard(int fd, int PAD, \
 			netbsd32_off_t pos, netbsd32_off_t len); }
+481	STD 		{ int|netbsd32||wait6(idtype_t idtype, id_t id, \
+			netbsd32_intp status, int options, \
+			netbsd32_wrusagep_t wru, netbsd32_siginfop_t info); }
+482	STD		{ int|netbsd32||clock_getcpuclockid2(idtype_t idtype, \
+			id_t id, netbsd32_clockidp_t clock_id); }
 



CVS commit: src/sys/compat/netbsd32

2016-09-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 18 05:16:21 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_signal.c

Log Message:
remove multiple default.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/compat/netbsd32/netbsd32_signal.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_signal.c
diff -u src/sys/compat/netbsd32/netbsd32_signal.c:1.42 src/sys/compat/netbsd32/netbsd32_signal.c:1.43
--- src/sys/compat/netbsd32/netbsd32_signal.c:1.42	Sat Sep 17 21:56:42 2016
+++ src/sys/compat/netbsd32/netbsd32_signal.c	Sun Sep 18 01:16:21 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_signal.c,v 1.42 2016/09/18 01:56:42 christos Exp $	*/
+/*	$NetBSD: netbsd32_signal.c,v 1.43 2016/09/18 05:16:21 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.42 2016/09/18 01:56:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.43 2016/09/18 05:16:21 christos Exp $");
 
 #if defined(_KERNEL_OPT) 
 #include "opt_ktrace.h"
@@ -223,8 +223,6 @@ netbsd32_ksi32_to_ksi(struct _ksiginfo *
 		si->_reason._poll._band = si32->_reason._poll._band;
 		si->_reason._poll._fd = si32->_reason._poll._fd;
 		break;
-	default:
-		break;
 	}
 }
 
@@ -267,8 +265,6 @@ netbsd32_ksi_to_ksi32(struct __ksiginfo3
 		si32->_reason._poll._band = si->_reason._poll._band;
 		si32->_reason._poll._fd = si->_reason._poll._fd;
 		break;
-	default:
-		break;
 	}
 }
 #endif



CVS commit: src/sys/compat/netbsd32

2016-09-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 18 01:56:42 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_signal.c

Log Message:
more ifdef KTRACE
fix wraps


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/netbsd32/netbsd32_signal.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_signal.c
diff -u src/sys/compat/netbsd32/netbsd32_signal.c:1.41 src/sys/compat/netbsd32/netbsd32_signal.c:1.42
--- src/sys/compat/netbsd32/netbsd32_signal.c:1.41	Fri Sep 16 22:44:38 2016
+++ src/sys/compat/netbsd32/netbsd32_signal.c	Sat Sep 17 21:56:42 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_signal.c,v 1.41 2016/09/17 02:44:38 christos Exp $	*/
+/*	$NetBSD: netbsd32_signal.c,v 1.42 2016/09/18 01:56:42 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.41 2016/09/17 02:44:38 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.42 2016/09/18 01:56:42 christos Exp $");
 
 #if defined(_KERNEL_OPT) 
 #include "opt_ktrace.h"
@@ -199,7 +199,8 @@ netbsd32_ksi32_to_ksi(struct _ksiginfo *
 	case SIGSEGV:
 	case SIGFPE:
 	case SIGTRAP:
-		si->_reason._fault._addr = NETBSD32IPTR64(si32->_reason._fault._addr);
+		si->_reason._fault._addr =
+		NETBSD32IPTR64(si32->_reason._fault._addr);
 		si->_reason._fault._trap = si32->_reason._fault._trap;
 		break;
 	case SIGALRM:
@@ -208,7 +209,8 @@ netbsd32_ksi32_to_ksi(struct _ksiginfo *
 	default:	/* see sigqueue() and kill1() */
 		si->_reason._rt._pid = si32->_reason._rt._pid;
 		si->_reason._rt._uid = si32->_reason._rt._uid;
-		si->_reason._rt._value.sival_int = si32->_reason._rt._value.sival_int;
+		si->_reason._rt._value.sival_int =
+		si32->_reason._rt._value.sival_int;
 		break;
 	case SIGCHLD:
 		si->_reason._child._pid = si32->_reason._child._pid;
@@ -221,9 +223,12 @@ netbsd32_ksi32_to_ksi(struct _ksiginfo *
 		si->_reason._poll._band = si32->_reason._poll._band;
 		si->_reason._poll._fd = si32->_reason._poll._fd;
 		break;
+	default:
+		break;
 	}
 }
 
+#ifdef KTRACE
 static void
 netbsd32_ksi_to_ksi32(struct __ksiginfo32 *si32, const struct _ksiginfo *si)
 {
@@ -248,7 +253,8 @@ netbsd32_ksi_to_ksi32(struct __ksiginfo3
 	default:	/* see sigqueue() and kill1() */
 		si32->_reason._rt._pid = si->_reason._rt._pid;
 		si32->_reason._rt._uid = si->_reason._rt._uid;
-		si32->_reason._rt._value.sival_int = si->_reason._rt._value.sival_int;
+		si32->_reason._rt._value.sival_int =
+		si->_reason._rt._value.sival_int;
 		break;
 	case SIGCHLD:
 		si32->_reason._child._pid = si->_reason._child._pid;
@@ -261,8 +267,11 @@ netbsd32_ksi_to_ksi32(struct __ksiginfo3
 		si32->_reason._poll._band = si->_reason._poll._band;
 		si32->_reason._poll._fd = si->_reason._poll._fd;
 		break;
+	default:
+		break;
 	}
 }
+#endif
 
 void
 netbsd32_si_to_si32(siginfo32_t *si32, const siginfo_t *si)



CVS commit: src/sys/compat/netbsd32

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 17 02:44:38 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_netbsd.c netbsd32_signal.c

Log Message:
deal with not having KTRACE


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.203 -r1.204 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.40 -r1.41 src/sys/compat/netbsd32/netbsd32_signal.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.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.109 src/sys/compat/netbsd32/netbsd32.h:1.110
--- src/sys/compat/netbsd32/netbsd32.h:1.109	Thu Nov 26 08:15:34 2015
+++ src/sys/compat/netbsd32/netbsd32.h	Fri Sep 16 22:44:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.109 2015/11/26 13:15:34 martin Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.110 2016/09/17 02:44:38 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -1106,6 +1106,12 @@ void netbsd32_adjust_limits(struct proc 
 void	netbsd32_si_to_si32(siginfo32_t *, const siginfo_t *);
 void	netbsd32_ksi32_to_ksi(struct _ksiginfo *si, const struct __ksiginfo32 *si32);
 
+#ifdef KTRACE
+void netbsd32_ktrpsig(int, sig_t, const sigset_t *, const ksiginfo_t *);
+#else
+#define netbsd32_ktrpsig NULL
+#endif
+
 
 void	startlwp32(void *);
 struct compat_50_netbsd32___semctl14_args;

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.203 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.204
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.203	Tue Sep 13 03:39:45 2016
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Fri Sep 16 22:44:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.203 2016/09/13 07:39:45 martin Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.204 2016/09/17 02:44:38 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,11 +27,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.203 2016/09/13 07:39:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.204 2016/09/17 02:44:38 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
 #include "opt_ntp.h"
+#include "opt_ktrace.h"
 #include "opt_compat_netbsd.h"
 #include "opt_compat_43.h"
 #include "opt_sysv.h"
@@ -103,8 +104,6 @@ void netbsd32_syscall_intern(struct proc
 void syscall(void);
 #endif
 
-void netbsd32_ktrpsig(int, sig_t, const sigset_t *, const ksiginfo_t *);
-
 #define LIMITCHECK(a, b) ((a) != RLIM_INFINITY && (a) > (b))
 
 #ifdef COMPAT_16

Index: src/sys/compat/netbsd32/netbsd32_signal.c
diff -u src/sys/compat/netbsd32/netbsd32_signal.c:1.40 src/sys/compat/netbsd32/netbsd32_signal.c:1.41
--- src/sys/compat/netbsd32/netbsd32_signal.c:1.40	Tue Sep 13 03:39:45 2016
+++ src/sys/compat/netbsd32/netbsd32_signal.c	Fri Sep 16 22:44:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_signal.c,v 1.40 2016/09/13 07:39:45 martin Exp $	*/
+/*	$NetBSD: netbsd32_signal.c,v 1.41 2016/09/17 02:44:38 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.40 2016/09/13 07:39:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.41 2016/09/17 02:44:38 christos Exp $");
+
+#if defined(_KERNEL_OPT) 
+#include "opt_ktrace.h"
+#endif
 
 #include 
 #include 
@@ -52,8 +56,6 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_sig
 #include 
 #include 
 
-void netbsd32_ktrpsig(int, sig_t, const sigset_t *, const ksiginfo_t *);
-
 int
 netbsd32_sigaction(struct lwp *l, const struct netbsd32_sigaction_args *uap, register_t *retval)
 {
@@ -506,6 +508,7 @@ struct netbsd32_ktr_psig {
 	/* and optional siginfo_t */
 };
 
+#ifdef KTRACE
 void
 netbsd32_ktrpsig(int sig, sig_t action, const sigset_t *mask,
 	 const ksiginfo_t *ksi)
@@ -539,5 +542,6 @@ netbsd32_ktrpsig(int sig, sig_t action, 
 
 	ktraddentry(l, kte, KTA_WAITOK);
 }
+#endif
 
 



CVS commit: src/sys/compat/netbsd32

2016-09-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Sep 10 08:21:26 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/sys/compat/netbsd32/netbsd32_netbsd.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_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.201 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.202
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.201	Sat Sep 10 08:20:49 2016
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Sat Sep 10 08:21:26 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.201 2016/09/10 08:20:49 skrll Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.202 2016/09/10 08:21:26 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.201 2016/09/10 08:20:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.202 2016/09/10 08:21:26 skrll Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -921,7 +921,7 @@ netbsd32___socket30(struct lwp *l, const
 	NETBSD32TO64_UAP(domain);
 	NETBSD32TO64_UAP(type);
 	NETBSD32TO64_UAP(protocol);
-	return (sys___socket30(l, &ua, retval));	
+	return (sys___socket30(l, &ua, retval));
 }
 
 int
@@ -1457,7 +1457,7 @@ fixlimit(int which, struct rlimit *alim)
 			alim->rlim_cur = MAXDSIZ32;
 		if (LIMITCHECK(alim->rlim_max, MAXDSIZ32))
 			alim->rlim_max = MAXDSIZ32;
-		return;	
+		return;
 	case RLIMIT_STACK:
 		if (LIMITCHECK(alim->rlim_cur, MAXSSIZ32))
 			alim->rlim_cur = MAXSSIZ32;
@@ -1826,7 +1826,7 @@ netbsd32_swapctl(struct lwp *l, const st
 	/* SWAP_STATS50 and SWAP_STATS13 structures need no translation */
 	if (SCARG(&ua, cmd) == SWAP_STATS)
 		return netbsd32_swapctl_stats(l, &ua, retval);
-	
+
 	return (sys_swapctl(l, &ua, retval));
 }
 



CVS commit: src/sys/compat/netbsd32

2016-09-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Sep 10 08:20:49 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c

Log Message:
+netbsd32__sched_protect


To generate a diff of this commit:
cvs rdiff -u -r1.200 -r1.201 src/sys/compat/netbsd32/netbsd32_netbsd.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_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.200 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.201
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.200	Fri May 13 16:54:36 2016
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Sat Sep 10 08:20:49 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.200 2016/05/13 16:54:36 christos Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.201 2016/09/10 08:20:49 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.200 2016/05/13 16:54:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.201 2016/09/10 08:20:49 skrll Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -2714,6 +2714,20 @@ netbsd32__sched_getaffinity(struct lwp *
 }
 
 int
+netbsd32__sched_protect(struct lwp *l,
+			const struct netbsd32__sched_protect_args *uap,
+			register_t *retval)
+{
+	/* {
+		syscallarg(int) priority;
+	} */
+	struct sys__sched_protect_args ua;
+
+	NETBSD32TO64_UAP(priority);
+	return sys__sched_protect(l, &ua, retval);
+}
+
+int
 netbsd32_pipe2(struct lwp *l, const struct netbsd32_pipe2_args *uap,
 	   register_t *retval)
 {



CVS commit: src/sys/compat/netbsd32

2016-09-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Sep 10 08:19:58 UTC 2016

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

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.121 -r1.122 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.12 -r1.13 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.122 src/sys/compat/netbsd32/netbsd32_syscall.h:1.123
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.122	Thu Dec  3 10:39:50 2015
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Sat Sep 10 08:19:58 2016
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.122 2015/12/03 10:39:50 pgoyette Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.123 2016/09/10 08:19:58 skrll Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.112 2015/12/03 10:38:21 pgoyette Exp
+ * created from	NetBSD: syscalls.master,v 1.113 2016/09/10 08:18:45 skrll Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
@@ -913,6 +913,9 @@
 /* syscall: "sched_yield" ret: "int" args: */
 #define	NETBSD32_SYS_sched_yield	350
 
+/* syscall: "netbsd32__sched_protect" ret: "int" args: "int" */
+#define	NETBSD32_SYS_netbsd32__sched_protect	351
+
 /* syscall: "netbsd32_fsync_range" ret: "int" args: "int" "int" "netbsd32_off_t" "netbsd32_off_t" */
 #define	NETBSD32_SYS_netbsd32_fsync_range	354
 
Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.122 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.123
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.122	Thu Dec  3 10:39:50 2015
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Sat Sep 10 08:19:58 2016
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.122 2015/12/03 10:39:50 pgoyette Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.123 2016/09/10 08:19:58 skrll Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.112 2015/12/03 10:38:21 pgoyette Exp
+ * created from	NetBSD: syscalls.master,v 1.113 2016/09/10 08:18:45 skrll Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_
@@ -1758,6 +1758,11 @@ struct netbsd32__sched_getaffinity_args 
 };
 check_syscall_args(netbsd32__sched_getaffinity)
 
+struct netbsd32__sched_protect_args {
+	syscallarg(int) priority;
+};
+check_syscall_args(netbsd32__sched_protect)
+
 struct netbsd32_fsync_range_args {
 	syscallarg(int) fd;
 	syscallarg(int) flags;
@@ -3169,6 +3174,8 @@ int	netbsd32__sched_getaffinity(struct l
 
 int	sys_sched_yield(struct lwp *, const void *, register_t *);
 
+int	netbsd32__sched_protect(struct lwp *, const struct netbsd32__sched_protect_args *, register_t *);
+
 int	netbsd32_fsync_range(struct lwp *, const struct netbsd32_fsync_range_args *, register_t *);
 
 int	netbsd32_uuidgen(struct lwp *, const struct netbsd32_uuidgen_args *, register_t *);

Index: src/sys/compat/netbsd32/netbsd32_syscalls.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.121 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.122
--- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.121	Thu Dec  3 10:39:50 2015
+++ src/sys/compat/netbsd32/netbsd32_syscalls.c	Sat Sep 10 08:19:58 2016
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls.c,v 1.121 2015/12/03 10:39:50 pgoyette Exp $ */
+/* $NetBSD: netbsd32_syscalls.c,v 1.122 2016/09/10 08:19:58 skrll Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.112 2015/12/03 10:38:21 pgoyette Exp
+ * created from	NetBSD: syscalls.master,v 1.113 2016/09/10 08:18:45 skrll Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.121 2015/12/03 10:39:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.122 2016/09/10 08:19:58 skrll Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -384,7 +384,7 @@ const char *const netbsd32_syscallnames[
 	/* 348 */	"netbsd32__sched_setaffinity",
 	/* 349 */	"netbsd32__sched_getaffinity",
 	/* 350 */	"sched_yield",
-	/* 351 */	"#351 (unimplemented)",
+	/* 351 */	"netbsd32__sched_protect",
 	/* 352 */	"#352 (unimplemented)",
 	/* 353 */	"#353 (unimplemented)",
 	/* 354 */	"netbsd32_fsync_range",
@@ -914,7 +914,7 @@ const char *const altnetbsd32_syscallnam
 	/* 34

CVS commit: src/sys/compat/netbsd32

2016-09-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Sep 10 08:18:45 UTC 2016

Modified Files:
src/sys/compat/netbsd32: syscalls.master

Log Message:
Add _sched_protect


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/compat/netbsd32/syscalls.master

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/syscalls.master
diff -u src/sys/compat/netbsd32/syscalls.master:1.112 src/sys/compat/netbsd32/syscalls.master:1.113
--- src/sys/compat/netbsd32/syscalls.master:1.112	Thu Dec  3 10:38:21 2015
+++ src/sys/compat/netbsd32/syscalls.master	Sat Sep 10 08:18:45 2016
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.112 2015/12/03 10:38:21 pgoyette Exp $
+	$NetBSD: syscalls.master,v 1.113 2016/09/10 08:18:45 skrll Exp $
 
 ;	from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
@@ -703,7 +703,7 @@
 			lwpid_t lid, netbsd32_size_t size, \
 			netbsd32_cpusetp_t cpuset); }
 350	NOARGS 		{ int|sys||sched_yield(void); }
-351	UNIMPL
+351	STD		{ int|netbsd32||_sched_protect(int priority); }
 352	UNIMPL
 353	UNIMPL
 354	STD		{ int|netbsd32||fsync_range(int fd, int flags, \



CVS commit: src/sys/compat/netbsd32

2016-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep  8 18:54:03 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_socket.c

Log Message:
recvmsg: ktrace the 32bit message header, not the native (64bit) version.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/compat/netbsd32/netbsd32_socket.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_socket.c
diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.42 src/sys/compat/netbsd32/netbsd32_socket.c:1.43
--- src/sys/compat/netbsd32/netbsd32_socket.c:1.42	Wed Jul 22 14:25:39 2015
+++ src/sys/compat/netbsd32/netbsd32_socket.c	Thu Sep  8 18:54:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_socket.c,v 1.42 2015/07/22 14:25:39 maxv Exp $	*/
+/*	$NetBSD: netbsd32_socket.c,v 1.43 2016/09/08 18:54:03 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.42 2015/07/22 14:25:39 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.43 2016/09/08 18:54:03 martin Exp $");
 
 #include 
 #include 
@@ -207,10 +207,10 @@ netbsd32_recvmsg(struct lwp *l, const st
 	if (from != NULL)
 		m_free(from);
 	if (error == 0) {
-		ktrkuser("msghdr", &msg, sizeof msg);
 		msg32.msg_namelen = msg.msg_namelen;
 		msg32.msg_controllen = msg.msg_controllen;
 		msg32.msg_flags = msg.msg_flags;
+		ktrkuser("msghdr", &msg32, sizeof msg32);
 		error = copyout(&msg32, SCARG_P32(uap, msg), sizeof(msg32));
 	}
 



CVS commit: src/sys/compat/linux/common

2016-08-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Aug 31 08:12:44 UTC 2016

Modified Files:
src/sys/compat/linux/common: linux_misc.c linux_misc.h

Log Message:
Teach wait4 about WCONTINUED.


To generate a diff of this commit:
cvs rdiff -u -r1.231 -r1.232 src/sys/compat/linux/common/linux_misc.c
cvs rdiff -u -r1.24 -r1.25 src/sys/compat/linux/common/linux_misc.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/linux/common/linux_misc.c
diff -u src/sys/compat/linux/common/linux_misc.c:1.231 src/sys/compat/linux/common/linux_misc.c:1.232
--- src/sys/compat/linux/common/linux_misc.c:1.231	Sat Mar 14 08:32:08 2015
+++ src/sys/compat/linux/common/linux_misc.c	Wed Aug 31 08:12:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc.c,v 1.231 2015/03/14 08:32:08 njoly Exp $	*/
+/*	$NetBSD: linux_misc.c,v 1.232 2016/08/31 08:12:44 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.231 2015/03/14 08:32:08 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.232 2016/08/31 08:12:44 njoly Exp $");
 
 #include 
 #include 
@@ -231,6 +231,8 @@ linux_sys_wait4(struct lwp *l, const str
 		options |= WNOHANG;
 	if (linux_options & LINUX_WAIT4_WUNTRACED)
 		options |= WUNTRACED;
+	if (linux_options & LINUX_WAIT4_WCONTINUED)
+		options |= WCONTINUED;
 	if (linux_options & LINUX_WAIT4_WALL)
 		options |= WALLSIG;
 	if (linux_options & LINUX_WAIT4_WCLONE)

Index: src/sys/compat/linux/common/linux_misc.h
diff -u src/sys/compat/linux/common/linux_misc.h:1.24 src/sys/compat/linux/common/linux_misc.h:1.25
--- src/sys/compat/linux/common/linux_misc.h:1.24	Mon Nov 18 01:32:52 2013
+++ src/sys/compat/linux/common/linux_misc.h	Wed Aug 31 08:12:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc.h,v 1.24 2013/11/18 01:32:52 chs Exp $	*/
+/*	$NetBSD: linux_misc.h,v 1.25 2016/08/31 08:12:44 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,14 +35,16 @@
 /*
  * Options passed to the Linux wait4() system call.
  */
-#define LINUX_WAIT4_WNOHANG   0x0001
-#define LINUX_WAIT4_WUNTRACED 0x0002
-#define LINUX_WAIT4_WNOTHREAD 0x2000
-#define LINUX_WAIT4_WALL  0x4000
-#define LINUX_WAIT4_WCLONE0x8000
+#define LINUX_WAIT4_WNOHANG	0x0001
+#define LINUX_WAIT4_WUNTRACED	0x0002
+#define LINUX_WAIT4_WCONTINUED	0x0008
+#define LINUX_WAIT4_WNOTHREAD	0x2000
+#define LINUX_WAIT4_WALL	0x4000
+#define LINUX_WAIT4_WCLONE	0x8000
 
 #define LINUX_WAIT4_KNOWNFLAGS (LINUX_WAIT4_WNOHANG | \
 LINUX_WAIT4_WUNTRACED | \
+LINUX_WAIT4_WCONTINUED | \
 LINUX_WAIT4_WNOTHREAD | \
 LINUX_WAIT4_WALL | \
 LINUX_WAIT4_WCLONE)



CVS commit: src/sys/compat/sys

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 18:54:24 UTC 2016

Modified Files:
src/sys/compat/sys: stat.h

Log Message:
update comment


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/sys/stat.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/sys/stat.h
diff -u src/sys/compat/sys/stat.h:1.6 src/sys/compat/sys/stat.h:1.7
--- src/sys/compat/sys/stat.h:1.6	Fri Oct  4 21:07:37 2013
+++ src/sys/compat/sys/stat.h	Sat Aug 27 18:54:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.h,v 1.6 2013/10/04 21:07:37 christos Exp $	*/
+/*	$NetBSD: stat.h,v 1.7 2016/08/27 18:54:24 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -87,7 +87,7 @@ struct stat12 {/* NetBSD-1.2 stat st
  * stat structure used to contain timespecs, which had different
  * alignment constraints than a time_t and a long alone.  The padding
  * should be removed the next time the stat structure ABI is changed.
- * (This will happen whever we change to 8 byte time_t.)
+ * (This happened when we changed to 8 byte time_t.)
  */
 #if defined(_LP64)	/*   && _BSD_TIME_T_ == int */
 #define	__STATPAD(x)	int x;



CVS commit: src/sys/compat/common

2016-08-19 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Aug 20 00:34:42 UTC 2016

Modified Files:
src/sys/compat/common: vfs_syscalls_43.c

Log Message:
fill in the tv_nsec parts of the converted timespec in cvtstat().


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/common/vfs_syscalls_43.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/vfs_syscalls_43.c
diff -u src/sys/compat/common/vfs_syscalls_43.c:1.57 src/sys/compat/common/vfs_syscalls_43.c:1.58
--- src/sys/compat/common/vfs_syscalls_43.c:1.57	Fri Sep  5 09:21:54 2014
+++ src/sys/compat/common/vfs_syscalls_43.c	Sat Aug 20 00:34:42 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_43.c,v 1.57 2014/09/05 09:21:54 matt Exp $	*/
+/*	$NetBSD: vfs_syscalls_43.c,v 1.58 2016/08/20 00:34:42 mrg Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.57 2014/09/05 09:21:54 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.58 2016/08/20 00:34:42 mrg Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -75,15 +75,42 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 #include 
 #include 
 
+static void cvttimespec(struct timespec *, struct timespec50 *);
 static void cvtstat(struct stat *, struct stat43 *);
 
 /*
+ * Convert from an old to a new timespec structure.
+ */
+static void
+cvttimespec(struct timespec *ts, struct timespec50 *ots)
+{
+
+	if (ts->tv_sec > INT_MAX) {
+#if defined(DEBUG) || 1
+		static bool first = true;
+
+		if (first) {
+			first = false;
+			printf("%s[%s:%d]: time_t does not fit\n",
+			__func__, curlwp->l_proc->p_comm,
+			curlwp->l_lid);
+		}
+#endif
+		ots->tv_sec = INT_MAX;
+	} else
+		ots->tv_sec = ts->tv_sec;
+	ots->tv_nsec = ts->tv_nsec;
+}
+
+/*
  * Convert from an old to a new stat structure.
  */
 static void
 cvtstat(struct stat *st, struct stat43 *ost)
 {
 
+	/* Handle any padding. */
+	memset(ost, 0, sizeof *ost);
 	ost->st_dev = st->st_dev;
 	ost->st_ino = st->st_ino;
 	ost->st_mode = st->st_mode & 0x;
@@ -95,9 +122,9 @@ cvtstat(struct stat *st, struct stat43 *
 		ost->st_size = st->st_size;
 	else
 		ost->st_size = -2;
-	ost->st_atime = st->st_atime;
-	ost->st_mtime = st->st_mtime;
-	ost->st_ctime = st->st_ctime;
+	cvttimespec(&st->st_atimespec, &ost->st_atimespec);
+	cvttimespec(&st->st_mtimespec, &ost->st_mtimespec);
+	cvttimespec(&st->st_ctimespec, &ost->st_ctimespec);
 	ost->st_blksize = st->st_blksize;
 	ost->st_blocks = st->st_blocks;
 	ost->st_flags = st->st_flags;



CVS commit: src/sys/compat/linux/common

2016-08-15 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Aug 15 09:20:11 UTC 2016

Modified Files:
src/sys/compat/linux/common: linux_futex.c

Log Message:
Uninitialized var, found by brainy; not tested, but obvious enough


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/compat/linux/common/linux_futex.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_futex.c
diff -u src/sys/compat/linux/common/linux_futex.c:1.34 src/sys/compat/linux/common/linux_futex.c:1.35
--- src/sys/compat/linux/common/linux_futex.c:1.34	Fri May 20 13:54:34 2016
+++ src/sys/compat/linux/common/linux_futex.c	Mon Aug 15 09:20:11 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_futex.c,v 1.34 2016/05/20 13:54:34 chs Exp $ */
+/*	$NetBSD: linux_futex.c,v 1.35 2016/08/15 09:20:11 maxv Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.34 2016/05/20 13:54:34 chs Exp $");
+__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.35 2016/08/15 09:20:11 maxv Exp $");
 
 #include 
 #include 
@@ -769,6 +769,7 @@ release_futexes(struct lwp *l)
 			return;
 
 		head.futex_offset = (unsigned long)u32;
+		futex_offset = head.futex_offset;
 	} else
 #endif
 	if (copyin(&head.futex_offset, &futex_offset, sizeof(unsigned long)))



CVS commit: src/sys/compat/common

2016-07-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Jul 25 08:30:19 UTC 2016

Modified Files:
src/sys/compat/common: if_43.c

Log Message:
Apply if_get/if_put to compat_ifioctl


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/compat/common/if_43.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/if_43.c
diff -u src/sys/compat/common/if_43.c:1.11 src/sys/compat/common/if_43.c:1.12
--- src/sys/compat/common/if_43.c:1.11	Sat Jul 11 07:43:32 2015
+++ src/sys/compat/common/if_43.c	Mon Jul 25 08:30:19 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.c,v 1.11 2015/07/11 07:43:32 njoly Exp $	*/
+/*	$NetBSD: if_43.c,v 1.12 2016/07/25 08:30:19 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.11 2015/07/11 07:43:32 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.12 2016/07/25 08:30:19 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -218,11 +218,16 @@ compat_ifioctl(struct socket *so, u_long
 	struct ifreq *ifr = (struct ifreq *)data;
 	struct ifreq ifrb;
 	struct oifreq *oifr = NULL;
-	struct ifnet *ifp = ifunit(ifr->ifr_name);
+	struct ifnet *ifp;
 	struct sockaddr *sa;
+	struct psref psref;
+	int bound = curlwp_bind();
 
-	if (ifp == NULL)
+	ifp = if_get(ifr->ifr_name, &psref);
+	if (ifp == NULL) {
+		curlwp_bindx(bound);
 		return ENXIO;
+	}
 
 	/*
 	 * If we have not been converted, make sure that we are.
@@ -257,6 +262,8 @@ compat_ifioctl(struct socket *so, u_long
 	}
 
 	error = (*so->so_proto->pr_usrreqs->pr_ioctl)(so, cmd, ifr, ifp);
+	if_put(ifp, &psref);
+	curlwp_bindx(bound);
 
 	switch (ocmd) {
 	case OOSIOCGIFADDR:



CVS commit: src/sys/compat/linux/arch

2016-07-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Jul 24 13:23:25 UTC 2016

Modified Files:
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen for readlink/readlinkat signatures.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.97 -r1.98 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.99 -r1.100 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.4 -r1.5 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.68 -r1.69 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.107 -r1.108 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.108 -r1.109 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.97 -r1.98 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.96 -r1.97 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.c
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.74 -r1.75 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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/arch/alpha/linux_syscall.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.98 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.99
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.98	Sun Oct 25 15:55:58 2015
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Sun Jul 24 13:23:25 2016
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.98 2015/10/25 15:55:58 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.99 2016/07/24 13:23:25 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.90 2015/10/25 15:55:05 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.91 2016/07/24 13:22:01 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -111,7 +111,7 @@
 /* syscall: "symlink" ret: "int" args: "const char *" "const char *" */
 #define	LINUX_SYS_symlink	57
 
-/* syscall: "readlink" ret: "int" args: "const char *" "char *" "int" */
+/* syscall: "readlink" ret: "ssize_t" args: "const char *" "char *" "int" */
 #define	LINUX_SYS_readlink	58
 
 /* syscall: "execve" ret: "int" args: "const char *" "char **" "char **" */
@@ -630,7 +630,7 @@
 /* syscall: "symlinkat" ret: "int" args: "const char *" "int" "const char *" */
 #define	LINUX_SYS_symlinkat	459
 
-/* syscall: "readlinkat" ret: "int" args: "int" "const char *" "char *" "size_t" */
+/* syscall: "readlinkat" ret: "ssize_t" args: "int" "const char *" "char *" "size_t" */
 #define	LINUX_SYS_readlinkat	460
 
 /* syscall: "fchmodat" ret: "int" args: "int" "const char *" "linux_umode_t" */
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.98 src

CVS commit: src/sys/compat/linux/arch

2016-07-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Jul 24 13:22:01 UTC 2016

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master

Log Message:
Small cleanup. Adjust readlink/readlinkat signatures to reduce diffs with
native.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.56 -r1.57 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.63 -r1.64 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.120 -r1.121 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.68 -r1.69 src/sys/compat/linux/arch/powerpc/syscalls.master

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/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.90 src/sys/compat/linux/arch/alpha/syscalls.master:1.91
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.90	Sun Oct 25 15:55:05 2015
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Sun Jul 24 13:22:01 2016
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.90 2015/10/25 15:55:05 njoly Exp $
+	$NetBSD: syscalls.master,v 1.91 2016/07/24 13:22:01 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -155,7 +155,7 @@
 55	UNIMPL
 56	UNIMPL
 57	NOARGS		{ int|sys||symlink(const char *path, const char *to); }
-58	NOARGS		{ int|sys||readlink(const char *name, char *buf, \
+58	NOARGS		{ ssize_t|sys||readlink(const char *path, char *buf, \
 			int count); }
 59	NOARGS		{ int|sys||execve(const char *path, char **argp, \
 			char **envp); }
@@ -725,7 +725,7 @@
 			int fd2, const char *name2, int flags); }
 459	NOARGS		{ int|sys||symlinkat(const char *path1, int fd, \
 			const char *path2); }
-460	NOARGS		{ int|sys||readlinkat(int fd, const char *path, \
+460	NOARGS		{ ssize_t|sys||readlinkat(int fd, const char *path, \
 			char *buf, size_t bufsize); }
 461	STD		{ int|linux_sys||fchmodat(int fd, const char *path, \
 			linux_umode_t mode); }

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.56 src/sys/compat/linux/arch/amd64/syscalls.master:1.57
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.56	Tue Oct 27 07:15:38 2015
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sun Jul 24 13:22:01 2016
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp $
+	$NetBSD: syscalls.master,v 1.57 2016/07/24 13:22:01 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -235,7 +235,7 @@
 86	NOARGS		{ int|sys||link(const char *path, const char *link); }
 87	STD		{ int|linux_sys||unlink(const char *path); }
 88	NOARGS		{ int|sys||symlink(const char *path, const char *link); }
-89	NOARGS		{ int|sys||readlink(const char *path, char *buf, \
+89	NOARGS		{ ssize_t|sys||readlink(const char *path, char *buf, \
 			int count); }
 90	NOARGS		{ int|sys||chmod(const char *path, linux_umode_t mode); }
 91	NOARGS		{ int|sys||fchmod(int fd, linux_umode_t mode); }
@@ -483,7 +483,7 @@
 			int fd2, const char *name2, int flags); }
 266	NOARGS		{ int|sys||symlinkat(const char *path1, int fd, \
 			const char *path2); }
-267	NOARGS		{ int|sys||readlinkat(int fd, const char *path, \
+267	NOARGS		{ ssize_t|sys||readlinkat(int fd, const char *path, \
 			char *buf, size_t bufsize); }
 268	STD		{ int|linux_sys||fchmodat(int fd, const char *path, \
 			linux_umode_t mode); }

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.63 src/sys/compat/linux/arch/arm/syscalls.master:1.64
--- src/sys/compat/linux/arch/arm/syscalls.master:1.63	Mon Mar 23 07:50:03 2015
+++ src/sys/compat/linux/arch/arm/syscalls.master	Sun Jul 24 13:22:01 2016
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.63 2015/03/23 07:50:03 ozaki-r Exp $
+	$NetBSD: syscalls.master,v 1.64 2016/07/24 13:22:01 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -164,7 +164,7 @@
 83	NOARGS		{ int|sys||symlink(const char *path, const char *link); }
 84	NOARGS		{ int|compat_43_sys||lstat(const char *path, \
 			struct stat43 *ub); } oolstat
-85	NOARGS		{ int|sys||readlink(const char *path, char *buf, \
+85	NOARGS		{ ssize_t|sys||readlink(const char *path, char *buf, \
 			int count); }
 #ifdef EXEC_AOUT
 86	STD		{ int|linux_sys||usel

CVS commit: src/sys/compat/linux/arch/i386

2016-07-13 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Jul 13 15:59:54 UTC 2016

Modified Files:
src/sys/compat/linux/arch/i386: linux_machdep.c

Log Message:
x86_alldisks can be NULL, so don't dereference it. Not tested, but obvious
enough.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/compat/linux/arch/i386/linux_machdep.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/arch/i386/linux_machdep.c
diff -u src/sys/compat/linux/arch/i386/linux_machdep.c:1.161 src/sys/compat/linux/arch/i386/linux_machdep.c:1.162
--- src/sys/compat/linux/arch/i386/linux_machdep.c:1.161	Tue Dec  8 21:27:50 2015
+++ src/sys/compat/linux/arch/i386/linux_machdep.c	Wed Jul 13 15:59:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.161 2015/12/08 21:27:50 christos Exp $	*/
+/*	$NetBSD: linux_machdep.c,v 1.162 2016/07/13 15:59:54 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1995, 2000, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.161 2015/12/08 21:27:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.162 2016/07/13 15:59:54 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vm86.h"
@@ -107,8 +107,9 @@ __KERNEL_RCSID(0, "$NetBSD: linux_machde
 #define DPRINTF(a)
 #endif
 
-static struct biosdisk_info *fd2biosinfo(struct proc *, struct file *);
 extern struct disklist *x86_alldisks;
+
+static struct biosdisk_info *fd2biosinfo(struct proc *, struct file *);
 static void linux_save_ucontext(struct lwp *, struct trapframe *,
 const sigset_t *, struct sigaltstack *, struct linux_ucontext *);
 static void linux_save_sigcontext(struct lwp *, struct trapframe *,
@@ -761,6 +762,8 @@ fd2biosinfo(struct proc *p, struct file 
 	struct nativedisk_info *nip;
 	struct disklist *dl = x86_alldisks;
 
+	if (dl == NULL)
+		return NULL;
 	if (fp->f_type != DTYPE_VNODE)
 		return NULL;
 	vp = (struct vnode *)fp->f_data;



CVS commit: src/sys/compat/netbsd32

2016-07-13 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jul 13 11:11:53 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h

Log Message:
Add netbsd32 support for drvctl(4)


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.53 -r1.54 src/sys/compat/netbsd32/netbsd32_ioctl.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_ioctl.c
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.83 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.84
--- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.83	Tue Dec  8 20:36:14 2015
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c	Wed Jul 13 11:11:53 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.c,v 1.83 2015/12/08 20:36:14 christos Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.c,v 1.84 2016/07/13 11:11:53 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.83 2015/12/08 20:36:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.84 2016/07/13 11:11:53 jmcneill Exp $");
 
 #include 
 #include 
@@ -56,6 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_ioc
 #include 
 #include 
 #include 
+#include 
 
 #ifdef __sparc__
 #include 
@@ -475,6 +476,29 @@ netbsd32_to_npf_ioctl_table(
 	}
 }
 
+static inline void
+netbsd32_to_devlistargs(
+const struct netbsd32_devlistargs *s32p,
+struct devlistargs *p,
+u_long cmd)
+{
+	memcpy(p->l_devname, s32p->l_devname, sizeof(p->l_devname));
+	p->l_children = s32p->l_children;
+	p->l_childname = NETBSD32PTR64(s32p->l_childname);
+}
+
+static inline void
+netbsd32_to_devrescanargs(
+const struct netbsd32_devrescanargs *s32p,
+struct devrescanargs *p,
+u_long cmd)
+{
+	memcpy(p->busname, s32p->busname, sizeof(p->busname));
+	memcpy(p->ifattr, s32p->ifattr, sizeof(p->ifattr));
+	p->numlocators = s32p->numlocators;
+	p->locators = NETBSD32PTR64(s32p->locators);
+}
+
 /*
  * handle ioctl conversions from 64-bit kernel -> netbsd32
  */
@@ -874,6 +898,29 @@ netbsd32_from_npf_ioctl_table(
 	}
 }
 
+static inline void
+netbsd32_from_devlistargs(
+const struct devlistargs *p,
+struct netbsd32_devlistargs *s32p,
+u_long cmd)
+{
+	memcpy(s32p->l_devname, p->l_devname, sizeof(s32p->l_devname));
+	s32p->l_children = p->l_children;
+	NETBSD32PTR32(s32p->l_childname, p->l_childname);
+}
+
+static inline void
+netbsd32_from_devrescanargs(
+const struct devrescanargs *p,
+struct netbsd32_devrescanargs *s32p,
+u_long cmd)
+{
+	memcpy(s32p->busname, p->busname, sizeof(s32p->busname));
+	memcpy(s32p->ifattr, p->ifattr, sizeof(s32p->ifattr));
+	s32p->numlocators = p->numlocators;
+	NETBSD32PTR32(s32p->locators, p->locators);
+}
+
 /*
  * main ioctl syscall.
  *
@@ -1263,6 +1310,15 @@ netbsd32_ioctl(struct lwp *l, const stru
 	case IOC_NPF_RULE32:
 		IOCTL_STRUCT_CONV_TO(IOC_NPF_RULE, plistref);
 
+	case DRVRESCANBUS32:
+		IOCTL_STRUCT_CONV_TO(DRVRESCANBUS, devrescanargs);
+	case DRVLISTDEV32:
+		IOCTL_STRUCT_CONV_TO(DRVLISTDEV, devlistargs);
+	case DRVCTLCOMMAND32:
+		IOCTL_STRUCT_CONV_TO(DRVCTLCOMMAND, plistref);
+	case DRVGETEVENT32:
+		IOCTL_STRUCT_CONV_TO(DRVGETEVENT, plistref);
+
 	default:
 #ifdef NETBSD32_MD_IOCTL
 		error = netbsd32_md_ioctl(fp, com, data32, l);

Index: src/sys/compat/netbsd32/netbsd32_ioctl.h
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.53 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.54
--- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.53	Tue Dec  8 20:36:14 2015
+++ src/sys/compat/netbsd32/netbsd32_ioctl.h	Wed Jul 13 11:11:53 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.h,v 1.53 2015/12/08 20:36:14 christos Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.h,v 1.54 2016/07/13 11:11:53 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -604,3 +604,22 @@ typedef struct netbsd32_npf_ioctl_table 
 #define IOC_NPF_STATS32 _IOW('N', 104, netbsd32_voidp)
 #define IOC_NPF_SAVE32  _IOR('N', 105, struct netbsd32_plistref)
 #define IOC_NPF_RULE32  _IOWR('N', 107, struct netbsd32_plistref)
+
+/* From sys/drvctlio.h */
+struct netbsd32_devlistargs {
+	char			l_devname[16];
+	netbsd32_charpp		l_childname;
+	netbsd32_size_t		l_children;
+};
+
+struct netbsd32_devrescanargs {
+	char			busname[16];
+	char			ifattr[16];
+	unsigned int		numlocators;
+	netbsd32_intp		locators;
+};
+
+#define	DRVRESCANBUS32		_IOW('D', 124, struct netbsd32_devrescanargs)
+#define DRVCTLCOMMAND32		_IOWR('D', 125, struct netbsd32_plistref)
+#define	DRVLISTDEV32		_IOWR('D', 127, struct netbsd32_devlistargs)
+#define DRVGETEVENT32		_IOR('D', 128, struct netbsd32_plistref)



CVS commit: src/sys/compat/linux32/common

2016-07-05 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  5 08:48:51 UTC 2016

Modified Files:
src/sys/compat/linux32/common: linux32_socket.c

Log Message:
Fix psref isn't released in a case of IFADDR_EMPTY


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/linux32/common/linux32_socket.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_socket.c
diff -u src/sys/compat/linux32/common/linux32_socket.c:1.23 src/sys/compat/linux32/common/linux32_socket.c:1.24
--- src/sys/compat/linux32/common/linux32_socket.c:1.23	Thu Jun 16 02:38:40 2016
+++ src/sys/compat/linux32/common/linux32_socket.c	Tue Jul  5 08:48:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_socket.c,v 1.23 2016/06/16 02:38:40 ozaki-r Exp $ */
+/*	$NetBSD: linux32_socket.c,v 1.24 2016/07/05 08:48:51 ozaki-r Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.23 2016/06/16 02:38:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.24 2016/07/05 08:48:51 ozaki-r Exp $");
 
 #include 
 #include 
@@ -450,8 +450,7 @@ linux32_getifconf(struct lwp *l, registe
 			error = ENAMETOOLONG;
 			goto release_exit;
 		}
-		if (IFADDR_EMPTY(ifp))
-			continue;
+
 		IFADDR_FOREACH(ifa, ifp) {
 			sa = ifa->ifa_addr;
 			if (sa->sa_family != AF_INET ||



CVS commit: src/sys/compat/linux/common

2016-07-05 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  5 07:55:08 UTC 2016

Modified Files:
src/sys/compat/linux/common: linux_socket.c

Log Message:
Fix psref isn't released in a case of IFADDR_EMPTY


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/compat/linux/common/linux_socket.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_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.129 src/sys/compat/linux/common/linux_socket.c:1.130
--- src/sys/compat/linux/common/linux_socket.c:1.129	Thu Jun 16 02:38:40 2016
+++ src/sys/compat/linux/common/linux_socket.c	Tue Jul  5 07:55:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.c,v 1.129 2016/06/16 02:38:40 ozaki-r Exp $	*/
+/*	$NetBSD: linux_socket.c,v 1.130 2016/07/05 07:55:08 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.129 2016/06/16 02:38:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.130 2016/07/05 07:55:08 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1149,8 +1149,7 @@ linux_getifconf(struct lwp *l, register_
 			error = ENAMETOOLONG;
 			goto release_exit;
 		}
-		if (IFADDR_EMPTY(ifp))
-			continue;
+
 		IFADDR_FOREACH(ifa, ifp) {
 			sa = ifa->ifa_addr;
 			if (sa->sa_family != AF_INET ||



CVS commit: src/sys/compat/linux/common

2016-05-20 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri May 20 13:54:34 UTC 2016

Modified Files:
src/sys/compat/linux/common: linux_futex.c

Log Message:
simplify and fix futex requeuing:
don't wake up all the threads being requeued to have them move themselves
from one list to another (thus defeating the purpose), just change the lists
directly in futex_wake().


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/compat/linux/common/linux_futex.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_futex.c
diff -u src/sys/compat/linux/common/linux_futex.c:1.33 src/sys/compat/linux/common/linux_futex.c:1.34
--- src/sys/compat/linux/common/linux_futex.c:1.33	Tue Feb 11 16:00:13 2014
+++ src/sys/compat/linux/common/linux_futex.c	Fri May 20 13:54:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_futex.c,v 1.33 2014/02/11 16:00:13 maxv Exp $ */
+/*	$NetBSD: linux_futex.c,v 1.34 2016/05/20 13:54:34 chs Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.33 2014/02/11 16:00:13 maxv Exp $");
+__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.34 2016/05/20 13:54:34 chs Exp $");
 
 #include 
 #include 
@@ -58,11 +58,10 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.
 struct futex;
 
 struct waiting_proc {
-	lwp_t *wp_l;
-	struct futex *wp_new_futex;
+	struct futex *wp_futex;
 	kcondvar_t wp_futex_cv;
 	TAILQ_ENTRY(waiting_proc) wp_list;
-	TAILQ_ENTRY(waiting_proc) wp_rqlist;
+	bool wp_onlist;
 };
 struct futex {
 	void *f_uaddr;
@@ -70,7 +69,6 @@ struct futex {
 	uint32_t f_bitset;
 	LIST_ENTRY(futex) f_list;
 	TAILQ_HEAD(, waiting_proc) f_waiting_proc;
-	TAILQ_HEAD(, waiting_proc) f_requeue_proc;
 };
 
 static LIST_HEAD(futex_list, futex) futex_list;
@@ -432,7 +430,6 @@ futex_get(void *uaddr, uint32_t bitset)
 	f->f_bitset = bitset;
 	f->f_refcount = 1;
 	TAILQ_INIT(&f->f_waiting_proc);
-	TAILQ_INIT(&f->f_requeue_proc);
 	LIST_INSERT_HEAD(&futex_list, f, f_list);
 
 	return f;
@@ -456,7 +453,6 @@ futex_put(struct futex *f)
 	f->f_refcount--;
 	if (f->f_refcount == 0) {
 		KASSERT(TAILQ_EMPTY(&f->f_waiting_proc));
-		KASSERT(TAILQ_EMPTY(&f->f_requeue_proc));
 		LIST_REMOVE(f, f_list);
 		kmem_free(f, sizeof(*f));
 	}
@@ -465,107 +461,78 @@ futex_put(struct futex *f)
 static int 
 futex_sleep(struct futex **fp, lwp_t *l, int timeout, struct waiting_proc *wp)
 {
-	struct futex *f, *newf;
+	struct futex *f;
 	int ret;
 
 	FUTEX_LOCKASSERT;
 
 	f = *fp;
-	wp->wp_l = l;
-	wp->wp_new_futex = NULL;
-
-requeue:
+	wp->wp_futex = f;
 	TAILQ_INSERT_TAIL(&f->f_waiting_proc, wp, wp_list);
+	wp->wp_onlist = true;
 	ret = cv_timedwait_sig(&wp->wp_futex_cv, &futex_lock, timeout);
-	TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
 
-	/* if futex_wake() tells us to requeue ... */
-	newf = wp->wp_new_futex;
-	if (ret == 0 && newf != NULL) {
-		/* ... requeue ourselves on the new futex */
-		futex_put(f);
-		wp->wp_new_futex = NULL;
-		TAILQ_REMOVE(&newf->f_requeue_proc, wp, wp_rqlist);
-		*fp = f = newf;
-		goto requeue;
+	/*
+	 * we may have been requeued to a different futex before we were
+	 * woken up, so let the caller know which futex to put.   if we were
+	 * woken by futex_wake() then it took us off the waiting list,
+	 * but if our sleep was interrupted or timed out then we might
+	 * need to take ourselves off the waiting list.
+	 */
+
+	f = wp->wp_futex;
+	if (wp->wp_onlist) {
+		TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
 	}
+	*fp = f;
 	return ret;
 }
 
 static int
 futex_wake(struct futex *f, int n, struct futex *newf, int n2)
 {
-	struct waiting_proc *wp, *wpnext;
-	int count;
+	struct waiting_proc *wp;
+	int count = 0;
 
 	FUTEX_LOCKASSERT;
 
-	count = newf ? 0 : 1;
-
 	/*
-	 * first, wake up any threads sleeping on this futex.
-	 * note that sleeping threads are not in the process of requeueing.
+	 * wake up up to n threads waiting on this futex.
 	 */
 
-	TAILQ_FOREACH(wp, &f->f_waiting_proc, wp_list) {
-		KASSERT(wp->wp_new_futex == NULL);
-
-		FUTEXPRINTF(("%s: signal f %p l %p ref %d\n", __func__,
-		f, wp->wp_l, f->f_refcount));
+	while (n--) {
+		wp = TAILQ_FIRST(&f->f_waiting_proc);
+		if (wp == NULL)
+			return count;
+
+		KASSERT(f == wp->wp_futex);
+		TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
+		wp->wp_onlist = false;
 		cv_signal(&wp->wp_futex_cv);
-		if (count <= n) {
-			count++;
-		} else {
-			if (newf == NULL)
-break;
-
-			/* matching futex_put() is called by the other thread. */
-			futex_ref(newf);
-			wp->wp_new_futex = newf;
-			TAILQ_INSERT_TAIL(&newf->f_requeue_proc, wp, wp_rqlist);
-			FUTEXPRINTF(("%s: requeue newf %p l %p ref %d\n",
-			__func__, newf, wp->wp_l, newf->f_refcount));
-			if (count - n >= n2)
-goto out;
-		}
+		count++;
 	}
+	if (newf == NULL)
+		return count;
 
 	/*
-	 * next, deal with threads that are requeuing 

CVS commit: src/sys/compat/netbsd32

2016-05-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 13 16:54:36 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c

Log Message:
clamp getrlimit the same way we clamp setrlimit


To generate a diff of this commit:
cvs rdiff -u -r1.199 -r1.200 src/sys/compat/netbsd32/netbsd32_netbsd.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_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.199 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.200
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.199	Sun Feb 28 18:24:35 2016
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Fri May 13 12:54:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.199 2016/02/28 23:24:35 khorben Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.200 2016/05/13 16:54:36 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.199 2016/02/28 23:24:35 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.200 2016/05/13 16:54:36 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -1448,23 +1448,51 @@ netbsd32_fpathconf(struct lwp *l, const 
 	return sys_fpathconf(l, &ua, retval);
 }
 
+static void
+fixlimit(int which, struct rlimit *alim)
+{
+	switch (which) {
+	case RLIMIT_DATA:
+		if (LIMITCHECK(alim->rlim_cur, MAXDSIZ32))
+			alim->rlim_cur = MAXDSIZ32;
+		if (LIMITCHECK(alim->rlim_max, MAXDSIZ32))
+			alim->rlim_max = MAXDSIZ32;
+		return;	
+	case RLIMIT_STACK:
+		if (LIMITCHECK(alim->rlim_cur, MAXSSIZ32))
+			alim->rlim_cur = MAXSSIZ32;
+		if (LIMITCHECK(alim->rlim_max, MAXSSIZ32))
+			alim->rlim_max = MAXSSIZ32;
+		return;
+	default:
+		return;
+	}
+}
+
 int
-netbsd32_getrlimit(struct lwp *l, const struct netbsd32_getrlimit_args *uap, register_t *retval)
+netbsd32_getrlimit(struct lwp *l, const struct netbsd32_getrlimit_args *uap,
+register_t *retval)
 {
 	/* {
 		syscallarg(int) which;
 		syscallarg(netbsd32_rlimitp_t) rlp;
 	} */
 	int which = SCARG(uap, which);
+	struct rlimit alim;
 
 	if ((u_int)which >= RLIM_NLIMITS)
-		return (EINVAL);
-	return (copyout(&l->l_proc->p_rlimit[which],
-	SCARG_P32(uap, rlp), sizeof(struct rlimit)));
+		return EINVAL;
+
+	alim = l->l_proc->p_rlimit[which];
+
+	fixlimit(which, &alim);
+
+	return copyout(&alim, SCARG_P32(uap, rlp), sizeof(alim));
 }
 
 int
-netbsd32_setrlimit(struct lwp *l, const struct netbsd32_setrlimit_args *uap, register_t *retval)
+netbsd32_setrlimit(struct lwp *l, const struct netbsd32_setrlimit_args *uap,
+register_t *retval)
 {
 	/* {
 		syscallarg(int) which;
@@ -1474,28 +1502,16 @@ netbsd32_setrlimit(struct lwp *l, const 
 	struct rlimit alim;
 	int error;
 
+	if ((u_int)which >= RLIM_NLIMITS)
+		return EINVAL;
+
 	error = copyin(SCARG_P32(uap, rlp), &alim, sizeof(struct rlimit));
 	if (error)
 		return (error);
 
-	switch (which) {
-	case RLIMIT_DATA:
-		if (LIMITCHECK(alim.rlim_cur, MAXDSIZ32))
-			alim.rlim_cur = MAXDSIZ32;
-		if (LIMITCHECK(alim.rlim_max, MAXDSIZ32))
-			alim.rlim_max = MAXDSIZ32;
-		break;
-
-	case RLIMIT_STACK:
-		if (LIMITCHECK(alim.rlim_cur, MAXSSIZ32))
-			alim.rlim_cur = MAXSSIZ32;
-		if (LIMITCHECK(alim.rlim_max, MAXSSIZ32))
-			alim.rlim_max = MAXSSIZ32;
-	default:
-		break;
-	}
+	fixlimit(which, &alim);
 
-	return (dosetrlimit(l, l->l_proc, which, &alim));
+	return dosetrlimit(l, l->l_proc, which, &alim);
 }
 
 int



CVS commit: src/sys/compat/svr4_32

2016-05-11 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu May 12 03:01:58 UTC 2016

Modified Files:
src/sys/compat/svr4_32: svr4_32_sockio.c

Log Message:
Add missing semicolon


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/svr4_32/svr4_32_sockio.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/svr4_32/svr4_32_sockio.c
diff -u src/sys/compat/svr4_32/svr4_32_sockio.c:1.22 src/sys/compat/svr4_32/svr4_32_sockio.c:1.23
--- src/sys/compat/svr4_32/svr4_32_sockio.c:1.22	Thu May 12 02:24:16 2016
+++ src/sys/compat/svr4_32/svr4_32_sockio.c	Thu May 12 03:01:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_32_sockio.c,v 1.22 2016/05/12 02:24:16 ozaki-r Exp $	 */
+/*	$NetBSD: svr4_32_sockio.c,v 1.23 2016/05/12 03:01:57 ozaki-r Exp $	 */
 
 /*-
  * Copyright (c) 1995, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_sockio.c,v 1.22 2016/05/12 02:24:16 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_sockio.c,v 1.23 2016/05/12 03:01:57 ozaki-r Exp $");
 
 #include 
 #include 
@@ -112,7 +112,7 @@ svr4_32_sock_ioctl(file_t *fp, struct lw
 
 			s = pserialize_read_enter();
 			IFNET_READER_FOREACH(ifp)
-ifnum += svr4_count_ifnum(ifp)
+ifnum += svr4_count_ifnum(ifp);
 			pserialize_read_exit(s);
 
 			DPRINTF(("SIOCGIFNUM %d\n", ifnum));



CVS commit: src/sys/compat/sys

2016-04-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr  7 17:48:40 UTC 2016

Modified Files:
src/sys/compat/sys: socket.h

Log Message:
include opt_compat_netbsd.h to get COMPAT_SOCKCRED70 defined.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/compat/sys/socket.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/sys/socket.h
diff -u src/sys/compat/sys/socket.h:1.13 src/sys/compat/sys/socket.h:1.14
--- src/sys/compat/sys/socket.h:1.13	Wed Apr  6 19:45:45 2016
+++ src/sys/compat/sys/socket.h	Thu Apr  7 17:48:40 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: socket.h,v 1.13 2016/04/06 19:45:45 roy Exp $	*/
+/*	$NetBSD: socket.h,v 1.14 2016/04/07 17:48:40 mrg Exp $	*/
 
 /*
  * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
@@ -36,6 +36,7 @@
 
 #ifdef _KERNEL_OPT
 
+#include "opt_compat_netbsd.h"
 #include "opt_compat_linux.h"
 #include "opt_compat_svr4.h"
 #include "opt_compat_ultrix.h"



CVS commit: src/sys/compat/svr4_32

2016-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr  4 21:21:49 UTC 2016

Modified Files:
src/sys/compat/svr4_32: svr4_32_signal.c

Log Message:
catch up with exit1() change


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/compat/svr4_32/svr4_32_signal.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/svr4_32/svr4_32_signal.c
diff -u src/sys/compat/svr4_32/svr4_32_signal.c:1.26 src/sys/compat/svr4_32/svr4_32_signal.c:1.27
--- src/sys/compat/svr4_32/svr4_32_signal.c:1.26	Mon Apr 28 16:23:46 2008
+++ src/sys/compat/svr4_32/svr4_32_signal.c	Mon Apr  4 17:21:49 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_32_signal.c,v 1.26 2008/04/28 20:23:46 martin Exp $	 */
+/*	$NetBSD: svr4_32_signal.c,v 1.27 2016/04/04 21:21:49 christos Exp $	 */
 
 /*-
  * Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_signal.c,v 1.26 2008/04/28 20:23:46 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_signal.c,v 1.27 2016/04/04 21:21:49 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_svr4.h"
@@ -630,7 +630,7 @@ svr4_32_sys_context(struct lwp *l, const
 	case SVR4_SETCONTEXT:
 		DPRINTF(("setcontext(%p)\n", SCARG(uap, uc)));
 		if (!SCARG_P32(uap, uc))
-			exit1(l, W_EXITCODE(0, 0));
+			exit1(l, 0, 0, 0);
 		else if ((error = copyin(SCARG_P32(uap, uc),
 	 &uc, sizeof(uc))) != 0)
 			return error;



CVS commit: src/sys/compat/netbsd32

2016-03-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar 21 22:42:56 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_fs.c

Log Message:
avoid some stupid GCC errors seen only with -Os and -O3.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/compat/netbsd32/netbsd32_fs.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_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.73 src/sys/compat/netbsd32/netbsd32_fs.c:1.74
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.73	Fri Oct 23 19:40:10 2015
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Mon Mar 21 22:42:56 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.73 2015/10/23 19:40:10 maxv Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.74 2016/03/21 22:42:56 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.73 2015/10/23 19:40:10 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.74 2016/03/21 22:42:56 mrg Exp $");
 
 #include 
 #include 
@@ -1236,7 +1236,7 @@ netbsd32_utimensat(struct lwp *l, const 
 		syscallarg(netbsd32_timespecp_t) tptr;
 		syscallarg(int) flag;
 	} */
-	struct timespec ts[2], *tsp;
+	struct timespec ts[2], *tsp = NULL /* XXXgcc */;
 	int follow;
 	int error;
 
@@ -1334,7 +1334,7 @@ netbsd32_futimens(struct lwp *l, const s
 		syscallarg(int) fd;
 		syscallarg(netbsd32_timespecp_t) tptr;
 	} */
-	struct timespec ts[2], *tsp;
+	struct timespec ts[2], *tsp = NULL /* XXXgcc */;
 	file_t *fp;
 	int error;
 



CVS commit: src/sys/compat/common

2016-03-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 11 18:32:29 UTC 2016

Modified Files:
src/sys/compat/common: kern_time_50.c

Log Message:
PR/50947: David Binderman: sprinkle parens


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/compat/common/kern_time_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/kern_time_50.c
diff -u src/sys/compat/common/kern_time_50.c:1.30 src/sys/compat/common/kern_time_50.c:1.31
--- src/sys/compat/common/kern_time_50.c:1.30	Sun Dec  6 22:25:57 2015
+++ src/sys/compat/common/kern_time_50.c	Fri Mar 11 13:32:29 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time_50.c,v 1.30 2015/12/07 03:25:57 pgoyette Exp $	*/
+/*	$NetBSD: kern_time_50.c,v 1.31 2016/03/11 18:32:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.30 2015/12/07 03:25:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.31 2016/03/11 18:32:29 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -293,7 +293,7 @@ compat_50_sys_setitimer(struct lwp *l,
 		return (EINVAL);
 	itvp = SCARG(uap, itv);
 	if (itvp &&
-	(error = copyin(itvp, &aitv50, sizeof(aitv50)) != 0))
+	(error = copyin(itvp, &aitv50, sizeof(aitv50))) != 0)
 		return (error);
 	itimerval50_to_itimerval(&aitv50, &aitv);
 	if (SCARG(uap, oitv) != NULL) {



CVS commit: src/sys/compat

2016-02-28 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Sun Feb 28 23:24:36 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c
src/sys/compat/sunos32: sunos32_misc.c
src/sys/compat/svr4_32: svr4_32_misc.c

Log Message:
Add missing newline character in error message

This is related to kern/50469.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/sunos32/sunos32_misc.c
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/svr4_32/svr4_32_misc.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_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.198 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.199
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.198	Tue Dec  1 02:20:43 2015
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Sun Feb 28 23:24:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.198 2015/12/01 02:20:43 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.199 2016/02/28 23:24:35 khorben Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.198 2015/12/01 02:20:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.199 2016/02/28 23:24:35 khorben Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -1537,7 +1537,7 @@ netbsd32_mmap(struct lwp *l, const struc
 #endif
 	error = sys_mmap(l, &ua, retval);
 	if ((u_long)*retval > (u_long)UINT_MAX) {
-		printf("netbsd32_mmap: retval out of range: 0x%lx",
+		printf("netbsd32_mmap: retval out of range: 0x%lx\n",
 		(u_long)*retval);
 		/* Should try to recover and return an error here. */
 	}

Index: src/sys/compat/sunos32/sunos32_misc.c
diff -u src/sys/compat/sunos32/sunos32_misc.c:1.76 src/sys/compat/sunos32/sunos32_misc.c:1.77
--- src/sys/compat/sunos32/sunos32_misc.c:1.76	Fri Oct 23 19:40:11 2015
+++ src/sys/compat/sunos32/sunos32_misc.c	Sun Feb 28 23:24:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos32_misc.c,v 1.76 2015/10/23 19:40:11 maxv Exp $	*/
+/*	$NetBSD: sunos32_misc.c,v 1.77 2016/02/28 23:24:35 khorben Exp $	*/
 /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp	*/
 
 /*
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.76 2015/10/23 19:40:11 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.77 2016/02/28 23:24:35 khorben Exp $");
 
 #define COMPAT_SUNOS 1
 
@@ -758,7 +758,7 @@ sunos32_sys_mmap(struct lwp *l, const st
 
 	error = sys_mmap(l, &ua, retval);
 	if ((u_long)*retval > (u_long)UINT_MAX) {
-		printf("sunos32_mmap: retval out of range: 0x%lx",
+		printf("sunos32_mmap: retval out of range: 0x%lx\n",
 		   (u_long)*retval);
 		/* Should try to recover and return an error here. */
 	}

Index: src/sys/compat/svr4_32/svr4_32_misc.c
diff -u src/sys/compat/svr4_32/svr4_32_misc.c:1.75 src/sys/compat/svr4_32/svr4_32_misc.c:1.76
--- src/sys/compat/svr4_32/svr4_32_misc.c:1.75	Fri Sep  5 09:21:55 2014
+++ src/sys/compat/svr4_32/svr4_32_misc.c	Sun Feb 28 23:24:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_32_misc.c,v 1.75 2014/09/05 09:21:55 matt Exp $	 */
+/*	$NetBSD: svr4_32_misc.c,v 1.76 2016/02/28 23:24:36 khorben Exp $	 */
 
 /*-
  * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.75 2014/09/05 09:21:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.76 2016/02/28 23:24:36 khorben Exp $");
 
 #include 
 #include 
@@ -490,7 +490,7 @@ svr4_32_sys_mmap(struct lwp *l, const st
 
 	error = sys_mmap(l, &mm, retval);
 	if ((u_long)*retval > (u_long)UINT_MAX) {
-		printf("svr4_32_mmap: retval out of range: 0x%lx",
+		printf("svr4_32_mmap: retval out of range: 0x%lx\n",
 		   (u_long)*retval);
 		/* Should try to recover and return an error here. */
 	}
@@ -523,7 +523,7 @@ svr4_32_sys_mmap64(struct lwp *l, const 
 
 	error = sys_mmap(l, &mm, retval);
 	if ((u_long)*retval > (u_long)UINT_MAX) {
-		printf("svr4_32_mmap64: retval out of range: 0x%lx",
+		printf("svr4_32_mmap64: retval out of range: 0x%lx\n",
 		   (u_long)*retval);
 		/* Should try to recover and return an error here. */
 	}



CVS commit: src/sys/compat/ndis

2016-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  8 16:42:04 UTC 2016

Modified Files:
src/sys/compat/ndis: subr_ntoskrnl.c

Log Message:
PR/50784: David Binderman: Add missing braces, this is not python.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/ndis/subr_ntoskrnl.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/ndis/subr_ntoskrnl.c
diff -u src/sys/compat/ndis/subr_ntoskrnl.c:1.25 src/sys/compat/ndis/subr_ntoskrnl.c:1.26
--- src/sys/compat/ndis/subr_ntoskrnl.c:1.25	Wed Mar 26 14:11:26 2014
+++ src/sys/compat/ndis/subr_ntoskrnl.c	Mon Feb  8 11:42:04 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_ntoskrnl.c,v 1.25 2014/03/26 18:11:26 christos Exp $	*/
+/*	$NetBSD: subr_ntoskrnl.c,v 1.26 2016/02/08 16:42:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003
@@ -37,7 +37,7 @@
 __FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.43.2.5 2005/03/31 04:24:36 wpaul Exp $");
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: subr_ntoskrnl.c,v 1.25 2014/03/26 18:11:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_ntoskrnl.c,v 1.26 2016/02/08 16:42:04 christos Exp $");
 #endif
 
 #ifdef __FreeBSD__
@@ -433,9 +433,10 @@ IoGetDriverObjectExtension(driver_object
 	e = drv->dro_driverext->dre_usrext.nle_flink;
 	while (e != &drv->dro_driverext->dre_usrext) {
 		ce = (custom_extension *)e;
-		if (ce->ce_clid == clid)
+		if (ce->ce_clid == clid) {
 			printf("found\n");
 			return((void *)(ce + 1));
+		}
 		e = e->nle_flink;
 	}
 	printf("not found\n");



CVS commit: src/sys/compat/netbsd32

2016-01-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Jan  7 21:58:28 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_compat_14.c

Log Message:
Avoid defining inline functions that are never used when certain options
are missing.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/netbsd32/netbsd32_compat_14.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_14.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_14.c:1.25 src/sys/compat/netbsd32/netbsd32_compat_14.c:1.26
--- src/sys/compat/netbsd32/netbsd32_compat_14.c:1.25	Thu Dec  3 11:31:05 2015
+++ src/sys/compat/netbsd32/netbsd32_compat_14.c	Thu Jan  7 21:58:28 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_14.c,v 1.25 2015/12/03 11:31:05 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_14.c,v 1.26 2016/01/07 21:58:28 joerg Exp $	*/
 
 /*
  * Copyright (c) 1999 Eduardo E. Horvath
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.25 2015/12/03 11:31:05 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.26 2016/01/07 21:58:28 joerg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
@@ -53,23 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 
 #if defined(COMPAT_14)
 
-static inline void
-netbsd32_ipc_perm14_to_native(struct netbsd32_ipc_perm14 *, struct ipc_perm *);
-static inline void
-native_to_netbsd32_ipc_perm14(struct ipc_perm *, struct netbsd32_ipc_perm14 *);
-static inline void
-native_to_netbsd32_msqid_ds14(struct msqid_ds *, struct netbsd32_msqid_ds14 *);
-static inline void
-netbsd32_msqid_ds14_to_native(struct netbsd32_msqid_ds14 *, struct msqid_ds *);
-static inline void
-native_to_netbsd32_semid_ds14(struct semid_ds *, struct netbsd32_semid_ds14 *);
-static inline void
-netbsd32_semid_ds14_to_native(struct netbsd32_semid_ds14 *, struct semid_ds *);
-static inline void
-netbsd32_shmid_ds14_to_native(struct netbsd32_shmid_ds14 *, struct shmid_ds *);
-static inline void
-native_to_netbsd32_shmid_ds14(struct shmid_ds *, struct netbsd32_shmid_ds14 *);
-
+#if defined(SYSVMSG)
 static inline void
 netbsd32_ipc_perm14_to_native(struct netbsd32_ipc_perm14 *operm, struct ipc_perm *perm)
 {
@@ -140,7 +124,9 @@ native_to_netbsd32_msqid_ds14(struct msq
 	 */
 	omsqbuf->msg_cbytes = msqbuf->_msg_cbytes;
 }
+#endif
 
+#if defined(SYSVSEM)
 static inline void
 netbsd32_semid_ds14_to_native(struct netbsd32_semid_ds14 *osembuf, struct semid_ds *sembuf)
 {
@@ -204,7 +190,6 @@ native_to_netbsd32_shmid_ds14(struct shm
 /*
  * the compat_14 system calls
  */
-#if defined(SYSVMSG)
 int
 compat_14_netbsd32_msgctl(struct lwp *l, const struct compat_14_netbsd32_msgctl_args *uap, register_t *retval)
 {



CVS commit: src/sys/compat/netbsd32

2015-12-19 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Dec 19 13:15:21 UTC 2015

Modified Files:
src/sys/compat/netbsd32: netbsd32_module.c

Log Message:
Missing field (was here before my change).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/netbsd32/netbsd32_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/compat/netbsd32/netbsd32_module.c
diff -u src/sys/compat/netbsd32/netbsd32_module.c:1.3 src/sys/compat/netbsd32/netbsd32_module.c:1.4
--- src/sys/compat/netbsd32/netbsd32_module.c:1.3	Sat Dec 12 15:27:42 2015
+++ src/sys/compat/netbsd32/netbsd32_module.c	Sat Dec 19 13:15:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_module.c,v 1.3 2015/12/12 15:27:42 maxv Exp $	*/
+/*	$NetBSD: netbsd32_module.c,v 1.4 2015/12/19 13:15:21 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_module.c,v 1.3 2015/12/12 15:27:42 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_module.c,v 1.4 2015/12/19 13:15:21 maxv Exp $");
 
 #include 
 #include 
@@ -76,6 +76,7 @@ modctl32_handle_stat(struct netbsd32_iov
 		ms->ms_class = mi->mi_class;
 		ms->ms_refcnt = mod->mod_refcnt;
 		ms->ms_source = mod->mod_source;
+		ms->ms_flags = mod->mod_flags;
 		ms++;
 	}
 	TAILQ_FOREACH(mod, &module_builtins, mod_chain) {



CVS commit: src/sys/compat/svr4

2015-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 13 19:47:08 UTC 2015

Modified Files:
src/sys/compat/svr4: svr4_termios.c

Log Message:
PR/50520: David Binderman: Fix missing breaks.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/compat/svr4/svr4_termios.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/svr4/svr4_termios.c
diff -u src/sys/compat/svr4/svr4_termios.c:1.28 src/sys/compat/svr4/svr4_termios.c:1.29
--- src/sys/compat/svr4/svr4_termios.c:1.28	Sun Nov  9 13:16:55 2014
+++ src/sys/compat/svr4/svr4_termios.c	Sun Dec 13 14:47:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_termios.c,v 1.28 2014/11/09 18:16:55 maxv Exp $	 */
+/*	$NetBSD: svr4_termios.c,v 1.29 2015/12/13 19:47:08 christos Exp $	 */
 
 /*-
  * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: svr4_termios.c,v 1.28 2014/11/09 18:16:55 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_termios.c,v 1.29 2015/12/13 19:47:08 christos Exp $");
 
 #include 
 #include 
@@ -182,7 +182,7 @@ bsd_to_svr4_speed(u_long sp, u_long mask
 {
 	switch (sp) {
 #undef getval
-#define getval(a,b)	case __CONCAT(a,b):	sp = __CONCAT3(SVR4_,a,b)
+#define getval(a,b)	case __CONCAT(a,b): sp = __CONCAT3(SVR4_,a,b); break
 	getval(B,0);
 	getval(B,50);
 	getval(B,75);



CVS commit: src/sys/compat/netbsd32

2015-12-12 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Dec 12 15:27:42 UTC 2015

Modified Files:
src/sys/compat/netbsd32: netbsd32_module.c

Log Message:
Put the code in charge of handling MODCTL_STAT (32bit) into a separate
function. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/netbsd32/netbsd32_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/compat/netbsd32/netbsd32_module.c
diff -u src/sys/compat/netbsd32/netbsd32_module.c:1.2 src/sys/compat/netbsd32/netbsd32_module.c:1.3
--- src/sys/compat/netbsd32/netbsd32_module.c:1.2	Sun Jun 21 06:51:05 2015
+++ src/sys/compat/netbsd32/netbsd32_module.c	Sat Dec 12 15:27:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_module.c,v 1.2 2015/06/21 06:51:05 msaitoh Exp $	*/
+/*	$NetBSD: netbsd32_module.c,v 1.3 2015/12/12 15:27:42 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_module.c,v 1.2 2015/06/21 06:51:05 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_module.c,v 1.3 2015/12/12 15:27:42 maxv Exp $");
 
 #include 
 #include 
@@ -42,6 +42,72 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_mod
 #include 
 #include 
 
+static int
+modctl32_handle_stat(struct netbsd32_iovec *iov, void *arg)
+{
+	modstat_t *ms, *mso;
+	modinfo_t *mi;
+	module_t *mod;
+	vaddr_t addr;
+	size_t size;
+	size_t mslen;
+	int error;
+
+	kernconfig_lock();
+	mslen = (module_count+module_builtinlist+1) * sizeof(modstat_t);
+	mso = kmem_zalloc(mslen, KM_SLEEP);
+	if (mso == NULL) {
+		kernconfig_unlock();
+		return ENOMEM;
+	}
+	ms = mso;
+	TAILQ_FOREACH(mod, &module_list, mod_chain) {
+		mi = mod->mod_info;
+		strlcpy(ms->ms_name, mi->mi_name, sizeof(ms->ms_name));
+		if (mi->mi_required != NULL) {
+			strlcpy(ms->ms_required, mi->mi_required,
+			sizeof(ms->ms_required));
+		}
+		if (mod->mod_kobj != NULL) {
+			kobj_stat(mod->mod_kobj, &addr, &size);
+			ms->ms_addr = addr;
+			ms->ms_size = size;
+		}
+		ms->ms_class = mi->mi_class;
+		ms->ms_refcnt = mod->mod_refcnt;
+		ms->ms_source = mod->mod_source;
+		ms++;
+	}
+	TAILQ_FOREACH(mod, &module_builtins, mod_chain) {
+		mi = mod->mod_info;
+		strlcpy(ms->ms_name, mi->mi_name, sizeof(ms->ms_name));
+		if (mi->mi_required != NULL) {
+			strlcpy(ms->ms_required, mi->mi_required,
+			sizeof(ms->ms_required));
+		}
+		if (mod->mod_kobj != NULL) {
+			kobj_stat(mod->mod_kobj, &addr, &size);
+			ms->ms_addr = addr;
+			ms->ms_size = size;
+		}
+		ms->ms_class = mi->mi_class;
+		ms->ms_refcnt = -1;
+		KASSERT(mod->mod_source == MODULE_SOURCE_KERNEL);
+		ms->ms_source = mod->mod_source;
+		ms++;
+	}
+	kernconfig_unlock();
+	error = copyout(mso, NETBSD32PTR64(iov->iov_base),
+	min(mslen - sizeof(modstat_t), iov->iov_len));
+	kmem_free(mso, mslen);
+	if (error == 0) {
+		iov->iov_len = mslen - sizeof(modstat_t);
+		error = copyout(iov, arg, sizeof(*iov));
+	}
+
+	return error;
+}
+
 int
 netbsd32_modctl(struct lwp *lwp, const struct netbsd32_modctl_args *uap,
 	register_t *result)
@@ -51,12 +117,6 @@ netbsd32_modctl(struct lwp *lwp, const s
 		syscallarg(netbsd32_voidp) arg;
 	} */
 	char buf[MAXMODNAME];
-	size_t mslen;
-	module_t *mod;
-	modinfo_t *mi;
-	modstat_t *ms, *mso;
-	vaddr_t addr;
-	size_t size;
 	struct netbsd32_iovec iov;
 	struct netbsd32_modctl_load ml;
 	int error;
@@ -88,57 +148,7 @@ netbsd32_modctl(struct lwp *lwp, const s
 		if (error != 0) {
 			break;
 		}
-		kernconfig_lock();
-		mslen = (module_count+module_builtinlist+1) * sizeof(modstat_t);
-		mso = kmem_zalloc(mslen, KM_SLEEP);
-		if (mso == NULL) {
-			kernconfig_unlock();
-			return ENOMEM;
-		}
-		ms = mso;
-		TAILQ_FOREACH(mod, &module_list, mod_chain) {
-			mi = mod->mod_info;
-			strlcpy(ms->ms_name, mi->mi_name, sizeof(ms->ms_name));
-			if (mi->mi_required != NULL) {
-strlcpy(ms->ms_required, mi->mi_required,
-sizeof(ms->ms_required));
-			}
-			if (mod->mod_kobj != NULL) {
-kobj_stat(mod->mod_kobj, &addr, &size);
-ms->ms_addr = addr;
-ms->ms_size = size;
-			}
-			ms->ms_class = mi->mi_class;
-			ms->ms_refcnt = mod->mod_refcnt;
-			ms->ms_source = mod->mod_source;
-			ms++;
-		}
-		TAILQ_FOREACH(mod, &module_builtins, mod_chain) {
-			mi = mod->mod_info;
-			strlcpy(ms->ms_name, mi->mi_name, sizeof(ms->ms_name));
-			if (mi->mi_required != NULL) {
-strlcpy(ms->ms_required, mi->mi_required,
-sizeof(ms->ms_required));
-			}
-			if (mod->mod_kobj != NULL) {
-kobj_stat(mod->mod_kobj, &addr, &size);
-ms->ms_addr = addr;
-ms->ms_size = size;
-			}
-			ms->ms_class = mi->mi_class;
-			ms->ms_refcnt = -1;
-			KASSERT(mod->mod_source == MODULE_SOURCE_KERNEL);
-			ms->ms_source = mod->mod_source;
-			ms++;
-		}
-		kernconfig_unlock();
-		error = copyout(mso, NETBSD32PTR64(iov.iov_base),
-		min(mslen - sizeof(modstat_t), iov.iov_len));
-		kmem_free(mso,

CVS commit: src/sys/compat/sunos

2015-12-12 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Dec 12 17:48:18 UTC 2015

Modified Files:
src/sys/compat/sunos: sunos_ioctl.c

Log Message:
Redo previous.  zero check before modulo.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/sunos/sunos_ioctl.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/sunos/sunos_ioctl.c
diff -u src/sys/compat/sunos/sunos_ioctl.c:1.66 src/sys/compat/sunos/sunos_ioctl.c:1.67
--- src/sys/compat/sunos/sunos_ioctl.c:1.66	Fri Dec 11 08:19:07 2015
+++ src/sys/compat/sunos/sunos_ioctl.c	Sat Dec 12 17:48:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos_ioctl.c,v 1.66 2015/12/11 08:19:07 mlelstv Exp $	*/
+/*	$NetBSD: sunos_ioctl.c,v 1.67 2015/12/12 17:48:18 nakayama Exp $	*/
 
 /*
  * Copyright (c) 1993 Markus Wild.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.66 2015/12/11 08:19:07 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.67 2015/12/12 17:48:18 nakayama Exp $");
 
 #include 
 #include 
@@ -880,6 +880,10 @@ sunos_sys_ioctl(struct lwp *l, const str
 		if (error)
 			break;
 
+		if (label.d_secpercyl == 0) {
+			error = ERANGE;	/* XXX */
+			break;
+		}
 		if (pi.pi_offset % label.d_secpercyl != 0) {
 			error = ERANGE;	/* XXX */
 			break;



CVS commit: src/sys/compat/sunos

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:19:07 UTC 2015

Modified Files:
src/sys/compat/sunos: sunos_ioctl.c

Log Message:
d_secpercyl is gone and we use the value from disklabel anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/sunos/sunos_ioctl.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/sunos/sunos_ioctl.c
diff -u src/sys/compat/sunos/sunos_ioctl.c:1.65 src/sys/compat/sunos/sunos_ioctl.c:1.66
--- src/sys/compat/sunos/sunos_ioctl.c:1.65	Fri Dec 11 08:10:28 2015
+++ src/sys/compat/sunos/sunos_ioctl.c	Fri Dec 11 08:19:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos_ioctl.c,v 1.65 2015/12/11 08:10:28 mlelstv Exp $	*/
+/*	$NetBSD: sunos_ioctl.c,v 1.66 2015/12/11 08:19:07 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1993 Markus Wild.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.65 2015/12/11 08:10:28 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.66 2015/12/11 08:19:07 mlelstv Exp $");
 
 #include 
 #include 
@@ -880,10 +880,6 @@ sunos_sys_ioctl(struct lwp *l, const str
 		if (error)
 			break;
 
-		if (pi.disklab->d_secpercyl == 0) {
-			error = ERANGE;	/* XXX */
-			break;
-		}
 		if (pi.pi_offset % label.d_secpercyl != 0) {
 			error = ERANGE;	/* XXX */
 			break;



CVS commit: src/sys/compat/svr4_32

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:12:18 UTC 2015

Modified Files:
src/sys/compat/svr4_32: svr4_32_termios.c

Log Message:
PR 50519 missing breaks in switch


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/compat/svr4_32/svr4_32_termios.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/svr4_32/svr4_32_termios.c
diff -u src/sys/compat/svr4_32/svr4_32_termios.c:1.17 src/sys/compat/svr4_32/svr4_32_termios.c:1.18
--- src/sys/compat/svr4_32/svr4_32_termios.c:1.17	Mon Apr 28 20:23:46 2008
+++ src/sys/compat/svr4_32/svr4_32_termios.c	Fri Dec 11 08:12:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_32_termios.c,v 1.17 2008/04/28 20:23:46 martin Exp $	 */
+/*	$NetBSD: svr4_32_termios.c,v 1.18 2015/12/11 08:12:18 mlelstv Exp $	 */
 
 /*-
  * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_termios.c,v 1.17 2008/04/28 20:23:46 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_termios.c,v 1.18 2015/12/11 08:12:18 mlelstv Exp $");
 
 #include 
 #include 
@@ -183,7 +183,7 @@ bsd_to_svr4_32_speed(u_long sp, u_long m
 {
 	switch (sp) {
 #undef getval
-#define getval(a,b)	case __CONCAT(a,b):	sp = __CONCAT3(SVR4_,a,b)
+#define getval(a,b)	case __CONCAT(a,b): sp = __CONCAT3(SVR4_,a,b); break
 	getval(B,0);
 	getval(B,50);
 	getval(B,75);



CVS commit: src/sys/compat/sunos

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:10:28 UTC 2015

Modified Files:
src/sys/compat/sunos: sunos_ioctl.c

Log Message:
PR 50518 bad switch


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/sunos/sunos_ioctl.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/sunos/sunos_ioctl.c
diff -u src/sys/compat/sunos/sunos_ioctl.c:1.64 src/sys/compat/sunos/sunos_ioctl.c:1.65
--- src/sys/compat/sunos/sunos_ioctl.c:1.64	Tue Dec  8 20:36:14 2015
+++ src/sys/compat/sunos/sunos_ioctl.c	Fri Dec 11 08:10:28 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos_ioctl.c,v 1.64 2015/12/08 20:36:14 christos Exp $	*/
+/*	$NetBSD: sunos_ioctl.c,v 1.65 2015/12/11 08:10:28 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1993 Markus Wild.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.64 2015/12/08 20:36:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.65 2015/12/11 08:10:28 mlelstv Exp $");
 
 #include 
 #include 
@@ -817,9 +817,9 @@ sunos_sys_ioctl(struct lwp *l, const str
 	{
 		int tmp = 0;
 		switch ((int)(u_long)SCARG(uap, data)) {
-		case SUNOS_S_FLUSHR:	tmp = FREAD;
-		case SUNOS_S_FLUSHW:	tmp = FWRITE;
-		case SUNOS_S_FLUSHRW:	tmp = FREAD|FWRITE;
+		case SUNOS_S_FLUSHR:	tmp = FREAD; break;
+		case SUNOS_S_FLUSHW:	tmp = FWRITE; break;
+		case SUNOS_S_FLUSHRW:	tmp = FREAD|FWRITE; break;
 		}
 error = (*ctl)(fp, TIOCFLUSH, &tmp);
 		break;



CVS commit: src/sys/compat/sunos32

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:10:43 UTC 2015

Modified Files:
src/sys/compat/sunos32: sunos32_ioctl.c

Log Message:
PR 50517 bad switch


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/compat/sunos32/sunos32_ioctl.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/sunos32/sunos32_ioctl.c
diff -u src/sys/compat/sunos32/sunos32_ioctl.c:1.33 src/sys/compat/sunos32/sunos32_ioctl.c:1.34
--- src/sys/compat/sunos32/sunos32_ioctl.c:1.33	Tue Dec  8 20:36:14 2015
+++ src/sys/compat/sunos32/sunos32_ioctl.c	Fri Dec 11 08:10:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos32_ioctl.c,v 1.33 2015/12/08 20:36:14 christos Exp $	*/
+/*	$NetBSD: sunos32_ioctl.c,v 1.34 2015/12/11 08:10:43 mlelstv Exp $	*/
 /* from: NetBSD: sunos_ioctl.c,v 1.35 2001/02/03 22:20:02 mrg Exp 	*/
 
 /*
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos32_ioctl.c,v 1.33 2015/12/08 20:36:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_ioctl.c,v 1.34 2015/12/11 08:10:43 mlelstv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd32.h"
@@ -846,9 +846,9 @@ sunos32_sys_ioctl(struct lwp *l, const s
 	{
 		int tmp = 0;
 		switch ((intptr_t)SCARG_P32(uap, data)) {
-		case SUNOS_S_FLUSHR:	tmp = FREAD;
-		case SUNOS_S_FLUSHW:	tmp = FWRITE;
-		case SUNOS_S_FLUSHRW:	tmp = FREAD|FWRITE;
+		case SUNOS_S_FLUSHR:	tmp = FREAD; break;
+		case SUNOS_S_FLUSHW:	tmp = FWRITE; break;
+		case SUNOS_S_FLUSHRW:	tmp = FREAD|FWRITE; break;
 		}
 return sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCFLUSH, &tmp, l);
 	}



CVS commit: src/sys/compat/linux/arch/i386

2015-12-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec  8 21:27:50 UTC 2015

Modified Files:
src/sys/compat/linux/arch/i386: linux_machdep.c

Log Message:
Fix DIOCGPARTINFO


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/compat/linux/arch/i386/linux_machdep.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/arch/i386/linux_machdep.c
diff -u src/sys/compat/linux/arch/i386/linux_machdep.c:1.160 src/sys/compat/linux/arch/i386/linux_machdep.c:1.161
--- src/sys/compat/linux/arch/i386/linux_machdep.c:1.160	Tue Dec  8 15:36:14 2015
+++ src/sys/compat/linux/arch/i386/linux_machdep.c	Tue Dec  8 16:27:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.160 2015/12/08 20:36:14 christos Exp $	*/
+/*	$NetBSD: linux_machdep.c,v 1.161 2015/12/08 21:27:50 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 2000, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.160 2015/12/08 20:36:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.161 2015/12/08 21:27:50 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vm86.h"
@@ -807,7 +807,7 @@ linux_machdepioctl(struct lwp *l, const 
 	struct biosdisk_info *bip;
 	file_t *fp;
 	int fd;
-	struct disklabel label, *labp;
+	struct disklabel label;
 	struct partinfo partp;
 	int (*ioctlf)(struct file *, u_long, void *);
 	u_long start, biostotal, realtotal;
@@ -935,28 +935,27 @@ linux_machdepioctl(struct lwp *l, const 
 		 */
 		bip = fd2biosinfo(curproc, fp);
 		ioctlf = fp->f_ops->fo_ioctl;
-		error = ioctlf(fp, DIOCGDEFLABEL, (void *)&label);
+		error = ioctlf(fp, DIOCGDINFO, (void *)&label);
 		error1 = ioctlf(fp, DIOCGPARTINFO, (void *)&partp);
 		if (error != 0 && error1 != 0) {
 			error = error1;
 			goto out;
 		}
-		labp = error != 0 ? &label : partp.disklab;
-		start = error1 != 0 ? partp.part->p_offset : 0;
+		start = error1 != 0 ? partp.pi_offset : 0;
 		if (bip != NULL && bip->bi_head != 0 && bip->bi_sec != 0
 		&& bip->bi_cyl != 0) {
 			heads = bip->bi_head;
 			sectors = bip->bi_sec;
 			cylinders = bip->bi_cyl;
 			biostotal = heads * sectors * cylinders;
-			realtotal = labp->d_ntracks * labp->d_nsectors *
-			labp->d_ncylinders;
+			realtotal = label.d_ntracks * label.d_nsectors *
+			label.d_ncylinders;
 			if (realtotal > biostotal)
 cylinders = realtotal / (heads * sectors);
 		} else {
-			heads = labp->d_ntracks;
-			cylinders = labp->d_ncylinders;
-			sectors = labp->d_nsectors;
+			heads = label.d_ntracks;
+			cylinders = label.d_ncylinders;
+			sectors = label.d_nsectors;
 		}
 		if (com == LINUX_HDIO_GETGEO) {
 			hdg.start = start;



CVS commit: src/sys/compat/common

2015-12-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Dec  5 01:59:51 UTC 2015

Modified Files:
src/sys/compat/common: compat_mod.c

Log Message:
The COMPAT_10 code for SYSVxxx is now part of the sysv_ipc module, so
don't install syscall function pointers from the compat module.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/common/compat_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/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.22 src/sys/compat/common/compat_mod.c:1.23
--- src/sys/compat/common/compat_mod.c:1.22	Mon May 11 10:32:13 2015
+++ src/sys/compat/common/compat_mod.c	Sat Dec  5 01:59:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.22 2015/05/11 10:32:13 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.23 2015/12/05 01:59:51 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.22 2015/05/11 10:32:13 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.23 2015/12/05 01:59:51 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -124,18 +124,6 @@ static const struct syscall_package comp
 	{ SYS_compat_09_ouname, 0, (sy_call_t *)compat_09_sys_uname },
 #endif
 
-#if defined(COMPAT_10) && !defined(_LP64)
-# if defined(SYSVMSG)
-	{ SYS_compat_10_omsgsys, 0, (sy_call_t *)compat_10_sys_msgsys },
-# endif
-# if defined(SYSVSEM)
-	{ SYS_compat_10_osemsys, 0, (sy_call_t *)compat_10_sys_semsys },
-# endif
-# if defined(SYSVSHM)
-	{ SYS_compat_10_oshmsys, 0, (sy_call_t *)compat_10_sys_shmsys },
-# endif
-#endif	/* defined(COMPAT_10) && !defined(_LP64) */
-
 #if defined(COMPAT_12)
 	{ SYS_compat_12_fstat12, 0, (sy_call_t *)compat_12_sys_fstat },
 	{ SYS_compat_12_getdirentries, 0, (sy_call_t *)compat_12_sys_getdirentries },



CVS commit: src/sys/compat/linux32/common

2015-12-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec  3 23:51:24 UTC 2015

Modified Files:
src/sys/compat/linux32/common: linux32_mod.c

Log Message:
Update dependencies - compat_linux32 requires compat_netbsd32_sysvipc


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.6 src/sys/compat/linux32/common/linux32_mod.c:1.7
--- src/sys/compat/linux32/common/linux32_mod.c:1.6	Tue Jul 22 08:18:33 2014
+++ src/sys/compat/linux32/common/linux32_mod.c	Thu Dec  3 23:51:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_mod.c,v 1.6 2014/07/22 08:18:33 maxv Exp $	*/
+/*	$NetBSD: linux32_mod.c,v 1.7 2015/12/03 23:51:24 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.6 2014/07/22 08:18:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.7 2015/12/03 23:51:24 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_mod.
 #include 
 
 #if defined(EXEC_ELF32)
-# define	MD1	",exec_elf32,compat_netbsd32"
+# define	MD1	",exec_elf32,compat_netbsd32,compat_netbsd32_sysvipc"
 #else
 # define	MD1	""
 #endif



CVS commit: src/sys/compat/netbsd32

2015-12-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec  3 11:31:05 UTC 2015

Modified Files:
src/sys/compat/netbsd32: netbsd32_compat_14.c

Log Message:
Strange patch(1) behavior got me three copies of the code.  One is
sufficient so remove the excess.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/compat/netbsd32/netbsd32_compat_14.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_14.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_14.c:1.24 src/sys/compat/netbsd32/netbsd32_compat_14.c:1.25
--- src/sys/compat/netbsd32/netbsd32_compat_14.c:1.24	Thu Dec  3 11:28:35 2015
+++ src/sys/compat/netbsd32/netbsd32_compat_14.c	Thu Dec  3 11:31:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_14.c,v 1.24 2015/12/03 11:28:35 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_14.c,v 1.25 2015/12/03 11:31:05 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1999 Eduardo E. Horvath
@@ -29,17 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.24 2015/12/03 11:28:35 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_sysv.h"
-#include "opt_compat_netbsd.h"
-#endif
-
-#ifdef _KERNEL_OPT
-#include "opt_sysv.h"
-#include "opt_compat_netbsd.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.25 2015/12/03 11:31:05 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"



CVS commit: src/sys/compat/netbsd32

2015-12-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec  3 11:28:35 UTC 2015

Modified Files:
src/sys/compat/netbsd32: netbsd32_compat_14.c

Log Message:
If compiling as part of a built-in kernel module, make sure we include
the relevant opt_sysv.h file


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/netbsd32/netbsd32_compat_14.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_14.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_14.c:1.23 src/sys/compat/netbsd32/netbsd32_compat_14.c:1.24
--- src/sys/compat/netbsd32/netbsd32_compat_14.c:1.23	Thu Dec  3 11:25:45 2015
+++ src/sys/compat/netbsd32/netbsd32_compat_14.c	Thu Dec  3 11:28:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_14.c,v 1.23 2015/12/03 11:25:45 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_14.c,v 1.24 2015/12/03 11:28:35 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1999 Eduardo E. Horvath
@@ -29,7 +29,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.23 2015/12/03 11:25:45 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.24 2015/12/03 11:28:35 pgoyette Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_sysv.h"
+#include "opt_compat_netbsd.h"
+#endif
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"



CVS commit: src/sys/compat/netbsd32

2015-12-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec  3 11:25:45 UTC 2015

Modified Files:
src/sys/compat/netbsd32: files.netbsd32 netbsd32_compat_14.c

Log Message:
Missed these.

Only include the compat_14 sys calls if this being compiled as part of
the compat_netbsd32_sysvipc module.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/compat/netbsd32/files.netbsd32
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/netbsd32/netbsd32_compat_14.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/files.netbsd32
diff -u src/sys/compat/netbsd32/files.netbsd32:1.37 src/sys/compat/netbsd32/files.netbsd32:1.38
--- src/sys/compat/netbsd32/files.netbsd32:1.37	Tue Dec  1 23:38:34 2015
+++ src/sys/compat/netbsd32/files.netbsd32	Thu Dec  3 11:25:45 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.netbsd32,v 1.37 2015/12/01 23:38:34 pgoyette Exp $
+#	$NetBSD: files.netbsd32,v 1.38 2015/12/03 11:25:45 pgoyette Exp $
 #
 # config file description for machine-independent netbsd32 compat code.
 # included by ports that need it.
@@ -40,4 +40,6 @@ file	compat/netbsd32/netbsd32_compat_20.
 file	compat/netbsd32/netbsd32_compat_30.c	compat_netbsd32 & compat_30
 file	compat/netbsd32/netbsd32_compat_43.c	compat_netbsd32 & (compat_43 | compat_sunos | compat_linux32)
 file	compat/netbsd32/netbsd32_compat_50.c	compat_netbsd32 & compat_50
+file	compat/netbsd32/netbsd32_compat_50_sysv.c compat_netbsd32 & compat_50 &
+		(sysvmsg | sysvsem | sysvshm)
 file	compat/netbsd32/netbsd32_compat_60.c	compat_netbsd32 & compat_60

Index: src/sys/compat/netbsd32/netbsd32_compat_14.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_14.c:1.22 src/sys/compat/netbsd32/netbsd32_compat_14.c:1.23
--- src/sys/compat/netbsd32/netbsd32_compat_14.c:1.22	Thu Dec  3 10:38:21 2015
+++ src/sys/compat/netbsd32/netbsd32_compat_14.c	Thu Dec  3 11:25:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_14.c,v 1.22 2015/12/03 10:38:21 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_14.c,v 1.23 2015/12/03 11:25:45 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1999 Eduardo E. Horvath
@@ -29,7 +29,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.22 2015/12/03 10:38:21 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.23 2015/12/03 11:25:45 pgoyette Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_sysv.h"
+#include "opt_compat_netbsd.h"
+#endif
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"



CVS commit: src/sys/compat/netbsd32

2015-12-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec  3 10:39:50 UTC 2015

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

Log Message:
Regen syscall definitions - the compat_netbsd32 sysv-ipc stuff is now
modular and can be autoloaded when needed


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.120 -r1.121 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.11 -r1.12 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.121 src/sys/compat/netbsd32/netbsd32_syscall.h:1.122
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.121	Tue Dec  1 23:57:19 2015
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Thu Dec  3 10:39:50 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.121 2015/12/01 23:57:19 pgoyette Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.122 2015/12/03 10:39:50 pgoyette Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.111 2015/12/01 23:56:43 pgoyette Exp
+ * created from	NetBSD: syscalls.master,v 1.112 2015/12/03 10:38:21 pgoyette Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
@@ -468,27 +468,15 @@
 /* syscall: "netbsd32_sysarch" ret: "int" args: "int" "netbsd32_voidp" */
 #define	NETBSD32_SYS_netbsd32_sysarch	165
 
-#if defined(SYSVSEM) || !defined(_KERNEL_OPT)
 /* syscall: "compat_10_osemsys" ret: "int" args: "int" "int" "int" "int" "int" */
 #define	NETBSD32_SYS_compat_10_osemsys	169
 
-#else
-/* 169 is excluded netbsd32_semsys */
-#endif
-#if defined(SYSVMSG) || !defined(_KERNEL_OPT)
 /* syscall: "compat_10_omsgsys" ret: "int" args: "int" "int" "int" "int" "int" "int" */
 #define	NETBSD32_SYS_compat_10_omsgsys	170
 
-#else
-/* 170 is excluded netbsd32_msgsys */
-#endif
-#if defined(SYSVSHM) || !defined(_KERNEL_OPT)
 /* syscall: "compat_10_oshmsys" ret: "int" args: "int" "int" "int" "int" */
 #define	NETBSD32_SYS_compat_10_oshmsys	171
 
-#else
-/* 171 is excluded netbsd32_shmsys */
-#endif
 /* syscall: "netbsd32_pread" ret: "netbsd32_ssize_t" args: "int" "netbsd32_voidp" "netbsd32_size_t" "int" "netbsd32_off_t" */
 #define	NETBSD32_SYS_netbsd32_pread	173
 
@@ -582,7 +570,6 @@
 /* syscall: "netbsd32_poll" ret: "int" args: "netbsd32_pollfdp_t" "u_int" "int" */
 #define	NETBSD32_SYS_netbsd32_poll	209
 
-#if defined(SYSVSEM) || !defined(_KERNEL_OPT)
 /* syscall: "compat_14_netbsd32___semctl" ret: "int" args: "int" "int" "int" "netbsd32_semunu_t" */
 #define	NETBSD32_SYS_compat_14_netbsd32___semctl	220
 
@@ -595,13 +582,6 @@
 /* syscall: "netbsd32_semconfig" ret: "int" args: "int" */
 #define	NETBSD32_SYS_netbsd32_semconfig	223
 
-#else
-/* 220 is excluded compat_14_netbsd32_semctl */
-/* 221 is excluded netbsd32_semget */
-/* 222 is excluded netbsd32_semop */
-/* 223 is excluded netbsd32_semconfig */
-#endif
-#if defined(SYSVMSG) || !defined(_KERNEL_OPT)
 /* syscall: "compat_14_netbsd32_msgctl" ret: "int" args: "int" "int" "netbsd32_msqid_ds14p_t" */
 #define	NETBSD32_SYS_compat_14_netbsd32_msgctl	224
 
@@ -614,13 +594,6 @@
 /* syscall: "netbsd32_msgrcv" ret: "netbsd32_ssize_t" args: "int" "netbsd32_voidp" "netbsd32_size_t" "netbsd32_long" "int" */
 #define	NETBSD32_SYS_netbsd32_msgrcv	227
 
-#else
-/* 224 is excluded compat_14_netbsd32_msgctl */
-/* 225 is excluded netbsd32_msgget */
-/* 226 is excluded netbsd32_msgsnd */
-/* 227 is excluded netbsd32_msgrcv */
-#endif
-#if defined(SYSVSHM) || !defined(_KERNEL_OPT)
 /* syscall: "netbsd32_shmat" ret: "netbsd32_voidp" args: "int" "netbsd32_voidp" "int" */
 #define	NETBSD32_SYS_netbsd32_shmat	228
 
@@ -633,12 +606,6 @@
 /* syscall: "netbsd32_shmget" ret: "int" args: "netbsd32_key_t" "netbsd32_size_t" "int" */
 #define	NETBSD32_SYS_netbsd32_shmget	231
 
-#else
-/* 228 is excluded netbsd32_shmat */
-/* 229 is excluded compat_14_netbsd32_shmctl */
-/* 230 is excluded netbsd32_shmdt */
-/* 231 is excluded netbsd32_shmget */
-#endif
 /* syscall: "compat_50_netbsd32_clock_gettime" ret: "int" args: "netbsd32_clockid_t" "netbsd32_timespec50p_t" */
 #define	NETBSD32_SYS_compat_50_netbsd32_clock_gettime	232
 
@@ -837,27 +804,15 @@
 /* syscall: "compat_20_netbsd32_fhstatfs" ret: "int" args: "netbsd32_fhandlep_t" "netbsd32_stat50p_t" */
 #define	NETBSD32_SYS_compat_20_netbsd32_fhstatfs	300
 
-#if defined(SYSVSEM) || !defined(_KERNEL_OPT)
 /* syscall: "c

<    1   2   3   4   5   6   7   8   9   10   >