From b13c2e209e44eb30d44335026f70a7a814903588 Mon Sep 17 00:00:00 2001 From: Brian Feldman Date: Mon, 19 Nov 2001 05:09:14 +0000 Subject: [PATCH] Add module compile framework for LOMAC. Sponsored by: DARPA, NAI Labs (CBOSS project) --- sys/modules/lomac/Makefile | 40 +++++++++++++++++++++++++ sys/modules/lomac/Makefile.inc | 1 + sys/modules/lomac/plm/Makefile | 11 +++++++ sys/modules/lomac/syscall_gate/Makefile | 11 +++++++ 4 files changed, 63 insertions(+) create mode 100644 sys/modules/lomac/Makefile create mode 100644 sys/modules/lomac/Makefile.inc create mode 100644 sys/modules/lomac/plm/Makefile create mode 100644 sys/modules/lomac/syscall_gate/Makefile diff --git a/sys/modules/lomac/Makefile b/sys/modules/lomac/Makefile new file mode 100644 index 000000000000..892edf21ba1a --- /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 diff --git a/sys/modules/lomac/Makefile.inc b/sys/modules/lomac/Makefile.inc new file mode 100644 index 000000000000..e8c0da7a1d7e --- /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 000000000000..e0bf985ddb98 --- /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 diff --git a/sys/modules/lomac/syscall_gate/Makefile b/sys/modules/lomac/syscall_gate/Makefile new file mode 100644 index 000000000000..1540e572fea8 --- /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