ia64/xen-unstable

changeset 5581:4ed21996131d

bitkeeper revision 1.1756 (42bd28eb7ZP0AhHHKYuqhX2z3XItTQ)

Allow setting of ACM security policy at build time.
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Jun 25 09:50:35 2005 +0000 (2005-06-25)
parents 2a28f4aab6ae
children 8ad10be47849
files BitKeeper/etc/ignore xen/Makefile xen/Rules.mk xen/include/public/acm.h
line diff
     1.1 --- a/BitKeeper/etc/ignore	Sat Jun 25 09:11:43 2005 +0000
     1.2 +++ b/BitKeeper/etc/ignore	Sat Jun 25 09:50:35 2005 +0000
     1.3 @@ -167,6 +167,7 @@ xen/include/asm-*/asm-offsets.h
     1.4  xen/include/hypervisor-ifs/arch
     1.5  xen/include/public/public
     1.6  xen/include/xen/*.new
     1.7 +xen/include/xen/acm_policy.h
     1.8  xen/include/xen/banner.h
     1.9  xen/include/xen/compile.h
    1.10  xen/tags
     2.1 --- a/xen/Makefile	Sat Jun 25 09:11:43 2005 +0000
     2.2 +++ b/xen/Makefile	Sat Jun 25 09:50:35 2005 +0000
     2.3 @@ -51,24 +51,40 @@ clean: delete-unfresh-files
     2.4  	rm -f include/asm *.o $(TARGET)* *~ core
     2.5  	rm -f include/asm-*/asm-offsets.h
     2.6  	rm -f tools/figlet/*.o tools/figlet/figlet
     2.7 +	rm -f include/xen/acm_policy.h
     2.8  
     2.9  $(TARGET): delete-unfresh-files
    2.10  	$(MAKE) include/xen/compile.h
    2.11 +	$(MAKE) include/xen/acm_policy.h
    2.12  	[ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
    2.13  	$(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
    2.14  	$(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
    2.15  	$(MAKE) -C common
    2.16  	$(MAKE) -C drivers
    2.17 -ifdef ACM_USE_SECURITY_POLICY
    2.18 +ifneq ($(ACM_USE_SECURITY_POLICY),ACM_NULL_POLICY)
    2.19  	$(MAKE) -C acm
    2.20  endif
    2.21  	$(MAKE) -C arch/$(TARGET_ARCH)
    2.22  
    2.23 -# drivers/char/console.o may contain static banner/compile info. Blow it away.
    2.24 +# drivers/char/console.o contains static banner/compile info. Blow it away.
    2.25  delete-unfresh-files:
    2.26  	rm -f include/xen/banner.h include/xen/compile.h drivers/char/console.o
    2.27  	$(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files
    2.28  
    2.29 +# acm_policy.h contains security policy for Xen
    2.30 +include/xen/acm_policy.h:
    2.31 +	@(set -e; \
    2.32 +	  echo "/*"; \
    2.33 +	  echo " * DO NOT MODIFY."; \
    2.34 +	  echo " *"; \
    2.35 +	  echo " * This file was auto-generated by xen/Makefile $<"; \
    2.36 +	  echo " *"; \
    2.37 +	  echo " */"; \
    2.38 +	  echo ""; \
    2.39 +	  echo "#ifndef ACM_USE_SECURITY_POLICY"; \
    2.40 +	  echo "#define ACM_USE_SECURITY_POLICY $(ACM_USE_SECURITY_POLICY)"; \
    2.41 +	  echo "#endif") >$@
    2.42 +
    2.43  # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
    2.44  include/xen/compile.h: LANG=C
    2.45  include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
     3.1 --- a/xen/Rules.mk	Sat Jun 25 09:11:43 2005 +0000
     3.2 +++ b/xen/Rules.mk	Sat Jun 25 09:50:35 2005 +0000
     3.3 @@ -1,4 +1,7 @@
     3.4 -
     3.5 +#
     3.6 +# If you change any of these configuration options then you must
     3.7 +# 'make clean' before rebuilding.
     3.8 +#
     3.9  verbose     ?= n
    3.10  debug       ?= n
    3.11  perfc       ?= n
    3.12 @@ -8,6 +11,14 @@ optimize    ?= y
    3.13  domu_debug  ?= n
    3.14  crash_debug ?= n
    3.15  
    3.16 +# ACM_USE_SECURITY_POLICY is set to security policy of Xen
    3.17 +# Supported models are:
    3.18 +#	ACM_NULL_POLICY (ACM will not be built with this policy)
    3.19 +#	ACM_CHINESE_WALL_POLICY
    3.20 +#	ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY
    3.21 +#	ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY
    3.22 +ACM_USE_SECURITY_POLICY ?= ACM_NULL_POLICY
    3.23 +
    3.24  include $(BASEDIR)/../Config.mk
    3.25  
    3.26  # Set ARCH/SUBARCH appropriately.
    3.27 @@ -35,7 +46,7 @@ OBJS    += $(patsubst %.c,%.o,$(C_SRCS))
    3.28  ALL_OBJS := $(BASEDIR)/common/common.o
    3.29  ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
    3.30  ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
    3.31 -ifdef ACM_USE_SECURITY_POLICY
    3.32 +ifneq ($(ACM_USE_SECURITY_POLICY),ACM_NULL_POLICY)
    3.33  ALL_OBJS += $(BASEDIR)/acm/acm.o
    3.34  endif
    3.35  ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
     4.1 --- a/xen/include/public/acm.h	Sat Jun 25 09:11:43 2005 +0000
     4.2 +++ b/xen/include/public/acm.h	Sat Jun 25 09:50:35 2005 +0000
     4.3 @@ -22,8 +22,8 @@
     4.4   * todo: move from static policy choice to compile option.
     4.5   */
     4.6  
     4.7 -#ifndef _XEN_PUBLIC_SHYPE_H
     4.8 -#define _XEN_PUBLIC_SHYPE_H
     4.9 +#ifndef _XEN_PUBLIC_ACM_H
    4.10 +#define _XEN_PUBLIC_ACM_H
    4.11  
    4.12  #include "xen.h"
    4.13  #include "sched_ctl.h"
    4.14 @@ -71,10 +71,6 @@
    4.15  	(X == ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY) ? "CHINESE WALL AND SIMPLE TYPE ENFORCEMENT policy" : \
    4.16  	"UNDEFINED policy"
    4.17  
    4.18 -#ifndef ACM_USE_SECURITY_POLICY
    4.19 -#define ACM_USE_SECURITY_POLICY ACM_NULL_POLICY
    4.20 -#endif
    4.21 -
    4.22  /* defines a ssid reference used by xen */
    4.23  typedef u32 ssidref_t;
    4.24