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

2018-01-01 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Jan  1 08:03:43 UTC 2018

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

Log Message:
Use the default %cs, and mask the other segregs.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/arch/amd64/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/amd64/linux_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_machdep.c:1.55 src/sys/compat/linux/arch/amd64/linux_machdep.c:1.56
--- src/sys/compat/linux/arch/amd64/linux_machdep.c:1.55	Sat Oct 21 07:24:26 2017
+++ src/sys/compat/linux/arch/amd64/linux_machdep.c	Mon Jan  1 08:03:43 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.55 2017/10/21 07:24:26 maxv Exp $ */
+/*	$NetBSD: linux_machdep.c,v 1.56 2018/01/01 08:03:43 maxv Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.55 2017/10/21 07:24:26 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.56 2018/01/01 08:03:43 maxv Exp $");
 
 #include 
 #include 
@@ -205,9 +205,9 @@ linux_sendsig(const ksiginfo_t *ksi, con
 	sigframe.uc.luc_mcontext.rsp = tf->tf_rsp;
 	sigframe.uc.luc_mcontext.rip = tf->tf_rip;
 	sigframe.uc.luc_mcontext.eflags = tf->tf_rflags;
-	sigframe.uc.luc_mcontext.cs = tf->tf_cs;
-	sigframe.uc.luc_mcontext.gs = tf->tf_gs;
-	sigframe.uc.luc_mcontext.fs = tf->tf_fs;
+	sigframe.uc.luc_mcontext.cs = GSEL(GUCODE_SEL, SEL_UPL);
+	sigframe.uc.luc_mcontext.gs = tf->tf_gs & 0x;
+	sigframe.uc.luc_mcontext.fs = tf->tf_fs & 0x;
 	sigframe.uc.luc_mcontext.err = tf->tf_err;
 	sigframe.uc.luc_mcontext.trapno = tf->tf_trapno;
 	native_to_linux_sigset(, mask);



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

2017-02-13 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Feb 13 15:03:18 UTC 2017

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

Log Message:
Make sure %rip is in userland. This is harmless, since the return to
userland is made with iret instead of sysret in this path. While here, use
size_t.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/compat/linux/arch/amd64/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/amd64/linux_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_machdep.c:1.50 src/sys/compat/linux/arch/amd64/linux_machdep.c:1.51
--- src/sys/compat/linux/arch/amd64/linux_machdep.c:1.50	Mon Feb 13 14:54:11 2017
+++ src/sys/compat/linux/arch/amd64/linux_machdep.c	Mon Feb 13 15:03:18 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.50 2017/02/13 14:54:11 maxv Exp $ */
+/*	$NetBSD: linux_machdep.c,v 1.51 2017/02/13 15:03:18 maxv Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.50 2017/02/13 14:54:11 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.51 2017/02/13 15:03:18 maxv Exp $");
 
 #include 
 #include 
@@ -457,7 +457,7 @@ linux_usertrap(struct lwp *l, vaddr_t tr
 {
 	struct trapframe *tf = arg;
 	uint64_t retaddr;
-	int vsyscallnr;
+	size_t vsyscallnr;
 
 	/*
 	 * Check for a vsyscall. %rip must be the fault address,
@@ -487,6 +487,8 @@ linux_usertrap(struct lwp *l, vaddr_t tr
 	 */
 	if (copyin((void *)tf->tf_rsp, , sizeof retaddr) != 0)
 		return 0;
+	if ((vaddr_t)retaddr >= VM_MAXUSER_ADDRESS)
+		return 0;
 	tf->tf_rip = retaddr;
 	tf->tf_rax = linux_vsyscall_to_syscall[vsyscallnr];
 	tf->tf_rsp += 8;	/* "pop" the return address */



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

2017-02-13 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Feb 13 14:54:11 UTC 2017

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

Log Message:
Don't let userland choose %rip. This is the Intel Sysret vulnerability
again.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/compat/linux/arch/amd64/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/amd64/linux_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_machdep.c:1.49 src/sys/compat/linux/arch/amd64/linux_machdep.c:1.50
--- src/sys/compat/linux/arch/amd64/linux_machdep.c:1.49	Sun Feb  5 08:42:49 2017
+++ src/sys/compat/linux/arch/amd64/linux_machdep.c	Mon Feb 13 14:54:11 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.49 2017/02/05 08:42:49 maxv Exp $ */
+/*	$NetBSD: linux_machdep.c,v 1.50 2017/02/13 14:54:11 maxv Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.49 2017/02/05 08:42:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.50 2017/02/13 14:54:11 maxv Exp $");
 
 #include 
 #include 
@@ -234,7 +234,12 @@ linux_sendsig(const ksiginfo_t *ksi, con
 	if (error != 0) {
 		sigexit(l, SIGILL);
 		return;
-	}	
+	}
+
+	if ((vaddr_t)catcher >= VM_MAXUSER_ADDRESS) {
+		sigexit(l, SIGILL);
+		return;
+	}
 
 	linux_buildcontext(l, catcher, sp);
 	tf->tf_rdi = sigframe.info.lsi_signo;



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

2017-02-05 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Feb  5 08:42:49 UTC 2017

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

Log Message:
Missing pmap_ldt_cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/compat/linux/arch/amd64/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/amd64/linux_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_machdep.c:1.48 src/sys/compat/linux/arch/amd64/linux_machdep.c:1.49
--- src/sys/compat/linux/arch/amd64/linux_machdep.c:1.48	Wed Feb 19 20:50:56 2014
+++ src/sys/compat/linux/arch/amd64/linux_machdep.c	Sun Feb  5 08:42:49 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.48 2014/02/19 20:50:56 dsl Exp $ */
+/*	$NetBSD: linux_machdep.c,v 1.49 2017/02/05 08:42:49 maxv Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.48 2014/02/19 20:50:56 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.49 2017/02/05 08:42:49 maxv Exp $");
 
 #include 
 #include 
@@ -84,6 +84,10 @@ linux_setregs(struct lwp *l, struct exec
 	struct pcb *pcb = lwp_getpcb(l);
 	struct trapframe *tf;
 
+#ifdef USER_LDT
+	pmap_ldt_cleanup(l);
+#endif
+
 	fpu_save_area_clear(l, __NetBSD_NPXCW__);
 	pcb->pcb_flags = 0;
 



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

2017-02-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  3 16:18:39 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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 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.10 -r1.11 \
src/sys/compat/linux/arch/amd64/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/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.66 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.67
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.66	Fri Feb  3 11:18:19 2017
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Fri Feb  3 11:18:38 2017
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.66 2017/02/03 16:18:19 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.67 2017/02/03 16:18:38 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.59 2017/02/02 15:35:46 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.60 2017/02/03 16:18:19 christos Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.66 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.67
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.66	Fri Feb  3 11:18:19 2017
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Fri Feb  3 11:18:38 2017
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.66 2017/02/03 16:18:19 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.67 2017/02/03 16:18:38 christos Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.59 2017/02/02 15:35:46 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.60 2017/02/03 16:18:19 christos Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.66 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.67
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.66	Fri Feb  3 11:18:19 2017
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Fri Feb  3 11:18:38 2017
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.66 2017/02/03 16:18:19 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.67 2017/02/03 16:18:38 christos Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.59 2017/02/02 15:35:46 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.60 2017/02/03 16:18:19 christos Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.66 2017/02/03 16:18:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.67 2017/02/03 16:18:38 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
Index: src/sys/compat/linux/arch/amd64/linux_sysent.c
diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.66 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.67
--- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.66	Fri Feb  3 11:18:19 2017
+++ src/sys/compat/linux/arch/amd64/linux_sysent.c	Fri Feb  3 11:18:39 2017
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.66 2017/02/03 16:18:19 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.67 2017/02/03 16:18:39 christos Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.59 2017/02/02 15:35:46 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.60 2017/02/03 16:18:19 christos Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.66 2017/02/03 16:18:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.67 2017/02/03 16:18:39 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"

Index: src/sys/compat/linux/arch/amd64/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.10 src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.11
--- src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.10	Fri Feb  3 11:18:19 2017
+++ src/sys/compat/linux/arch/amd64/linux_systrace_args.c	Fri Feb  3 11:18:39 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_systrace_args.c,v 1.10 2017/02/03 16:18:19 christos Exp $ */
+/* $NetBSD: linux_systrace_args.c,v 1.11 2017/02/03 16:18:39 christos Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.



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

2017-02-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  3 16:18:19 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
syscalls.master

Log Message:
add sendmmsg and recvmmsg


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 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.9 -r1.10 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/amd64/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/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.65 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.66
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.65	Thu Feb  2 10:36:12 2017
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Fri Feb  3 11:18:19 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.h,v 1.65 2017/02/02 15:36:12 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.66 2017/02/03 16:18:19 christos Exp $ */
 
 /*
  * System call numbers.
@@ -654,6 +654,12 @@
 /* syscall: "pipe2" ret: "int" args: "int *" "int" */
 #define	LINUX_SYS_pipe2	293
 
+/* syscall: "recvmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" "struct timespec *" */
+#define	LINUX_SYS_recvmmsg	299
+
+/* syscall: "sendmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" */
+#define	LINUX_SYS_sendmmsg	307
+
 /* syscall: "nosys" ret: "int" args: */
 #define	LINUX_SYS_nosys	314
 
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.65 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.66
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.65	Thu Feb  2 10:36:12 2017
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Fri Feb  3 11:18:19 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscallargs.h,v 1.65 2017/02/02 15:36:12 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.66 2017/02/03 16:18:19 christos Exp $ */
 
 /*
  * System call argument lists.
@@ -1025,6 +1025,23 @@ struct linux_sys_pipe2_args {
 };
 check_syscall_args(linux_sys_pipe2)
 
+struct linux_sys_recvmmsg_args {
+	syscallarg(int) s;
+	syscallarg(struct linux_mmsghdr *) msgvec;
+	syscallarg(unsigned int) vlen;
+	syscallarg(unsigned int) flags;
+	syscallarg(struct timespec *) timeout;
+};
+check_syscall_args(linux_sys_recvmmsg)
+
+struct linux_sys_sendmmsg_args {
+	syscallarg(int) s;
+	syscallarg(struct linux_mmsghdr *) msgvec;
+	syscallarg(unsigned int) vlen;
+	syscallarg(unsigned int) flags;
+};
+check_syscall_args(linux_sys_sendmmsg)
+
 /*
  * System call prototypes.
  */
@@ -1462,6 +1479,10 @@ 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_recvmmsg(struct lwp *, const struct linux_sys_recvmmsg_args *, register_t *);
+
+int	linux_sys_sendmmsg(struct lwp *, const struct linux_sys_sendmmsg_args *, register_t *);
+
 int	linux_sys_nosys(struct lwp *, const void *, register_t *);
 
 #endif /* _LINUX_SYS_SYSCALLARGS_H_ */
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.65 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.66
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.65	Thu Feb  2 10:36:12 2017
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Fri Feb  3 11:18:19 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscalls.c,v 1.65 2017/02/02 15:36:12 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.66 2017/02/03 16:18:19 christos Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.65 2017/02/02 15:36:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.66 2017/02/03 16:18:19 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -365,7 +365,7 @@ const char *const linux_syscallnames[] =
 	/* 296 */	"#296 (unimplemented pwritev)",
 	/* 297 */	"#297 (unimplemented rt_tgsigqueueinfo)",
 	/* 298 */	"#298 (unimplemented perf_counter_open)",
-	/* 299 */	"#299 (unimplemented recvmmsg)",
+	/* 299 */	"recvmmsg",
 	/* 300 */	"#300 (unimplemented fanotify_init)",
 	/* 301 */	"#301 (unimplemented fanotify_mark)",
 	/* 302 */	"#302 (unimplemented prlimit64)",
@@ -373,7 +373,7 @@ const char *const linux_syscallnames[] =
 	/* 304 */	"#304 (unimplemented open_by_handle_at)",
 	/* 305 */	"#305 (unimplemented clock_adjtime)",
 	/* 306 */	"#306 (unimplemented syncfs)",
-	/* 307 */	"#307 (unimplemented sendmmsg)",
+	/* 307 */	"sendmmsg",

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

2015-10-27 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Oct 27 07:16:00 UTC 2015

Modified Files:
src/sys/compat/linux/arch/amd64: 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.58 -r1.59 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.3 -r1.4 \
src/sys/compat/linux/arch/amd64/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/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.58 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.59
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.58	Thu Sep 24 14:42:45 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Tue Oct 27 07:16:00 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.58 2015/09/24 14:42:45 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.59 2015/10/27 07:16:00 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -333,10 +333,10 @@
 /* syscall: "getgid" ret: "gid_t" args: */
 #define	LINUX_SYS_getgid	104
 
-/* syscall: "setuid" ret: "void" args: "uid_t" */
+/* syscall: "setuid" ret: "int" args: "uid_t" */
 #define	LINUX_SYS_setuid	105
 
-/* syscall: "setgid" ret: "void" args: "gid_t" */
+/* syscall: "setgid" ret: "int" args: "gid_t" */
 #define	LINUX_SYS_setgid	106
 
 /* syscall: "geteuid" ret: "uid_t" args: */
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.58 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.59
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.58	Thu Sep 24 14:42:45 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Tue Oct 27 07:16:00 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.58 2015/09/24 14:42:45 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.59 2015/10/27 07:16:00 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.58 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.59
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.58	Thu Sep 24 14:42:45 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Tue Oct 27 07:16:00 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.58 2015/09/24 14:42:45 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.59 2015/10/27 07:16:00 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.58 2015/09/24 14:42:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.59 2015/10/27 07:16:00 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
Index: src/sys/compat/linux/arch/amd64/linux_sysent.c
diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.58 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.59
--- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.58	Thu Sep 24 14:42:45 2015
+++ src/sys/compat/linux/arch/amd64/linux_sysent.c	Tue Oct 27 07:16:00 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.58 2015/09/24 14:42:45 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.59 2015/10/27 07:16:00 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.58 2015/09/24 14:42:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.59 2015/10/27 07:16:00 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"

Index: src/sys/compat/linux/arch/amd64/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.3 src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.4
--- src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.3	Thu Sep 24 

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

2015-10-27 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Oct 27 07:15:38 UTC 2015

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

Log Message:
Fix setuid/setgid return type (void -> int) to match native.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/arch/amd64/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.55 src/sys/compat/linux/arch/amd64/syscalls.master:1.56
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.55	Sun May 31 10:49:27 2015
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Tue Oct 27 07:15:38 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp $
+	$NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -259,8 +259,8 @@
 102	NOARGS		{ uid_t|sys||getuid(void); }
 103	UNIMPL		syslog
 104	NOARGS		{ gid_t|sys||getgid(void); }
-105	NOARGS		{ void|sys||setuid(uid_t uid); }
-106	NOARGS		{ void|sys||setgid(gid_t gid); }
+105	NOARGS		{ int|sys||setuid(uid_t uid); }
+106	NOARGS		{ int|sys||setgid(gid_t gid); }
 107	NOARGS		{ uid_t|sys||geteuid(void); }
 108	NOARGS		{ gid_t|sys||getegid(void); }
 109	NOARGS		{ int|sys||setpgid(int pid, int pgid); }



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

2015-05-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun May 31 10:50:04 UTC 2015

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

Log Message:
Regen for write(2) size argument fix.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 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.1 -r1.2 \
src/sys/compat/linux/arch/amd64/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/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.56 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.57
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.56	Sat Mar  7 16:41:53 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Sun May 31 10:50:04 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.56 2015/03/07 16:41:53 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.57 2015/05/31 10:50:04 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -15,7 +15,7 @@
 /* syscall: read ret: ssize_t args: int void * size_t */
 #define	LINUX_SYS_read	0
 
-/* syscall: write ret: ssize_t args: int const void * int */
+/* syscall: write ret: ssize_t args: int const void * size_t */
 #define	LINUX_SYS_write	1
 
 /* syscall: open ret: int args: const char * int linux_umode_t */
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.56 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.57
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.56	Sat Mar  7 16:41:53 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Sun May 31 10:50:04 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.56 2015/03/07 16:41:53 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.57 2015/05/31 10:50:04 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.56 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.57
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.56	Sat Mar  7 16:41:53 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Sun May 31 10:50:04 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.56 2015/03/07 16:41:53 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.57 2015/05/31 10:50:04 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_syscalls.c,v 1.56 2015/03/07 16:41:53 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_syscalls.c,v 1.57 2015/05/31 10:50:04 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
Index: src/sys/compat/linux/arch/amd64/linux_sysent.c
diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.56 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.57
--- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.56	Sat Mar  7 16:41:53 2015
+++ src/sys/compat/linux/arch/amd64/linux_sysent.c	Sun May 31 10:50:04 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.56 2015/03/07 16:41:53 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.57 2015/05/31 10:50:04 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.56 2015/03/07 16:41:53 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.57 2015/05/31 10:50:04 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -36,1070 +36,1928 @@ __KERNEL_RCSID(0, $NetBSD: linux_sysent
 
 #define	s(type)	sizeof(type)
 #define	n(type)	(sizeof(type)/sizeof (register_t))
-#define	ns(type)	n(type), s(type)
+#define	ns(type)	.sy_narg = n(type), .sy_argsize = s(type)
 
 struct sysent linux_sysent[] = {
-	{ 

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

2015-05-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun May 31 10:49:28 UTC 2015

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

Log Message:
Fix write(2) size argument (int - size_t).


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/compat/linux/arch/amd64/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.54 src/sys/compat/linux/arch/amd64/syscalls.master:1.55
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.54	Sat Mar  7 03:25:19 2015
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sun May 31 10:49:27 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp $
+	$NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -66,7 +66,7 @@
 
 0	NOARGS		{ ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
 1	NOARGS		{ ssize_t|sys||write(int fd, const void *buf, \
-			int nbyte); }
+			size_t nbyte); }
 2	STD		{ int|linux_sys||open(const char *path, int flags, \
 			linux_umode_t mode); }
 3	NOARGS		{ int|sys||close(int fd); }



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

2015-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 03:25:19 UTC 2015

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

Log Message:
fix inconsistent names


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/compat/linux/arch/amd64/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.53 src/sys/compat/linux/arch/amd64/syscalls.master:1.54
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.53	Sat Nov 22 08:18:45 2014
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Fri Mar  6 22:25:19 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.53 2014/11/22 13:18:45 njoly Exp $
+	$NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -234,8 +234,8 @@
 85	STD		{ int|linux_sys||creat(const char *path, linux_umode_t mode); }
 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 *to); }
-89	NOARGS		{ int|sys||readlink(const char *name, char *buf, \
+88	NOARGS		{ int|sys||symlink(const char *path, const char *link); }
+89	NOARGS		{ int|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); }



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

2014-02-23 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Feb 23 12:01:51 UTC 2014

Modified Files:
src/sys/compat/linux/arch/amd64: linux_exec_machdep.c

Log Message:
Use cprng_strong32 for LINUX_AT_RANDOM on amd64 too.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 \
src/sys/compat/linux/arch/amd64/linux_exec_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/amd64/linux_exec_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_exec_machdep.c:1.21 src/sys/compat/linux/arch/amd64/linux_exec_machdep.c:1.22
--- src/sys/compat/linux/arch/amd64/linux_exec_machdep.c:1.21	Fri Feb 21 07:53:53 2014
+++ src/sys/compat/linux/arch/amd64/linux_exec_machdep.c	Sun Feb 23 12:01:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_exec_machdep.c,v 1.21 2014/02/21 07:53:53 maxv Exp $ */
+/*	$NetBSD: linux_exec_machdep.c,v 1.22 2014/02/23 12:01:51 njoly Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_exec_machdep.c,v 1.21 2014/02/21 07:53:53 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_exec_machdep.c,v 1.22 2014/02/23 12:01:51 njoly Exp $);
 
 #define ELFSIZE 64
 
@@ -49,6 +49,7 @@ __KERNEL_RCSID(0, $NetBSD: linux_exec_m
 #include sys/exec.h
 #include sys/stat.h
 #include sys/kauth.h
+#include sys/cprng.h
 
 #include sys/cpu.h
 #include machine/vmparam.h
@@ -225,10 +226,10 @@ ELFNAME2(linux,copyargs)(struct lwp *l, 
 
 	esd.ai[i].a_type = LINUX_AT_RANDOM;
 	esd.ai[i++].a_v = (Elf_Addr)esdp-randbytes[0];
-	esd.randbytes[0] = random();
-	esd.randbytes[1] = random();
-	esd.randbytes[2] = random();
-	esd.randbytes[3] = random();
+	esd.randbytes[0] = cprng_strong32();
+	esd.randbytes[1] = cprng_strong32();
+	esd.randbytes[2] = cprng_strong32();
+	esd.randbytes[3] = cprng_strong32();
 
 	esd.ai[i].a_type = AT_NULL;
 	esd.ai[i++].a_v = 0;



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

2014-02-19 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Feb 19 20:50:56 UTC 2014

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

Log Message:
Don't rely on pcb.h including x86/include/sysarch.h


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/compat/linux/arch/amd64/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/amd64/linux_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_machdep.c:1.47 src/sys/compat/linux/arch/amd64/linux_machdep.c:1.48
--- src/sys/compat/linux/arch/amd64/linux_machdep.c:1.47	Sat Feb 15 10:11:15 2014
+++ src/sys/compat/linux/arch/amd64/linux_machdep.c	Wed Feb 19 20:50:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.47 2014/02/15 10:11:15 dsl Exp $ */
+/*	$NetBSD: linux_machdep.c,v 1.48 2014/02/19 20:50:56 dsl Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: linux_machdep.c,v 1.47 2014/02/15 10:11:15 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_machdep.c,v 1.48 2014/02/19 20:50:56 dsl Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -51,6 +51,7 @@ __KERNEL_RCSID(0, $NetBSD: linux_machde
 #include machine/specialreg.h
 #include machine/vmparam.h
 #include machine/cpufunc.h
+#include x86/include/sysarch.h
 
 /* 
  * To see whether wscons is configured (for virtual console ioctl calls).



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

2013-11-17 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Nov 18 01:32:32 UTC 2013

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

Log Message:
initialize %ds to something valid to help ptrace().


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/linux/arch/amd64/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/amd64/linux_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_machdep.c:1.41 src/sys/compat/linux/arch/amd64/linux_machdep.c:1.42
--- src/sys/compat/linux/arch/amd64/linux_machdep.c:1.41	Wed Oct 23 20:18:51 2013
+++ src/sys/compat/linux/arch/amd64/linux_machdep.c	Mon Nov 18 01:32:32 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.41 2013/10/23 20:18:51 drochner Exp $ */
+/*	$NetBSD: linux_machdep.c,v 1.42 2013/11/18 01:32:32 chs Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: linux_machdep.c,v 1.41 2013/10/23 20:18:51 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_machdep.c,v 1.42 2013/11/18 01:32:32 chs Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -116,7 +116,7 @@ linux_setregs(struct lwp *l, struct exec
 	tf-tf_rflags = PSL_USERSET;
 	tf-tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
 	tf-tf_ss = GSEL(GUDATA_SEL, SEL_UPL);
-	tf-tf_ds = 0;
+	tf-tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
 	tf-tf_es = 0;
 	cpu_fsgs_zero(l);
 



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

2011-07-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jul  9 23:46:32 UTC 2011

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

Log Message:
revert accidental commit from unrelated change. no custom linux fork.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/compat/linux/arch/amd64/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.38 src/sys/compat/linux/arch/amd64/syscalls.master:1.39
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.38	Sat Jul  9 10:49:40 2011
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sat Jul  9 19:46:32 2011
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.38 2011/07/09 14:49:40 christos Exp $
+	$NetBSD: syscalls.master,v 1.39 2011/07/09 23:46:32 christos Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -174,7 +174,7 @@
 			int optname, void *optval, int *optlen); }
 56	STD		{ int|linux_sys||clone(int flags, void *stack, \
 			void *parent_tidptr, void *child_tidptr, void *tls); }
-57	STD		{ int|linux_sys||fork(void); }
+57	NOARGS		{ int|sys||fork(void); }
 58	NOARGS		{ int|sys|14|vfork(void); }
 59	NOARGS		{ int|sys||execve(const char *path, char **argp, \
 			char **envp); }



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

2010-02-09 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Feb  9 16:46:07 UTC 2010

Modified Files:
src/sys/compat/linux/arch/amd64: linux_exec_machdep.c

Log Message:
Small typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/sys/compat/linux/arch/amd64/linux_exec_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/amd64/linux_exec_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_exec_machdep.c:1.16 src/sys/compat/linux/arch/amd64/linux_exec_machdep.c:1.17
--- src/sys/compat/linux/arch/amd64/linux_exec_machdep.c:1.16	Sun Mar 29 01:02:50 2009
+++ src/sys/compat/linux/arch/amd64/linux_exec_machdep.c	Tue Feb  9 16:46:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_exec_machdep.c,v 1.16 2009/03/29 01:02:50 mrg Exp $ */
+/*	$NetBSD: linux_exec_machdep.c,v 1.17 2010/02/09 16:46:07 njoly Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_exec_machdep.c,v 1.16 2009/03/29 01:02:50 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_exec_machdep.c,v 1.17 2010/02/09 16:46:07 njoly Exp $);
 
 #ifdef __amd64__
 #define ELFSIZE 64
@@ -152,7 +152,7 @@
 	eh = (Elf_Ehdr *)pack-ep_hdr;
 
 	/*
-	 * We forgot this, so we ned to reload it now. XXX keep track of it?
+	 * We forgot this, so we need to reload it now. XXX keep track of it?
 	 */
 	if (ap == NULL) {
 		phsize = eh-e_phnum * sizeof(Elf_Phdr);



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

2009-10-30 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Oct 30 10:57:41 UTC 2009

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

Log Message:
stat64 syscalls require struct linux_stat64.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/linux/arch/amd64/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.32 src/sys/compat/linux/arch/amd64/syscalls.master:1.33
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.32	Wed Jun 17 14:18:51 2009
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Fri Oct 30 10:57:40 2009
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.32 2009/06/17 14:18:51 njoly Exp $
+	$NetBSD: syscalls.master,v 1.33 2009/10/30 10:57:40 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -70,11 +70,11 @@
 			int mode); }
 3	NOARGS		{ int|sys||close(int fd); }
 4	STD		{ int|linux_sys||stat64(const char *path, \
-			struct linux_stat *sp); }
+			struct linux_stat64 *sp); }
 5	STD		{ int|linux_sys||fstat64(int fd, \
-			struct linux_stat *sp); }
+			struct linux_stat64 *sp); }
 6	STD		{ int|linux_sys||lstat64(const char *path, \
-			struct linux_stat *sp); }
+			struct linux_stat64 *sp); }
 7	NOARGS		{ int|sys||poll(struct pollfd *fds, u_int nfds, \
 			int timeout); }
 8	NOARGS		{ long|compat_43_sys||lseek(int fd, long offset, \



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

2009-05-27 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed May 27 12:20:37 UTC 2009

Modified Files:
src/sys/compat/linux/arch/amd64: linux_siginfo.h

Log Message:
Use correct linux_clock_t type for _stime, not native clock_t.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/amd64/linux_siginfo.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/amd64/linux_siginfo.h
diff -u src/sys/compat/linux/arch/amd64/linux_siginfo.h:1.4 src/sys/compat/linux/arch/amd64/linux_siginfo.h:1.5
--- src/sys/compat/linux/arch/amd64/linux_siginfo.h:1.4	Sun Nov 23 23:48:48 2008
+++ src/sys/compat/linux/arch/amd64/linux_siginfo.h	Wed May 27 12:20:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_siginfo.h,v 1.4 2008/11/23 23:48:48 njoly Exp $ */
+/*	$NetBSD: linux_siginfo.h,v 1.5 2009/05/27 12:20:37 njoly Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -69,7 +69,7 @@
 			linux_uid_t _uid;
 			int _status;
 			linux_clock_t _utime;
-			clock_t _stime;
+			linux_clock_t _stime;
 		} _sigchld;
 
 		struct {