CVS commit: src/sys/compat/freebsd

2019-06-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 01:42:36 UTC 2019

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

Log Message:
add quota option


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/compat/freebsd/syscalls.master

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



CVS commit: src/sys/compat/freebsd

2019-06-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 01:42:36 UTC 2019

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

Log Message:
add quota option


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/compat/freebsd/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/freebsd/syscalls.master
diff -u src/sys/compat/freebsd/syscalls.master:1.72 src/sys/compat/freebsd/syscalls.master:1.73
--- src/sys/compat/freebsd/syscalls.master:1.72	Sat Jan  6 11:41:23 2018
+++ src/sys/compat/freebsd/syscalls.master	Mon Jun 17 21:42:36 2019
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.72 2018/01/06 16:41:23 kamil Exp $
+	$NetBSD: syscalls.master,v 1.73 2019/06/18 01:42:36 christos Exp $
 
 ;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -36,6 +36,7 @@
 #include "opt_ntp.h"
 #include "opt_sysv.h"
 #include "opt_compat_43.h"
+#include "opt_quota.h"
 #endif
 
 #include 
@@ -277,9 +278,14 @@
 146	NOARGS		{ int|compat_43_sys||killpg(int pgid, int signum); } \
 			okillpg
 147	NOARGS		{ int|sys||setsid(void); }
+#if defined(QUOTA) || !defined(_KERNEL_OPT)
 148	NOARGS		{ int|compat_50_sys||quotactl(char *path, int cmd, \
 			int uid, void *arg); }
 149	NOARGS		{ int|compat_43_sys||quota(void); } oquota
+#else
+148	EXCL		compat_50_sys_quotactl
+149	EXCL		compat_43_sys_quota
+#endif
 150	NOARGS		{ int|compat_43_sys||getsockname(int fdec, void *asa, \
 			int *alen); } ogetsockname
 



CVS commit: src/sys/compat/freebsd

2019-06-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 01:42:44 UTC 2019

Modified Files:
src/sys/compat/freebsd: freebsd_syscall.h freebsd_syscallargs.h
freebsd_syscalls.c freebsd_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/freebsd/freebsd_syscall.h
cvs rdiff -u -r1.92 -r1.93 src/sys/compat/freebsd/freebsd_syscallargs.h \
src/sys/compat/freebsd/freebsd_sysent.c
cvs rdiff -u -r1.90 -r1.91 src/sys/compat/freebsd/freebsd_syscalls.c

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



CVS commit: src/sys/compat/freebsd

2019-06-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 01:42:44 UTC 2019

Modified Files:
src/sys/compat/freebsd: freebsd_syscall.h freebsd_syscallargs.h
freebsd_syscalls.c freebsd_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/freebsd/freebsd_syscall.h
cvs rdiff -u -r1.92 -r1.93 src/sys/compat/freebsd/freebsd_syscallargs.h \
src/sys/compat/freebsd/freebsd_sysent.c
cvs rdiff -u -r1.90 -r1.91 src/sys/compat/freebsd/freebsd_syscalls.c

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

Modified files:

Index: src/sys/compat/freebsd/freebsd_syscall.h
diff -u src/sys/compat/freebsd/freebsd_syscall.h:1.89 src/sys/compat/freebsd/freebsd_syscall.h:1.90
--- src/sys/compat/freebsd/freebsd_syscall.h:1.89	Fri Aug 10 17:47:14 2018
+++ src/sys/compat/freebsd/freebsd_syscall.h	Mon Jun 17 21:42:44 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: freebsd_syscall.h,v 1.89 2018/08/10 21:47:14 pgoyette Exp $ */
+/* $NetBSD: freebsd_syscall.h,v 1.90 2019/06/18 01:42:44 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.72 2018/01/06 16:41:23 kamil Exp
+ * created from	NetBSD: syscalls.master,v 1.73 2019/06/18 01:42:36 christos Exp
  */
 
 #ifndef _FREEBSD_SYS_SYSCALL_H_
@@ -438,12 +438,17 @@
 /* syscall: "setsid" ret: "int" args: */
 #define	FREEBSD_SYS_setsid	147
 
+#if defined(QUOTA) || !defined(_KERNEL_OPT)
 /* syscall: "quotactl" ret: "int" args: "char *" "int" "int" "void *" */
 #define	FREEBSD_SYS_quotactl	148
 
 /* syscall: "oquota" ret: "int" args: */
 #define	FREEBSD_SYS_oquota	149
 
+#else
+/* 148 is excluded compat_50_sys_quotactl */
+/* 149 is excluded compat_43_sys_quota */
+#endif
 /* syscall: "ogetsockname" ret: "int" args: "int" "void *" "int *" */
 #define	FREEBSD_SYS_ogetsockname	150
 

Index: src/sys/compat/freebsd/freebsd_syscallargs.h
diff -u src/sys/compat/freebsd/freebsd_syscallargs.h:1.92 src/sys/compat/freebsd/freebsd_syscallargs.h:1.93
--- src/sys/compat/freebsd/freebsd_syscallargs.h:1.92	Fri Aug 10 17:47:14 2018
+++ src/sys/compat/freebsd/freebsd_syscallargs.h	Mon Jun 17 21:42:44 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: freebsd_syscallargs.h,v 1.92 2018/08/10 21:47:14 pgoyette Exp $ */
+/* $NetBSD: freebsd_syscallargs.h,v 1.93 2019/06/18 01:42:44 christos Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.72 2018/01/06 16:41:23 kamil Exp
+ * created from	NetBSD: syscalls.master,v 1.73 2019/06/18 01:42:36 christos Exp
  */
 
 #ifndef _FREEBSD_SYS_SYSCALLARGS_H_
@@ -300,8 +300,11 @@ struct compat_43_sys_getrlimit_args;
 struct compat_43_sys_setrlimit_args;
 
 struct compat_43_sys_killpg_args;
+#if defined(QUOTA) || !defined(_KERNEL_OPT)
 
 struct compat_50_sys_quotactl_args;
+#else
+#endif
 
 struct compat_43_sys_getsockname_args;
 
@@ -879,10 +882,13 @@ int	compat_43_sys_killpg(struct lwp *, c
 
 int	sys_setsid(struct lwp *, const void *, register_t *);
 
+#if defined(QUOTA) || !defined(_KERNEL_OPT)
 int	compat_50_sys_quotactl(struct lwp *, const struct compat_50_sys_quotactl_args *, register_t *);
 
 int	compat_43_sys_quota(struct lwp *, const void *, register_t *);
 
+#else
+#endif
 int	compat_43_sys_getsockname(struct lwp *, const struct compat_43_sys_getsockname_args *, register_t *);
 
 int	compat_43_sys_getdirentries(struct lwp *, const struct compat_43_sys_getdirentries_args *, register_t *);
Index: src/sys/compat/freebsd/freebsd_sysent.c
diff -u src/sys/compat/freebsd/freebsd_sysent.c:1.92 src/sys/compat/freebsd/freebsd_sysent.c:1.93
--- src/sys/compat/freebsd/freebsd_sysent.c:1.92	Fri Aug 10 17:47:14 2018
+++ src/sys/compat/freebsd/freebsd_sysent.c	Mon Jun 17 21:42:44 2019
@@ -1,20 +1,21 @@
-/* $NetBSD: freebsd_sysent.c,v 1.92 2018/08/10 21:47:14 pgoyette Exp $ */
+/* $NetBSD: freebsd_sysent.c,v 1.93 2019/06/18 01:42:44 christos Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.72 2018/01/06 16:41:23 kamil Exp
+ * created from	NetBSD: syscalls.master,v 1.73 2019/06/18 01:42:36 christos Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: freebsd_sysent.c,v 1.92 2018/08/10 21:47:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: freebsd_sysent.c,v 1.93 2019/06/18 01:42:44 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ktrace.h"
 #include "opt_ntp.h"
 #include "opt_sysv.h"
 #include "opt_compat_43.h"
+#include "opt_quota.h"
 #endif
 #include 
 #include 
@@ -691,6 +692,7 @@ struct sysent freebsd_sysent[] = {
 	{
 		.sy_call = (sy_call_t *)sys_setsid
 	},		/* 147 = setsid */
+#if defined(QUOTA) || !defined(_KERNEL_OPT)
 	{
 		ns(struct compat_50_sys_quotactl_args),
 		.sy_flags = SYCALL_ARG_PTR,
@@ -699,6 +701,14 @@ struct sysent 

Re: CVS commit: src/sys/compat/freebsd

2019-04-06 Thread Robert Elz
Date:Sat, 6 Apr 2019 10:48:32 -0700
From:Jason Thorpe 
Message-ID:  

  | The only situation I know of where it's wacky is sparc64-built-as-ILP32
  | and mips64-built-as-ILP32, where register_t is 64-bit and long is 32-bit.

But that is kind of the point - from qhat I can see from a (very) quick
scan, register_t is used almost exclusively for syscall args/results
(for which it makes sense) - and those are objects which are likely being
copied to/from user space.

Just like ufetch_ptr() exists, even though a pointer is almost always
the same as an int or a long in terms of number of bits, etc, register_t
will essentially always be one or the other - but we never really know
which.

Unlike most of the other contrived types (size_t, intmax_t, ptrdiff_t)
which aren't all that frequently shunted around, register_t is, which
is why (just like ptr_t) I believe it would be one which should have its
own access functions.

But I will leave it for you to decide what is really needed there.

kre



Re: CVS commit: src/sys/compat/freebsd

2019-04-06 Thread Jason Thorpe



> On Apr 6, 2019, at 10:45 AM, Robert Elz  wrote:
> 
> Actually, fetching & storing registers (register_t) is a common enough
> thing that it might be worth having ufetch_reg (and ustore_reg), probably
> as MD #defines that map into one of the other calls.

The only situation I know of where it's wacky is sparc64-built-as-ILP32 and 
mips64-built-as-ILP32, where register_t is 64-bit and long is 32-bit.

-- thorpej



Re: CVS commit: src/sys/compat/freebsd

2019-04-06 Thread Robert Elz
Actually, fetching & storing registers (register_t) is a common enough
thing that it might be worth having ufetch_reg (and ustore_reg), probably
as MD #defines that map into one of the other calls.

kre



Re: CVS commit: src/sys/compat/freebsd

2019-04-06 Thread Robert Elz
Date:Sat, 6 Apr 2019 10:30:39 -0700
From:Jason Thorpe 
Message-ID:  <047ba730-614e-46fd-85e2-f501d18f4...@me.com>

  | This is wrong -- register_t is 64-bit on amd64 ... so u_long
  | is the better choice of cast.

It was wrong anyway, it needs to be an unsigned type (even though
code is signed) ... but yes, I will switch it back to the previous
version, and we can just hope that this stuff never gets used on
a system where long is 64 bits and register_t is 32.

kre