PERFORCE change 163108 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Sat May 30 19:11:30 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=163108
Change 163108 by trasz at trasz_victim on 2009/05/30 19:10:31
Add a temporary syscall interface. Temporary, becase it's not string
based (a'la nmount(2)); the more I look at the nmount(2), the more
I think it sucks for the kernel->userland direction.
Affected files ...
.. //depot/projects/soc2009/trasz_limits/lib/libc/sys/Symbol.map#2 edit
.. //depot/projects/soc2009/trasz_limits/sys/compat/freebsd32/syscalls.master#2 edit
.. //depot/projects/soc2009/trasz_limits/sys/conf/files#4 edit
.. //depot/projects/soc2009/trasz_limits/sys/kern/init_sysent.c#2 edit
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_hrl.c#1 add
.. //depot/projects/soc2009/trasz_limits/sys/kern/syscalls.c#2 edit
.. //depot/projects/soc2009/trasz_limits/sys/kern/syscalls.master#2 edit
.. //depot/projects/soc2009/trasz_limits/sys/kern/systrace_args.c#2 edit
.. //depot/projects/soc2009/trasz_limits/sys/sys/hrl.h#1 add
.. //depot/projects/soc2009/trasz_limits/sys/sys/priv.h#3 edit
.. //depot/projects/soc2009/trasz_limits/sys/sys/syscall.h#2 edit
.. //depot/projects/soc2009/trasz_limits/sys/sys/syscall.mk#2 edit
.. //depot/projects/soc2009/trasz_limits/sys/sys/sysproto.h#2 edit
.. //depot/projects/soc2009/trasz_limits/usr.sbin/Makefile#2 edit
.. //depot/projects/soc2009/trasz_limits/usr.sbin/hrl/Makefile#1 add
.. //depot/projects/soc2009/trasz_limits/usr.sbin/hrl/hrl.c#1 add
Differences ...
==== //depot/projects/soc2009/trasz_limits/lib/libc/sys/Symbol.map#2 (text) ====
@@ -357,6 +357,8 @@
setfib;
symlinkat;
unlinkat;
+ hrl_get;
+ hrl_set;
};
FBSDprivate_1.0 {
==== //depot/projects/soc2009/trasz_limits/sys/compat/freebsd32/syscalls.master#2 (text+ko) ====
@@ -875,3 +875,5 @@
507 AUE_NULL STD { int freebsd32_jail_set(struct iovec32 *iovp, \
unsigned int iovcnt, int flags); }
508 AUE_NULL NOPROTO { int jail_remove(int jid); }
+509 AUE_NULL STD { int hrl_get(struct hrl_limit **bufp, int nentries, int *required); }
+510 AUE_NULL STD { int hrl_set(struct hrl_limit **bufp, int nentries); }
==== //depot/projects/soc2009/trasz_limits/sys/conf/files#4 (text+ko) ====
@@ -1908,6 +1908,7 @@
kern/kern_exec.c standard
kern/kern_exit.c standard
kern/kern_fork.c standard
+kern/kern_hrl.c standard
kern/kern_idle.c standard
kern/kern_intr.c standard
kern/kern_jail.c standard
==== //depot/projects/soc2009/trasz_limits/sys/kern/init_sysent.c#2 (text+ko) ====
@@ -2,8 +2,8 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/init_sysent.c,v 1.247 2009/04/29 21:50:13 jamie Exp $
- * created from FreeBSD: head/sys/kern/syscalls.master 191673 2009-04-29 21:14:15Z jamie
+ * $FreeBSD$
+ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.250 2009/04/29 21:14:15 jamie Exp
*/
#include "opt_compat.h"
@@ -537,4 +537,6 @@
{ AS(jail_get_args), (sy_call_t *)jail_get, AUE_NULL, NULL, 0, 0 }, /* 506 = jail_get */
{ AS(jail_set_args), (sy_call_t *)jail_set, AUE_NULL, NULL, 0, 0 }, /* 507 = jail_set */
{ AS(jail_remove_args), (sy_call_t *)jail_remove, AUE_NULL, NULL, 0, 0 }, /* 508 = jail_remove */
+ { AS(hrl_get_args), (sy_call_t *)hrl_get, AUE_NULL, NULL, 0, 0 }, /* 509 = hrl_get */
+ { AS(hrl_set_args), (sy_call_t *)hrl_set, AUE_NULL, NULL, 0, 0 }, /* 510 = hrl_set */
};
==== //depot/projects/soc2009/trasz_limits/sys/kern/syscalls.c#2 (text+ko) ====
@@ -2,8 +2,8 @@
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/syscalls.c,v 1.231 2009/04/29 21:50:13 jamie Exp $
- * created from FreeBSD: head/sys/kern/syscalls.master 191673 2009-04-29 21:14:15Z jamie
+ * $FreeBSD$
+ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.250 2009/04/29 21:14:15 jamie Exp
*/
const char *syscallnames[] = {
@@ -516,4 +516,6 @@
"jail_get", /* 506 = jail_get */
"jail_set", /* 507 = jail_set */
"jail_remove", /* 508 = jail_remove */
+ "hrl_get", /* 509 = hrl_get */
+ "hrl_set", /* 510 = hrl_set */
};
==== //depot/projects/soc2009/trasz_limits/sys/kern/syscalls.master#2 (text+ko) ====
@@ -902,5 +902,7 @@
507 AUE_NULL STD { int jail_set(struct iovec *iovp, \
unsigned int iovcnt, int flags); }
508 AUE_NULL STD { int jail_remove(int jid); }
+509 AUE_NULL STD { int hrl_get(struct hrl_limit **bufp, int nentries, int *required); }
+510 AUE_NULL STD { int hrl_set(struct hrl_limit **bufp, int nentries); }
; Please copy any additions and changes to the following compatability tables:
; sys/compat/freebsd32/syscalls.master
==== //depot/projects/soc2009/trasz_limits/sys/kern/systrace_args.c#2 (text+ko) ====
@@ -2,7 +2,7 @@
* System call argument to DTrace register array converstion.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/systrace_args.c,v 1.29 2009/04/29 21:50:13 jamie Exp $
+ * $FreeBSD$
* This file is part of the DTrace syscall provider.
*/
@@ -3065,6 +3065,23 @@
*n_args = 1;
break;
}
+ /* hrl_get */
+ case 509: {
+ struct hrl_get_args *p = params;
+ uarg[0] = (intptr_t) p->bufp; /* struct hrl_limit ** */
+ iarg[1] = p->nentries; /* int */
+ uarg[2] = (intptr_t) p->required; /* int * */
+ *n_args = 3;
+ break;
+ }
+ /* hrl_set */
+ case 510: {
+ struct hrl_set_args *p = params;
+ uarg[0] = (intptr_t) p->bufp; /* struct hrl_limit ** */
+ iarg[1] = p->nentries; /* int */
+ *n_args = 2;
+ break;
+ }
default:
*n_args = 0;
break;
@@ -8137,6 +8154,35 @@
break;
};
break;
+ /* hrl_get */
+ case 509:
+ switch(ndx) {
+ case 0:
+ p = "struct hrl_limit **";
+ break;
+ case 1:
+ p = "int";
+ break;
+ case 2:
+ p = "int *";
+ break;
+ default:
+ break;
+ };
+ break;
+ /* hrl_set */
+ case 510:
+ switch(ndx) {
+ case 0:
+ p = "struct hrl_limit **";
+ break;
+ case 1:
+ p = "int";
+ break;
+ default:
+ break;
+ };
+ break;
default:
break;
};
==== //depot/projects/soc2009/trasz_limits/sys/sys/priv.h#3 (text+ko) ====
@@ -464,9 +464,15 @@
#define PRIV_C4B_TRACE 651 /* Unrestricted CAPI message tracing. */
/*
+ * Hierarchical Resource Limits privileges.
+ */
+#define PRIV_HRL_SET 660
+#define PRIV_HRL_GET 661
+
+/*
* Track end of privilege list.
*/
-#define _PRIV_HIGHEST 652
+#define _PRIV_HIGHEST 663
/*
* Validate that a named privilege is known by the privilege system. Invalid
==== //depot/projects/soc2009/trasz_limits/sys/sys/syscall.h#2 (text+ko) ====
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/sys/syscall.h,v 1.228 2009/04/29 21:50:13 jamie Exp $
- * created from FreeBSD: head/sys/kern/syscalls.master 191673 2009-04-29 21:14:15Z jamie
+ * $FreeBSD$
+ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.250 2009/04/29 21:14:15 jamie Exp
*/
#define SYS_syscall 0
@@ -424,4 +424,6 @@
#define SYS_jail_get 506
#define SYS_jail_set 507
#define SYS_jail_remove 508
-#define SYS_MAXSYSCALL 509
+#define SYS_hrl_get 509
+#define SYS_hrl_set 510
+#define SYS_MAXSYSCALL 511
==== //depot/projects/soc2009/trasz_limits/sys/sys/syscall.mk#2 (text+ko) ====
@@ -1,7 +1,7 @@
# FreeBSD system call names.
# DO NOT EDIT-- this file is automatically generated.
-# $FreeBSD: src/sys/sys/syscall.mk,v 1.183 2009/04/29 21:50:13 jamie Exp $
-# created from FreeBSD: head/sys/kern/syscalls.master 191673 2009-04-29 21:14:15Z jamie
+# $FreeBSD$
+# created from FreeBSD: src/sys/kern/syscalls.master,v 1.250 2009/04/29 21:14:15 jamie Exp
MIASM = \
syscall.o \
exit.o \
@@ -372,4 +372,6 @@
gssd_syscall.o \
jail_get.o \
jail_set.o \
- jail_remove.o
+ jail_remove.o \
+ hrl_get.o \
+ hrl_set.o
==== //depot/projects/soc2009/trasz_limits/sys/sys/sysproto.h#2 (text+ko) ====
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/sys/sysproto.h,v 1.232 2009/04/29 21:50:13 jamie Exp $
- * created from FreeBSD: head/sys/kern/syscalls.master 191673 2009-04-29 21:14:15Z jamie
+ * $FreeBSD$
+ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.250 2009/04/29 21:14:15 jamie Exp
*/
#ifndef _SYS_SYSPROTO_H_
@@ -1638,6 +1638,15 @@
struct jail_remove_args {
char jid_l_[PADL_(int)]; int jid; char jid_r_[PADR_(int)];
};
+struct hrl_get_args {
+ char bufp_l_[PADL_(struct hrl_limit **)]; struct hrl_limit ** bufp; char bufp_r_[PADR_(struct hrl_limit **)];
+ char nentries_l_[PADL_(int)]; int nentries; char nentries_r_[PADR_(int)];
+ char required_l_[PADL_(int *)]; int * required; char required_r_[PADR_(int *)];
+};
+struct hrl_set_args {
+ char bufp_l_[PADL_(struct hrl_limit **)]; struct hrl_limit ** bufp; char bufp_r_[PADR_(struct hrl_limit **)];
+ char nentries_l_[PADL_(int)]; int nentries; char nentries_r_[PADR_(int)];
+};
int nosys(struct thread *, struct nosys_args *);
void sys_exit(struct thread *, struct sys_exit_args *);
int fork(struct thread *, struct fork_args *);
@@ -1995,6 +2004,8 @@
int jail_get(struct thread *, struct jail_get_args *);
int jail_set(struct thread *, struct jail_set_args *);
int jail_remove(struct thread *, struct jail_remove_args *);
+int hrl_get(struct thread *, struct hrl_get_args *);
+int hrl_set(struct thread *, struct hrl_set_args *);
#ifdef COMPAT_43
@@ -2591,6 +2602,8 @@
#define SYS_AUE_jail_get AUE_NULL
#define SYS_AUE_jail_set AUE_NULL
#define SYS_AUE_jail_remove AUE_NULL
+#define SYS_AUE_hrl_get AUE_NULL
+#define SYS_AUE_hrl_set AUE_NULL
#undef PAD_
#undef PADL_
==== //depot/projects/soc2009/trasz_limits/usr.sbin/Makefile#2 (text+ko) ====
@@ -65,6 +65,7 @@
getpmac \
gstat \
${_gssd} \
+ hrl \
i2c \
ifmcstat \
inetd \
More information about the p4-projects
mailing list