aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-06-25 09:50:35 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-06-25 09:50:35 +0000
commit6c9cb1b9ef1d95e6b0fb9f890d6b223a4b37711b (patch)
tree08ce3fd812458e6ce7c94416d1c9a4ee7f325563
parent6fd6101576fc848db46c39c488cc3e5a13b98640 (diff)
downloadxen-6c9cb1b9ef1d95e6b0fb9f890d6b223a4b37711b.tar.gz
xen-6c9cb1b9ef1d95e6b0fb9f890d6b223a4b37711b.tar.bz2
xen-6c9cb1b9ef1d95e6b0fb9f890d6b223a4b37711b.zip
bitkeeper revision 1.1756 (42bd28eb7ZP0AhHHKYuqhX2z3XItTQ)
Allow setting of ACM security policy at build time. Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
-rw-r--r--BitKeeper/etc/ignore1
-rw-r--r--xen/Makefile20
-rw-r--r--xen/Rules.mk15
-rw-r--r--xen/include/public/acm.h8
4 files changed, 34 insertions, 10 deletions
diff --git a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore
index e8c82227fe..d9b1b780c0 100644
--- a/BitKeeper/etc/ignore
+++ b/BitKeeper/etc/ignore
@@ -167,6 +167,7 @@ xen/include/asm-*/asm-offsets.h
xen/include/hypervisor-ifs/arch
xen/include/public/public
xen/include/xen/*.new
+xen/include/xen/acm_policy.h
xen/include/xen/banner.h
xen/include/xen/compile.h
xen/tags
diff --git a/xen/Makefile b/xen/Makefile
index 16ba9c2046..4f6f17c4f7 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -51,24 +51,40 @@ clean: delete-unfresh-files
rm -f include/asm *.o $(TARGET)* *~ core
rm -f include/asm-*/asm-offsets.h
rm -f tools/figlet/*.o tools/figlet/figlet
+ rm -f include/xen/acm_policy.h
$(TARGET): delete-unfresh-files
$(MAKE) include/xen/compile.h
+ $(MAKE) include/xen/acm_policy.h
[ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
$(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
$(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
$(MAKE) -C common
$(MAKE) -C drivers
-ifdef ACM_USE_SECURITY_POLICY
+ifneq ($(ACM_USE_SECURITY_POLICY),ACM_NULL_POLICY)
$(MAKE) -C acm
endif
$(MAKE) -C arch/$(TARGET_ARCH)
-# drivers/char/console.o may contain static banner/compile info. Blow it away.
+# drivers/char/console.o contains static banner/compile info. Blow it away.
delete-unfresh-files:
rm -f include/xen/banner.h include/xen/compile.h drivers/char/console.o
$(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files
+# acm_policy.h contains security policy for Xen
+include/xen/acm_policy.h:
+ @(set -e; \
+ echo "/*"; \
+ echo " * DO NOT MODIFY."; \
+ echo " *"; \
+ echo " * This file was auto-generated by xen/Makefile $<"; \
+ echo " *"; \
+ echo " */"; \
+ echo ""; \
+ echo "#ifndef ACM_USE_SECURITY_POLICY"; \
+ echo "#define ACM_USE_SECURITY_POLICY $(ACM_USE_SECURITY_POLICY)"; \
+ echo "#endif") >$@
+
# compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
include/xen/compile.h: LANG=C
include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 76489cfa4b..751bf460d3 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -1,4 +1,7 @@
-
+#
+# If you change any of these configuration options then you must
+# 'make clean' before rebuilding.
+#
verbose ?= n
debug ?= n
perfc ?= n
@@ -8,6 +11,14 @@ optimize ?= y
domu_debug ?= n
crash_debug ?= n
+# ACM_USE_SECURITY_POLICY is set to security policy of Xen
+# Supported models are:
+# ACM_NULL_POLICY (ACM will not be built with this policy)
+# ACM_CHINESE_WALL_POLICY
+# ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY
+# ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY
+ACM_USE_SECURITY_POLICY ?= ACM_NULL_POLICY
+
include $(BASEDIR)/../Config.mk
# Set ARCH/SUBARCH appropriately.
@@ -35,7 +46,7 @@ OBJS += $(patsubst %.c,%.o,$(C_SRCS))
ALL_OBJS := $(BASEDIR)/common/common.o
ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
-ifdef ACM_USE_SECURITY_POLICY
+ifneq ($(ACM_USE_SECURITY_POLICY),ACM_NULL_POLICY)
ALL_OBJS += $(BASEDIR)/acm/acm.o
endif
ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
diff --git a/xen/include/public/acm.h b/xen/include/public/acm.h
index 31191b7b5a..9b6d97ffb3 100644
--- a/xen/include/public/acm.h
+++ b/xen/include/public/acm.h
@@ -22,8 +22,8 @@
* todo: move from static policy choice to compile option.
*/
-#ifndef _XEN_PUBLIC_SHYPE_H
-#define _XEN_PUBLIC_SHYPE_H
+#ifndef _XEN_PUBLIC_ACM_H
+#define _XEN_PUBLIC_ACM_H
#include "xen.h"
#include "sched_ctl.h"
@@ -71,10 +71,6 @@
(X == ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY) ? "CHINESE WALL AND SIMPLE TYPE ENFORCEMENT policy" : \
"UNDEFINED policy"
-#ifndef ACM_USE_SECURITY_POLICY
-#define ACM_USE_SECURITY_POLICY ACM_NULL_POLICY
-#endif
-
/* defines a ssid reference used by xen */
typedef u32 ssidref_t;