Module Name:    src
Committed By:   jdolecek
Date:           Sat Nov  9 23:45:08 UTC 2019

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
        src/sys/compat/linux32/arch/amd64: linux32_syscall.h
            linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
            linux32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/compat/linux/arch/alpha/linux_syscall.h \
    src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.107 -r1.108 \
    src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.109 -r1.110 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.69 -r1.70 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.13 -r1.14 \
    src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.80 -r1.81 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.13 -r1.14 \
    src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.114 -r1.115 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.115 -r1.116 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.9 -r1.10 \
    src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.106 -r1.107 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.105 -r1.106 \
    src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.78 -r1.79 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.77 -r1.78 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.84 -r1.85 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
    src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.83 -r1.84 \
    src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
    src/sys/compat/linux/arch/powerpc/linux_syscalls.c
cvs rdiff -u -r1.79 -r1.80 \
    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.6 -r1.7 \
    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/linux/arch/alpha/linux_syscall.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.108 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.109
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.108	Sun Mar 24 16:39:46 2019
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Sat Nov  9 23:45:07 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.108 2019/03/24 16:39:46 maxv Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.109 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.94 2017/02/03 16:17:08 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.96 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -702,6 +702,9 @@
 /* syscall: "recvmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" "struct timespec *" */
 #define	LINUX_SYS_recvmmsg	479
 
+/* syscall: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */
+#define	LINUX_SYS_fallocate	480
+
 /* syscall: "dup3" ret: "int" args: "int" "int" "int" */
 #define	LINUX_SYS_dup3	487
 
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.108 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.109
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.108	Sun Mar 24 16:39:46 2019
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Sat Nov  9 23:45:07 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.108 2019/03/24 16:39:46 maxv Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.109 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.94 2017/02/03 16:17:08 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.96 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.108 2019/03/24 16:39:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.109 2019/11/09 23:45:07 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"
@@ -1904,8 +1904,10 @@ struct sysent linux_sysent[] = {
 		.sy_call = (sy_call_t *)linux_sys_recvmmsg
 	},		/* 479 = recvmmsg */
 	{
-		.sy_call = linux_sys_nosys,
-	},		/* 480 = filler */
+		ns(struct linux_sys_fallocate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(2) | SYCALL_ARG3_64 | SYCALL_ARG2_64,
+		.sy_call = (sy_call_t *)linux_sys_fallocate
+	},		/* 480 = fallocate */
 	{
 		.sy_call = linux_sys_nosys,
 	},		/* 481 = filler */

Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.107 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.108
--- src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.107	Sun Mar 24 16:39:46 2019
+++ src/sys/compat/linux/arch/alpha/linux_syscallargs.h	Sat Nov  9 23:45:07 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.107 2019/03/24 16:39:46 maxv Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.108 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.94 2017/02/03 16:17:08 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.96 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -1126,6 +1126,14 @@ struct linux_sys_recvmmsg_args {
 };
 check_syscall_args(linux_sys_recvmmsg)
 
+struct linux_sys_fallocate_args {
+	syscallarg(int) fd;
+	syscallarg(int) mode;
+	syscallarg(off_t) offset;
+	syscallarg(off_t) len;
+};
+check_syscall_args(linux_sys_fallocate)
+
 struct linux_sys_dup3_args {
 	syscallarg(int) from;
 	syscallarg(int) to;
@@ -1623,6 +1631,8 @@ int	linux_sys_utimensat(struct lwp *, co
 
 int	linux_sys_recvmmsg(struct lwp *, const struct linux_sys_recvmmsg_args *, register_t *);
 
+int	linux_sys_fallocate(struct lwp *, const struct linux_sys_fallocate_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/alpha/linux_syscalls.c
diff -u src/sys/compat/linux/arch/alpha/linux_syscalls.c:1.109 src/sys/compat/linux/arch/alpha/linux_syscalls.c:1.110
--- src/sys/compat/linux/arch/alpha/linux_syscalls.c:1.109	Sun Mar 24 16:39:47 2019
+++ src/sys/compat/linux/arch/alpha/linux_syscalls.c	Sat Nov  9 23:45:07 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.109 2019/03/24 16:39:47 maxv Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.110 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.94 2017/02/03 16:17:08 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.96 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.109 2019/03/24 16:39:47 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.110 2019/11/09 23:45:07 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -539,7 +539,7 @@ const char *const linux_syscallnames[] =
 	/* 477 */	"#477 (unimplemented timerfd)",
 	/* 478 */	"#478 (unimplemented eventfd)",
 	/* 479 */	"recvmmsg",
-	/* 480 */	"#480 (unimplemented fallocate)",
+	/* 480 */	"fallocate",
 	/* 481 */	"#481 (unimplemented timerfd_create)",
 	/* 482 */	"#482 (unimplemented timerfd_settime)",
 	/* 483 */	"#483 (unimplemented timerfd_gettime)",
@@ -1080,7 +1080,7 @@ const char *const altlinux_syscallnames[
 	/* 477 */	NULL, /* unimplemented timerfd */
 	/* 478 */	NULL, /* unimplemented eventfd */
 	/* 479 */	NULL, /* recvmmsg */
-	/* 480 */	NULL, /* unimplemented fallocate */
+	/* 480 */	NULL, /* fallocate */
 	/* 481 */	NULL, /* unimplemented timerfd_create */
 	/* 482 */	NULL, /* unimplemented timerfd_settime */
 	/* 483 */	NULL, /* unimplemented timerfd_gettime */

Index: src/sys/compat/linux/arch/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.69 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.70
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.69	Fri Aug 10 21:47:14 2018
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Sat Nov  9 23:45:07 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.69 2018/08/10 21:47:14 pgoyette Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.70 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.60 2017/02/03 16:18:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.61 2019/11/09 23:44:31 jdolecek 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: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */
+#define	LINUX_SYS_fallocate	285
+
 /* syscall: "accept4" ret: "int" args: "int" "struct osockaddr *" "int *" "int" */
 #define	LINUX_SYS_accept4	288
 
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.69 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.70
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.69	Fri Aug 10 21:47:14 2018
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Sat Nov  9 23:45:07 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.69 2018/08/10 21:47:14 pgoyette Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.70 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.60 2017/02/03 16:18:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.61 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -1007,6 +1007,14 @@ struct linux_sys_utimensat_args {
 };
 check_syscall_args(linux_sys_utimensat)
 
+struct linux_sys_fallocate_args {
+	syscallarg(int) fd;
+	syscallarg(int) mode;
+	syscallarg(off_t) offset;
+	syscallarg(off_t) len;
+};
+check_syscall_args(linux_sys_fallocate)
+
 struct linux_sys_accept4_args {
 	syscallarg(int) s;
 	syscallarg(struct osockaddr *) name;
@@ -1476,6 +1484,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_fallocate(struct lwp *, const struct linux_sys_fallocate_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 *);
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.69 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.70
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.69	Fri Aug 10 21:47:14 2018
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Sat Nov  9 23:45:07 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.69 2018/08/10 21:47:14 pgoyette Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.70 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.60 2017/02/03 16:18:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.61 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.69 2018/08/10 21:47:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.70 2019/11/09 23:45:07 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -351,7 +351,7 @@ const char *const linux_syscallnames[] =
 	/* 282 */	"#282 (unimplemented signalfd)",
 	/* 283 */	"#283 (unimplemented timerfd_create)",
 	/* 284 */	"#284 (unimplemented eventfd)",
-	/* 285 */	"#285 (unimplemented fallocate)",
+	/* 285 */	"fallocate",
 	/* 286 */	"#286 (unimplemented timerfd_settime)",
 	/* 287 */	"#287 (unimplemented timerfd_gettime)",
 	/* 288 */	"accept4",
@@ -895,7 +895,7 @@ const char *const altlinux_syscallnames[
 	/* 282 */	NULL, /* unimplemented signalfd */
 	/* 283 */	NULL, /* unimplemented timerfd_create */
 	/* 284 */	NULL, /* unimplemented eventfd */
-	/* 285 */	NULL, /* unimplemented fallocate */
+	/* 285 */	NULL, /* fallocate */
 	/* 286 */	NULL, /* unimplemented timerfd_settime */
 	/* 287 */	NULL, /* unimplemented timerfd_gettime */
 	/* 288 */	NULL, /* accept4 */
Index: src/sys/compat/linux/arch/amd64/linux_sysent.c
diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.69 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.70
--- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.69	Fri Aug 10 21:47:14 2018
+++ src/sys/compat/linux/arch/amd64/linux_sysent.c	Sat Nov  9 23:45:07 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.69 2018/08/10 21:47:14 pgoyette Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.70 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.60 2017/02/03 16:18:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.61 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.69 2018/08/10 21:47:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.70 2019/11/09 23:45:07 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"
@@ -1279,8 +1279,10 @@ struct sysent linux_sysent[] = {
 		.sy_call = linux_sys_nosys,
 	},		/* 284 = filler */
 	{
-		.sy_call = linux_sys_nosys,
-	},		/* 285 = filler */
+		ns(struct linux_sys_fallocate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(2) | SYCALL_ARG3_64 | SYCALL_ARG2_64,
+		.sy_call = (sy_call_t *)linux_sys_fallocate
+	},		/* 285 = fallocate */
 	{
 		.sy_call = linux_sys_nosys,
 	},		/* 286 = filler */

Index: src/sys/compat/linux/arch/amd64/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.13 src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.14
--- src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.13	Fri Aug 10 21:47:14 2018
+++ src/sys/compat/linux/arch/amd64/linux_systrace_args.c	Sat Nov  9 23:45:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_systrace_args.c,v 1.13 2018/08/10 21:47:14 pgoyette Exp $ */
+/* $NetBSD: linux_systrace_args.c,v 1.14 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.
@@ -1743,6 +1743,16 @@ systrace_args(register_t sysnum, const v
 		*n_args = 4;
 		break;
 	}
+	/* linux_sys_fallocate */
+	case 285: {
+		const struct linux_sys_fallocate_args *p = params;
+		iarg[0] = SCARG(p, fd); /* int */
+		iarg[1] = SCARG(p, mode); /* int */
+		iarg[2] = SCARG(p, offset); /* off_t */
+		iarg[3] = SCARG(p, len); /* off_t */
+		*n_args = 4;
+		break;
+	}
 	/* linux_sys_accept4 */
 	case 288: {
 		const struct linux_sys_accept4_args *p = params;
@@ -4687,6 +4697,25 @@ systrace_entry_setargdesc(int sysnum, in
 			break;
 		};
 		break;
+	/* linux_sys_fallocate */
+	case 285:
+		switch(ndx) {
+		case 0:
+			p = "int";
+			break;
+		case 1:
+			p = "int";
+			break;
+		case 2:
+			p = "off_t";
+			break;
+		case 3:
+			p = "off_t";
+			break;
+		default:
+			break;
+		};
+		break;
 	/* linux_sys_accept4 */
 	case 288:
 		switch(ndx) {
@@ -5787,6 +5816,11 @@ systrace_return_setargdesc(int sysnum, i
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* linux_sys_fallocate */
+	case 285:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	/* linux_sys_accept4 */
 	case 288:
 		if (ndx == 0 || ndx == 1)

Index: src/sys/compat/linux/arch/arm/linux_syscall.h
diff -u src/sys/compat/linux/arch/arm/linux_syscall.h:1.80 src/sys/compat/linux/arch/arm/linux_syscall.h:1.81
--- src/sys/compat/linux/arch/arm/linux_syscall.h:1.80	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/arm/linux_syscall.h	Sat Nov  9 23:45:07 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.80 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.81 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.67 2017/02/03 16:28:34 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.68 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -703,6 +703,9 @@
 /* syscall: "utimensat" ret: "int" args: "int" "const char *" "struct linux_timespec *" "int" */
 #define	LINUX_SYS_utimensat	348
 
+/* syscall: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */
+#define	LINUX_SYS_fallocate	352
+
 /* syscall: "dup3" ret: "int" args: "int" "int" "int" */
 #define	LINUX_SYS_dup3	358
 
Index: src/sys/compat/linux/arch/arm/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.80 src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.81
--- src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.80	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/arm/linux_syscallargs.h	Sat Nov  9 23:45:07 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.80 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.81 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.67 2017/02/03 16:28:34 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.68 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -1081,6 +1081,14 @@ struct linux_sys_utimensat_args {
 };
 check_syscall_args(linux_sys_utimensat)
 
+struct linux_sys_fallocate_args {
+	syscallarg(int) fd;
+	syscallarg(int) mode;
+	syscallarg(off_t) offset;
+	syscallarg(off_t) len;
+};
+check_syscall_args(linux_sys_fallocate)
+
 struct linux_sys_dup3_args {
 	syscallarg(int) from;
 	syscallarg(int) to;
@@ -1573,6 +1581,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_fallocate(struct lwp *, const struct linux_sys_fallocate_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/arm/linux_syscalls.c
diff -u src/sys/compat/linux/arch/arm/linux_syscalls.c:1.80 src/sys/compat/linux/arch/arm/linux_syscalls.c:1.81
--- src/sys/compat/linux/arch/arm/linux_syscalls.c:1.80	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/arm/linux_syscalls.c	Sat Nov  9 23:45:07 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.80 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.81 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.67 2017/02/03 16:28:34 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.68 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.80 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.81 2019/11/09 23:45:07 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include <sys/param.h>
@@ -387,7 +387,7 @@ const char *const linux_syscallnames[] =
 	/* 349 */	"#349 (unimplemented signalfd)",
 	/* 350 */	"#350 (unimplemented timerfd_create)",
 	/* 351 */	"#351 (unimplemented eventfd)",
-	/* 352 */	"#352 (unimplemented fallocate)",
+	/* 352 */	"fallocate",
 	/* 353 */	"#353 (unimplemented timerfd_settime)",
 	/* 354 */	"#354 (unimplemented timerfd_gettime)",
 	/* 355 */	"#355 (unimplemented signalfd4)",
@@ -909,7 +909,7 @@ const char *const altlinux_syscallnames[
 	/* 349 */	NULL, /* unimplemented signalfd */
 	/* 350 */	NULL, /* unimplemented timerfd_create */
 	/* 351 */	NULL, /* unimplemented eventfd */
-	/* 352 */	NULL, /* unimplemented fallocate */
+	/* 352 */	NULL, /* fallocate */
 	/* 353 */	NULL, /* unimplemented timerfd_settime */
 	/* 354 */	NULL, /* unimplemented timerfd_gettime */
 	/* 355 */	NULL, /* unimplemented signalfd4 */
Index: src/sys/compat/linux/arch/arm/linux_sysent.c
diff -u src/sys/compat/linux/arch/arm/linux_sysent.c:1.80 src/sys/compat/linux/arch/arm/linux_sysent.c:1.81
--- src/sys/compat/linux/arch/arm/linux_sysent.c:1.80	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/arm/linux_sysent.c	Sat Nov  9 23:45:07 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.80 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.81 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.67 2017/02/03 16:28:34 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.68 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.80 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.81 2019/11/09 23:45:07 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/poll.h>
@@ -1452,8 +1452,10 @@ struct sysent linux_sysent[] = {
 		.sy_call = linux_sys_nosys,
 	},		/* 351 = filler */
 	{
-		.sy_call = linux_sys_nosys,
-	},		/* 352 = filler */
+		ns(struct linux_sys_fallocate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(2) | SYCALL_ARG3_64 | SYCALL_ARG2_64,
+		.sy_call = (sy_call_t *)linux_sys_fallocate
+	},		/* 352 = fallocate */
 	{
 		.sy_call = linux_sys_nosys,
 	},		/* 353 = filler */

Index: src/sys/compat/linux/arch/arm/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.13 src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.14
--- src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.13	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/arm/linux_systrace_args.c	Sat Nov  9 23:45:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_systrace_args.c,v 1.13 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_systrace_args.c,v 1.14 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.
@@ -1842,6 +1842,16 @@ systrace_args(register_t sysnum, const v
 		*n_args = 4;
 		break;
 	}
+	/* linux_sys_fallocate */
+	case 352: {
+		const struct linux_sys_fallocate_args *p = params;
+		iarg[0] = SCARG(p, fd); /* int */
+		iarg[1] = SCARG(p, mode); /* int */
+		iarg[2] = SCARG(p, offset); /* off_t */
+		iarg[3] = SCARG(p, len); /* off_t */
+		*n_args = 4;
+		break;
+	}
 	/* linux_sys_dup3 */
 	case 358: {
 		const struct linux_sys_dup3_args *p = params;
@@ -4907,6 +4917,25 @@ systrace_entry_setargdesc(int sysnum, in
 			break;
 		};
 		break;
+	/* linux_sys_fallocate */
+	case 352:
+		switch(ndx) {
+		case 0:
+			p = "int";
+			break;
+		case 1:
+			p = "int";
+			break;
+		case 2:
+			p = "off_t";
+			break;
+		case 3:
+			p = "off_t";
+			break;
+		default:
+			break;
+		};
+		break;
 	/* linux_sys_dup3 */
 	case 358:
 		switch(ndx) {
@@ -6102,6 +6131,11 @@ systrace_return_setargdesc(int sysnum, i
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* linux_sys_fallocate */
+	case 352:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	/* linux_sys_dup3 */
 	case 358:
 		if (ndx == 0 || ndx == 1)

Index: src/sys/compat/linux/arch/i386/linux_syscall.h
diff -u src/sys/compat/linux/arch/i386/linux_syscall.h:1.114 src/sys/compat/linux/arch/i386/linux_syscall.h:1.115
--- src/sys/compat/linux/arch/i386/linux_syscall.h:1.114	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/i386/linux_syscall.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.114 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.115 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.122 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.123 2019/11/09 23:44:32 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -725,6 +725,9 @@
 /* syscall: "utimensat" ret: "int" args: "int" "const char *" "struct linux_timespec *" "int" */
 #define	LINUX_SYS_utimensat	320
 
+/* syscall: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */
+#define	LINUX_SYS_fallocate	324
+
 /* syscall: "dup3" ret: "int" args: "int" "int" "int" */
 #define	LINUX_SYS_dup3	330
 
Index: src/sys/compat/linux/arch/i386/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.114 src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.115
--- src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.114	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/i386/linux_syscallargs.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.114 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.115 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.122 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.123 2019/11/09 23:44:32 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -1128,6 +1128,14 @@ struct linux_sys_utimensat_args {
 };
 check_syscall_args(linux_sys_utimensat)
 
+struct linux_sys_fallocate_args {
+	syscallarg(int) fd;
+	syscallarg(int) mode;
+	syscallarg(off_t) offset;
+	syscallarg(off_t) len;
+};
+check_syscall_args(linux_sys_fallocate)
+
 struct linux_sys_dup3_args {
 	syscallarg(int) from;
 	syscallarg(int) to;
@@ -1599,6 +1607,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_fallocate(struct lwp *, const struct linux_sys_fallocate_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/i386/linux_sysent.c
diff -u src/sys/compat/linux/arch/i386/linux_sysent.c:1.114 src/sys/compat/linux/arch/i386/linux_sysent.c:1.115
--- src/sys/compat/linux/arch/i386/linux_sysent.c:1.114	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/i386/linux_sysent.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.114 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.115 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.122 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.123 2019/11/09 23:44:32 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.114 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.115 2019/11/09 23:45:08 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/poll.h>
@@ -1381,8 +1381,10 @@ struct sysent linux_sysent[] = {
 		.sy_call = linux_sys_nosys,
 	},		/* 323 = filler */
 	{
-		.sy_call = linux_sys_nosys,
-	},		/* 324 = filler */
+		ns(struct linux_sys_fallocate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(2) | SYCALL_ARG3_64 | SYCALL_ARG2_64,
+		.sy_call = (sy_call_t *)linux_sys_fallocate
+	},		/* 324 = fallocate */
 	{
 		.sy_call = linux_sys_nosys,
 	},		/* 325 = filler */

Index: src/sys/compat/linux/arch/i386/linux_syscalls.c
diff -u src/sys/compat/linux/arch/i386/linux_syscalls.c:1.115 src/sys/compat/linux/arch/i386/linux_syscalls.c:1.116
--- src/sys/compat/linux/arch/i386/linux_syscalls.c:1.115	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/i386/linux_syscalls.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.115 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.116 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.122 2017/01/02 16:32:09 manu Exp
+ * created from	NetBSD: syscalls.master,v 1.123 2019/11/09 23:44:32 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.115 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.116 2019/11/09 23:45:08 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include <sys/param.h>
@@ -358,7 +358,7 @@ const char *const linux_syscallnames[] =
 	/* 321 */	"#321 (unimplemented signalfd)",
 	/* 322 */	"#322 (unimplemented timerfd_create)",
 	/* 323 */	"#323 (unimplemented eventfd)",
-	/* 324 */	"#324 (unimplemented fallocate)",
+	/* 324 */	"fallocate",
 	/* 325 */	"#325 (unimplemented timerfd_settime)",
 	/* 326 */	"#326 (unimplemented timerfd_gettime)",
 	/* 327 */	"#327 (unimplemented signalfd4)",
@@ -880,7 +880,7 @@ const char *const altlinux_syscallnames[
 	/* 321 */	NULL, /* unimplemented signalfd */
 	/* 322 */	NULL, /* unimplemented timerfd_create */
 	/* 323 */	NULL, /* unimplemented eventfd */
-	/* 324 */	NULL, /* unimplemented fallocate */
+	/* 324 */	NULL, /* fallocate */
 	/* 325 */	NULL, /* unimplemented timerfd_settime */
 	/* 326 */	NULL, /* unimplemented timerfd_gettime */
 	/* 327 */	NULL, /* unimplemented signalfd4 */

Index: src/sys/compat/linux/arch/i386/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/i386/linux_systrace_args.c:1.9 src/sys/compat/linux/arch/i386/linux_systrace_args.c:1.10
--- src/sys/compat/linux/arch/i386/linux_systrace_args.c:1.9	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/i386/linux_systrace_args.c	Sat Nov  9 23:45:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_systrace_args.c,v 1.9 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_systrace_args.c,v 1.10 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.
@@ -1905,6 +1905,16 @@ systrace_args(register_t sysnum, const v
 		*n_args = 4;
 		break;
 	}
+	/* linux_sys_fallocate */
+	case 324: {
+		const struct linux_sys_fallocate_args *p = params;
+		iarg[0] = SCARG(p, fd); /* int */
+		iarg[1] = SCARG(p, mode); /* int */
+		iarg[2] = SCARG(p, offset); /* off_t */
+		iarg[3] = SCARG(p, len); /* off_t */
+		*n_args = 4;
+		break;
+	}
 	/* linux_sys_dup3 */
 	case 330: {
 		const struct linux_sys_dup3_args *p = params;
@@ -5019,6 +5029,25 @@ systrace_entry_setargdesc(int sysnum, in
 			break;
 		};
 		break;
+	/* linux_sys_fallocate */
+	case 324:
+		switch(ndx) {
+		case 0:
+			p = "int";
+			break;
+		case 1:
+			p = "int";
+			break;
+		case 2:
+			p = "off_t";
+			break;
+		case 3:
+			p = "off_t";
+			break;
+		default:
+			break;
+		};
+		break;
 	/* linux_sys_dup3 */
 	case 330:
 		switch(ndx) {
@@ -6165,6 +6194,11 @@ systrace_return_setargdesc(int sysnum, i
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* linux_sys_fallocate */
+	case 324:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	/* linux_sys_dup3 */
 	case 330:
 		if (ndx == 0 || ndx == 1)

Index: src/sys/compat/linux/arch/m68k/linux_syscall.h
diff -u src/sys/compat/linux/arch/m68k/linux_syscall.h:1.106 src/sys/compat/linux/arch/m68k/linux_syscall.h:1.107
--- src/sys/compat/linux/arch/m68k/linux_syscall.h:1.106	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/m68k/linux_syscall.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.106 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.107 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.93 2017/02/03 16:44:12 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.94 2019/11/09 23:44:32 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -714,6 +714,9 @@
 /* syscall: "utimensat" ret: "int" args: "int" "const char *" "struct linux_timespec *" "int" */
 #define	LINUX_SYS_utimensat	316
 
+/* syscall: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */
+#define	LINUX_SYS_fallocate	320
+
 /* syscall: "dup3" ret: "int" args: "int" "int" "int" */
 #define	LINUX_SYS_dup3	326
 
Index: src/sys/compat/linux/arch/m68k/linux_syscalls.c
diff -u src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.106 src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.107
--- src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.106	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/m68k/linux_syscalls.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.106 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.107 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.93 2017/02/03 16:44:12 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.94 2019/11/09 23:44:32 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.106 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.107 2019/11/09 23:45:08 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -374,7 +374,7 @@ const char *const linux_syscallnames[] =
 	/* 317 */	"#317 (unimplemented signalfd)",
 	/* 318 */	"#318 (unimplemented timerfd_create)",
 	/* 319 */	"#319 (unimplemented eventfd)",
-	/* 320 */	"#320 (unimplemented fallocate)",
+	/* 320 */	"fallocate",
 	/* 321 */	"#321 (unimplemented timerfd_settime)",
 	/* 322 */	"#322 (unimplemented timerfd_gettime)",
 	/* 323 */	"#323 (unimplemented signalfd4)",
@@ -912,7 +912,7 @@ const char *const altlinux_syscallnames[
 	/* 317 */	NULL, /* unimplemented signalfd */
 	/* 318 */	NULL, /* unimplemented timerfd_create */
 	/* 319 */	NULL, /* unimplemented eventfd */
-	/* 320 */	NULL, /* unimplemented fallocate */
+	/* 320 */	NULL, /* fallocate */
 	/* 321 */	NULL, /* unimplemented timerfd_settime */
 	/* 322 */	NULL, /* unimplemented timerfd_gettime */
 	/* 323 */	NULL, /* unimplemented signalfd4 */
Index: src/sys/compat/linux/arch/m68k/linux_sysent.c
diff -u src/sys/compat/linux/arch/m68k/linux_sysent.c:1.106 src/sys/compat/linux/arch/m68k/linux_sysent.c:1.107
--- src/sys/compat/linux/arch/m68k/linux_sysent.c:1.106	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/m68k/linux_sysent.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.106 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.107 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.93 2017/02/03 16:44:12 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.94 2019/11/09 23:44:32 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.106 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.107 2019/11/09 23:45:08 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -1379,8 +1379,10 @@ struct sysent linux_sysent[] = {
 		.sy_call = linux_sys_nosys,
 	},		/* 319 = filler */
 	{
-		.sy_call = linux_sys_nosys,
-	},		/* 320 = filler */
+		ns(struct linux_sys_fallocate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(2) | SYCALL_ARG3_64 | SYCALL_ARG2_64,
+		.sy_call = (sy_call_t *)linux_sys_fallocate
+	},		/* 320 = fallocate */
 	{
 		.sy_call = linux_sys_nosys,
 	},		/* 321 = filler */

Index: src/sys/compat/linux/arch/m68k/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/m68k/linux_syscallargs.h:1.105 src/sys/compat/linux/arch/m68k/linux_syscallargs.h:1.106
--- src/sys/compat/linux/arch/m68k/linux_syscallargs.h:1.105	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/m68k/linux_syscallargs.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.105 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.106 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.93 2017/02/03 16:44:12 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.94 2019/11/09 23:44:32 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -1089,6 +1089,14 @@ struct linux_sys_utimensat_args {
 };
 check_syscall_args(linux_sys_utimensat)
 
+struct linux_sys_fallocate_args {
+	syscallarg(int) fd;
+	syscallarg(int) mode;
+	syscallarg(off_t) offset;
+	syscallarg(off_t) len;
+};
+check_syscall_args(linux_sys_fallocate)
+
 struct linux_sys_dup3_args {
 	syscallarg(int) from;
 	syscallarg(int) to;
@@ -1581,6 +1589,8 @@ int	linux_sys_sched_getaffinity(struct l
 
 int	linux_sys_utimensat(struct lwp *, const struct linux_sys_utimensat_args *, register_t *);
 
+int	linux_sys_fallocate(struct lwp *, const struct linux_sys_fallocate_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/mips/linux_syscall.h
diff -u src/sys/compat/linux/arch/mips/linux_syscall.h:1.78 src/sys/compat/linux/arch/mips/linux_syscall.h:1.79
--- src/sys/compat/linux/arch/mips/linux_syscall.h:1.78	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/mips/linux_syscall.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.78 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.79 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2017/02/09 22:02:05 christos Exp  
+ * created from	NetBSD: syscalls.master,v 1.67 2019/11/09 23:44:32 jdolecek Exp  
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -682,6 +682,9 @@
 /* syscall: "utimensat" ret: "int" args: "int" "const char *" "struct linux_timespec *" "int" */
 #define	LINUX_SYS_utimensat	316
 
+/* syscall: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */
+#define	LINUX_SYS_fallocate	320
+
 /* syscall: "dup3" ret: "int" args: "int" "int" "int" */
 #define	LINUX_SYS_dup3	327
 

Index: src/sys/compat/linux/arch/mips/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.77 src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.78
--- src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.77	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/mips/linux_syscallargs.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.77 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.78 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2017/02/09 22:02:05 christos Exp  
+ * created from	NetBSD: syscalls.master,v 1.67 2019/11/09 23:44:32 jdolecek Exp  
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -1127,6 +1127,14 @@ struct linux_sys_utimensat_args {
 };
 check_syscall_args(linux_sys_utimensat)
 
+struct linux_sys_fallocate_args {
+	syscallarg(int) fd;
+	syscallarg(int) mode;
+	syscallarg(off_t) offset;
+	syscallarg(off_t) len;
+};
+check_syscall_args(linux_sys_fallocate)
+
 struct linux_sys_dup3_args {
 	syscallarg(int) from;
 	syscallarg(int) to;
@@ -1613,6 +1621,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_fallocate(struct lwp *, const struct linux_sys_fallocate_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/mips/linux_syscalls.c
diff -u src/sys/compat/linux/arch/mips/linux_syscalls.c:1.77 src/sys/compat/linux/arch/mips/linux_syscalls.c:1.78
--- src/sys/compat/linux/arch/mips/linux_syscalls.c:1.77	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/mips/linux_syscalls.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.77 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.78 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2017/02/09 22:02:05 christos Exp  
+ * created from	NetBSD: syscalls.master,v 1.67 2019/11/09 23:44:32 jdolecek Exp  
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.77 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.78 2019/11/09 23:45:08 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include <sys/param.h>
@@ -350,7 +350,7 @@ const char *const linux_syscallnames[] =
 	/* 317 */	"#317 (unimplemented signalfd)",
 	/* 318 */	"#318 (unimplemented timerfd)",
 	/* 319 */	"#319 (unimplemented eventfd)",
-	/* 320 */	"#320 (unimplemented fallocate)",
+	/* 320 */	"fallocate",
 	/* 321 */	"#321 (unimplemented timerfd_create)",
 	/* 322 */	"#322 (unimplemented timerfd_gettime)",
 	/* 323 */	"#323 (unimplemented timerfd_settime)",
@@ -867,7 +867,7 @@ const char *const altlinux_syscallnames[
 	/* 317 */	NULL, /* unimplemented signalfd */
 	/* 318 */	NULL, /* unimplemented timerfd */
 	/* 319 */	NULL, /* unimplemented eventfd */
-	/* 320 */	NULL, /* unimplemented fallocate */
+	/* 320 */	NULL, /* fallocate */
 	/* 321 */	NULL, /* unimplemented timerfd_create */
 	/* 322 */	NULL, /* unimplemented timerfd_gettime */
 	/* 323 */	NULL, /* unimplemented timerfd_settime */
Index: src/sys/compat/linux/arch/mips/linux_sysent.c
diff -u src/sys/compat/linux/arch/mips/linux_sysent.c:1.77 src/sys/compat/linux/arch/mips/linux_sysent.c:1.78
--- src/sys/compat/linux/arch/mips/linux_sysent.c:1.77	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/mips/linux_sysent.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.77 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.78 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2017/02/09 22:02:05 christos Exp  
+ * created from	NetBSD: syscalls.master,v 1.67 2019/11/09 23:44:32 jdolecek Exp  
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.77 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.78 2019/11/09 23:45:08 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/poll.h>
@@ -1357,8 +1357,10 @@ struct sysent linux_sysent[] = {
 		.sy_call = linux_sys_nosys,
 	},		/* 319 = filler */
 	{
-		.sy_call = linux_sys_nosys,
-	},		/* 320 = filler */
+		ns(struct linux_sys_fallocate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(2) | SYCALL_ARG3_64 | SYCALL_ARG2_64,
+		.sy_call = (sy_call_t *)linux_sys_fallocate
+	},		/* 320 = fallocate */
 	{
 		.sy_call = linux_sys_nosys,
 	},		/* 321 = filler */

Index: src/sys/compat/linux/arch/powerpc/linux_syscall.h
diff -u src/sys/compat/linux/arch/powerpc/linux_syscall.h:1.84 src/sys/compat/linux/arch/powerpc/linux_syscall.h:1.85
--- src/sys/compat/linux/arch/powerpc/linux_syscall.h:1.84	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/powerpc/linux_syscall.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.84 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.85 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.72 2017/02/03 16:56:46 christos Exp  
+ * created from	NetBSD: syscalls.master,v 1.73 2019/11/09 23:44:32 jdolecek Exp  
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -651,6 +651,9 @@
 /* syscall: "utimensat" ret: "int" args: "int" "const char *" "struct linux_timespec *" "int" */
 #define	LINUX_SYS_utimensat	304
 
+/* syscall: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */
+#define	LINUX_SYS_fallocate	309
+
 /* syscall: "dup3" ret: "int" args: "int" "int" "int" */
 #define	LINUX_SYS_dup3	316
 
Index: src/sys/compat/linux/arch/powerpc/linux_sysent.c
diff -u src/sys/compat/linux/arch/powerpc/linux_sysent.c:1.84 src/sys/compat/linux/arch/powerpc/linux_sysent.c:1.85
--- src/sys/compat/linux/arch/powerpc/linux_sysent.c:1.84	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/powerpc/linux_sysent.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.84 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.85 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.72 2017/02/03 16:56:46 christos Exp  
+ * created from	NetBSD: syscalls.master,v 1.73 2019/11/09 23:44:32 jdolecek Exp  
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.84 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.85 2019/11/09 23:45:08 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/poll.h>
@@ -1303,8 +1303,10 @@ struct sysent linux_sysent[] = {
 		.sy_call = linux_sys_nosys,
 	},		/* 308 = filler */
 	{
-		.sy_call = linux_sys_nosys,
-	},		/* 309 = filler */
+		ns(struct linux_sys_fallocate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(2) | SYCALL_ARG3_64 | SYCALL_ARG2_64,
+		.sy_call = (sy_call_t *)linux_sys_fallocate
+	},		/* 309 = fallocate */
 	{
 		.sy_call = linux_sys_nosys,
 	},		/* 310 = filler */

Index: src/sys/compat/linux/arch/powerpc/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/powerpc/linux_syscallargs.h:1.83 src/sys/compat/linux/arch/powerpc/linux_syscallargs.h:1.84
--- src/sys/compat/linux/arch/powerpc/linux_syscallargs.h:1.83	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/powerpc/linux_syscallargs.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.83 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.84 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.72 2017/02/03 16:56:46 christos Exp  
+ * created from	NetBSD: syscalls.master,v 1.73 2019/11/09 23:44:32 jdolecek Exp  
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -1014,6 +1014,14 @@ struct linux_sys_utimensat_args {
 };
 check_syscall_args(linux_sys_utimensat)
 
+struct linux_sys_fallocate_args {
+	syscallarg(int) fd;
+	syscallarg(int) mode;
+	syscallarg(off_t) offset;
+	syscallarg(off_t) len;
+};
+check_syscall_args(linux_sys_fallocate)
+
 struct linux_sys_dup3_args {
 	syscallarg(int) from;
 	syscallarg(int) to;
@@ -1476,6 +1484,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_fallocate(struct lwp *, const struct linux_sys_fallocate_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/powerpc/linux_syscalls.c
diff -u src/sys/compat/linux/arch/powerpc/linux_syscalls.c:1.83 src/sys/compat/linux/arch/powerpc/linux_syscalls.c:1.84
--- src/sys/compat/linux/arch/powerpc/linux_syscalls.c:1.83	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux/arch/powerpc/linux_syscalls.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.83 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.84 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.72 2017/02/03 16:56:46 christos Exp  
+ * created from	NetBSD: syscalls.master,v 1.73 2019/11/09 23:44:32 jdolecek Exp  
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.83 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.84 2019/11/09 23:45:08 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include <sys/param.h>
@@ -342,7 +342,7 @@ const char *const linux_syscallnames[] =
 	/* 306 */	"#306 (unimplemented timerfd_create)",
 	/* 307 */	"#307 (unimplemented eventfd)",
 	/* 308 */	"#308 (unimplemented sync_file_range2)",
-	/* 309 */	"#309 (unimplemented fallocate)",
+	/* 309 */	"fallocate",
 	/* 310 */	"#310 (unimplemented subpage_prot)",
 	/* 311 */	"#311 (unimplemented timerfd_settime)",
 	/* 312 */	"#312 (unimplemented timerfd_gettime)",
@@ -864,7 +864,7 @@ const char *const altlinux_syscallnames[
 	/* 306 */	NULL, /* unimplemented timerfd_create */
 	/* 307 */	NULL, /* unimplemented eventfd */
 	/* 308 */	NULL, /* unimplemented sync_file_range2 */
-	/* 309 */	NULL, /* unimplemented fallocate */
+	/* 309 */	NULL, /* fallocate */
 	/* 310 */	NULL, /* unimplemented subpage_prot */
 	/* 311 */	NULL, /* unimplemented timerfd_settime */
 	/* 312 */	NULL, /* unimplemented timerfd_gettime */

Index: src/sys/compat/linux32/arch/amd64/linux32_syscall.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.79 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.80
--- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.79	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscall.h,v 1.79 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux32_syscall.h,v 1.80 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.69 2015/03/08 17:10:44 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.70 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALL_H_
@@ -702,6 +702,9 @@
 /* syscall: "utimensat" ret: "int" args: "int" "netbsd32_charp" "linux32_timespecp_t" "int" */
 #define	LINUX32_SYS_utimensat	320
 
+/* syscall: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */
+#define	LINUX32_SYS_fallocate	324
+
 /* syscall: "dup3" ret: "int" args: "int" "int" "int" */
 #define	LINUX32_SYS_dup3	330
 
Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.79 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.80
--- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.79	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h	Sat Nov  9 23:45:08 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscallargs.h,v 1.79 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux32_syscallargs.h,v 1.80 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.69 2015/03/08 17:10:44 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.70 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALLARGS_H_
@@ -1013,6 +1013,14 @@ struct linux32_sys_utimensat_args {
 };
 check_syscall_args(linux32_sys_utimensat)
 
+struct linux32_sys_fallocate_args {
+	syscallarg(int) fd;
+	syscallarg(int) mode;
+	syscallarg(off_t) offset;
+	syscallarg(off_t) len;
+};
+check_syscall_args(linux32_sys_fallocate)
+
 struct linux32_sys_dup3_args {
 	syscallarg(int) from;
 	syscallarg(int) to;
@@ -1468,6 +1476,8 @@ int	linux32_sys_get_robust_list(struct l
 
 int	linux32_sys_utimensat(struct lwp *, const struct linux32_sys_utimensat_args *, register_t *);
 
+int	linux32_sys_fallocate(struct lwp *, const struct linux32_sys_fallocate_args *, register_t *);
+
 int	linux32_sys_dup3(struct lwp *, const struct linux32_sys_dup3_args *, register_t *);
 
 int	linux32_sys_pipe2(struct lwp *, const struct linux32_sys_pipe2_args *, register_t *);
Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.79 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.80
--- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.79	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux32_syscalls.c,v 1.79 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux32_syscalls.c,v 1.80 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.69 2015/03/08 17:10:44 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.70 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.79 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.80 2019/11/09 23:45:08 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include <sys/param.h>
@@ -363,7 +363,7 @@ const char *const linux32_syscallnames[]
 	/* 321 */	"#321 (unimplemented signalfd)",
 	/* 322 */	"#322 (unimplemented timerfd_create)",
 	/* 323 */	"#323 (unimplemented eventfd)",
-	/* 324 */	"#324 (unimplemented fallocate)",
+	/* 324 */	"fallocate",
 	/* 325 */	"#325 (unimplemented timerfd_settime)",
 	/* 326 */	"#326 (unimplemented timerfd_gettime)",
 	/* 327 */	"#327 (unimplemented signalfd4)",
@@ -882,7 +882,7 @@ const char *const altlinux32_syscallname
 	/* 321 */	NULL, /* unimplemented signalfd */
 	/* 322 */	NULL, /* unimplemented timerfd_create */
 	/* 323 */	NULL, /* unimplemented eventfd */
-	/* 324 */	NULL, /* unimplemented fallocate */
+	/* 324 */	NULL, /* fallocate */
 	/* 325 */	NULL, /* unimplemented timerfd_settime */
 	/* 326 */	NULL, /* unimplemented timerfd_gettime */
 	/* 327 */	NULL, /* unimplemented signalfd4 */
Index: src/sys/compat/linux32/arch/amd64/linux32_sysent.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.79 src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.80
--- src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.79	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux32/arch/amd64/linux32_sysent.c	Sat Nov  9 23:45:08 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: linux32_sysent.c,v 1.79 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux32_sysent.c,v 1.80 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.69 2015/03/08 17:10:44 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.70 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.79 2018/08/10 21:47:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.80 2019/11/09 23:45:08 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/poll.h>
@@ -1219,8 +1219,10 @@ struct sysent linux32_sysent[] = {
 		.sy_call = linux_sys_nosys,
 	},		/* 323 = filler */
 	{
-		.sy_call = linux_sys_nosys,
-	},		/* 324 = filler */
+		ns(struct linux32_sys_fallocate_args),
+		.sy_flags = SYCALL_NARGS64_VAL(2) | SYCALL_ARG3_64 | SYCALL_ARG2_64,
+		.sy_call = (sy_call_t *)linux32_sys_fallocate
+	},		/* 324 = fallocate */
 	{
 		.sy_call = linux_sys_nosys,
 	},		/* 325 = filler */

Index: src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c:1.6 src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c:1.7
--- src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c:1.6	Fri Aug 10 21:47:15 2018
+++ src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c	Sat Nov  9 23:45:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_systrace_args.c,v 1.6 2018/08/10 21:47:15 pgoyette Exp $ */
+/* $NetBSD: linux32_systrace_args.c,v 1.7 2019/11/09 23:45:08 jdolecek Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.
@@ -1847,6 +1847,16 @@ systrace_args(register_t sysnum, const v
 		*n_args = 4;
 		break;
 	}
+	/* linux32_sys_fallocate */
+	case 324: {
+		const struct linux32_sys_fallocate_args *p = params;
+		iarg[0] = SCARG(p, fd); /* int */
+		iarg[1] = SCARG(p, mode); /* int */
+		iarg[2] = SCARG(p, offset); /* off_t */
+		iarg[3] = SCARG(p, len); /* off_t */
+		*n_args = 4;
+		break;
+	}
 	/* linux32_sys_dup3 */
 	case 330: {
 		const struct linux32_sys_dup3_args *p = params;
@@ -4868,6 +4878,25 @@ systrace_entry_setargdesc(int sysnum, in
 			break;
 		};
 		break;
+	/* linux32_sys_fallocate */
+	case 324:
+		switch(ndx) {
+		case 0:
+			p = "int";
+			break;
+		case 1:
+			p = "int";
+			break;
+		case 2:
+			p = "off_t";
+			break;
+		case 3:
+			p = "off_t";
+			break;
+		default:
+			break;
+		};
+		break;
 	/* linux32_sys_dup3 */
 	case 330:
 		switch(ndx) {
@@ -5977,6 +6006,11 @@ systrace_return_setargdesc(int sysnum, i
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* linux32_sys_fallocate */
+	case 324:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	/* linux32_sys_dup3 */
 	case 330:
 		if (ndx == 0 || ndx == 1)

Reply via email to