summaryrefslogtreecommitdiffstats
path: root/sys/modules
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2001-11-19 05:09:14 +0000
committergreen <green@FreeBSD.org>2001-11-19 05:09:14 +0000
commit08da8e602d7ac75dd5ba7a11f3b9acfe523f4798 (patch)
tree55d623a4ca4411121bb3ffaa2e3a05cbf4934542 /sys/modules
parentaed28d261dbfc61677cce6a1ae129b5ed8f96865 (diff)
downloadFreeBSD-src-08da8e602d7ac75dd5ba7a11f3b9acfe523f4798.zip
FreeBSD-src-08da8e602d7ac75dd5ba7a11f3b9acfe523f4798.tar.gz
Add module compile framework for LOMAC.
Sponsored by: DARPA, NAI Labs (CBOSS project)
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/lomac/Makefile40
-rw-r--r--sys/modules/lomac/Makefile.inc1
-rw-r--r--sys/modules/lomac/plm/Makefile11
-rw-r--r--sys/modules/lomac/syscall_gate/Makefile11
4 files changed, 63 insertions, 0 deletions
diff --git a/sys/modules/lomac/Makefile b/sys/modules/lomac/Makefile
new file mode 100644
index 0000000..892edf2
--- /dev/null
+++ b/sys/modules/lomac/Makefile
@@ -0,0 +1,40 @@
+# $FreeBSD$
+
+KMOD= lomac
+SRCS= vnode_if.h kernel_lkm.c kernel_interface.c kernel_util.c \
+ kernel_log.c kernel_mediate.c lomacfs_vfsops.c lomacfs_vnops.c \
+ lomacfs_subr.c kernel_monitor.c kernel_mmap.c kernel_pipe.c \
+ kernel_socket.c
+NOMAN= yes
+SUBDIR+= syscall_gate
+SUBDIR+= plm
+CFLAGS+= -I${.CURDIR}/../../contrib/lomac
+CFLAGS+= -DUSES_LOCKMGR # necessary until VM uses sx locks
+#CFLAGS+= -DP_CAN_HOOKS # There are no hooks for p_can*() ops in the
+# kernel yet. Until then, all subject-subject
+# mediation is effectively "off".
+#CFLAGS+= -DLOMAC_DEBUG_LOOKUPSTATS # relatively cheap
+#CFLAGS+= -DLOMAC_DEBUG_NODE_ALLOC # pretty verbose
+#CFLAGS+= -DLOMAC_DEBUG_LINK # pretty verbose
+#CFLAGS+= -DLOMAC_DEBUG_INCNAME # can starve memory
+#CFLAGS+= -DLOMAC_DEBUG_INACTIVE # extremely verbose
+#CFLAGS+= -DLOMAC_DEBUG_RECLAIM # extremely verbose
+#CFLAGS+= -DLOMAC_DEBUG_LOOKUP # extremely verbose
+#CFLAGS+= -DLOMAC_DEBUG_PIPE # relatively cheap
+#CFLAGS+= -DLOMAC_DEBUG_RECWD # only happens once
+
+.PATH: ${.CURDIR}/../../contrib/lomac
+
+load-all: all
+ @cd ${.CURDIR}/syscall_gate; ${MAKE} load
+ @cd ${.CURDIR}/plm; ${MAKE} load
+ @${MAKE} load
+
+kldunload-binacts:
+ -/sbin/kldunload linux
+ -/sbin/kldunload svr4
+
+start: kldunload-binacts load-all
+
+.include "Makefile.inc"
+.include <bsd.kmod.mk>
diff --git a/sys/modules/lomac/Makefile.inc b/sys/modules/lomac/Makefile.inc
new file mode 100644
index 0000000..e8c0da7
--- /dev/null
+++ b/sys/modules/lomac/Makefile.inc
@@ -0,0 +1 @@
+# $FreeBSD$
diff --git a/sys/modules/lomac/plm/Makefile b/sys/modules/lomac/plm/Makefile
new file mode 100644
index 0000000..e0bf985
--- /dev/null
+++ b/sys/modules/lomac/plm/Makefile
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+KMOD= lomac_plm
+SRCS= kernel_plm.c
+NOMAN= yes
+CFLAGS+= -I${.CURDIR}/../../../contrib/lomac
+
+.PATH: ${.CURDIR}/../../../contrib/lomac
+
+.include "../Makefile.inc"
+.include <bsd.kmod.mk>
diff --git a/sys/modules/lomac/syscall_gate/Makefile b/sys/modules/lomac/syscall_gate/Makefile
new file mode 100644
index 0000000..1540e57
--- /dev/null
+++ b/sys/modules/lomac/syscall_gate/Makefile
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+KMOD= syscall_gate
+SRCS= syscall_gate.c
+NOMAN= yes
+CFLAGS+= -I${.CURDIR}/../../../contrib/lomac
+
+.PATH: ${.CURDIR}/../../../contrib/lomac
+
+.include "../Makefile.inc"
+.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud