xen/xsm: Rename CONFIG_XSM_POLICY to CONFIG_XSM_FLASK_POLICY
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 26 Jun 2018 09:59:10 +0000 (10:59 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 Aug 2018 13:17:11 +0000 (14:17 +0100)
The embedded policy is specifically a flask policy, so update the
infrastructure to reflect this.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
xen/common/Kconfig
xen/include/xsm/xsm.h
xen/xsm/flask/Makefile
xen/xsm/flask/gen-policy.py
xen/xsm/xsm_core.c

index 3a7c752e931cf4bcc5e6e5bab32e00a6768f1d56..1a6d6281c15a02635435a757759c6d8cf1b2a541 100644 (file)
@@ -138,10 +138,10 @@ config XSM_FLASK_AVC_STATS
 
          If unsure, say Y.
 
-config XSM_POLICY
-       bool "Compile Xen with a built-in security policy"
+config XSM_FLASK_POLICY
+       bool "Compile Xen with a built-in FLASK security policy"
        default y if HAS_CHECKPOLICY = "y"
-       depends on XSM
+       depends on XSM_FLASK
        ---help---
          This includes a default XSM policy in the hypervisor so that the
          bootloader does not need to load a policy to get sane behavior from an
index b692aece711e615f73a073645a12347c01e5f430..3d67962493042810737d13271b38dae81cf0a8d0 100644 (file)
@@ -728,9 +728,9 @@ static inline void flask_init(const void *policy_buffer, size_t policy_size)
 }
 #endif
 
-#ifdef CONFIG_XSM_POLICY
-extern const unsigned char xsm_init_policy[];
-extern const unsigned int xsm_init_policy_size;
+#ifdef CONFIG_XSM_FLASK_POLICY
+extern const unsigned char xsm_flask_init_policy[];
+extern const unsigned int xsm_flask_init_policy_size;
 #endif
 
 #else /* CONFIG_XSM */
index e22ed7c03fd826d43548c3d457a735b882d6b85d..f5ffab12268c65eea39a37a81a8c39e18d6db317 100644 (file)
@@ -27,7 +27,7 @@ $(FLASK_H_FILES): $(FLASK_H_DEPEND)
 $(AV_H_FILES): $(AV_H_DEPEND)
        $(CONFIG_SHELL) policy/mkaccess_vector.sh $(AWK) $(AV_H_DEPEND)
 
-obj-$(CONFIG_XSM_POLICY) += policy.o
+obj-$(CONFIG_XSM_FLASK_POLICY) += policy.o
 
 FLASK_BUILD_DIR := $(CURDIR)
 POLICY_SRC := $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION)
index 5168d6ed1d9862cbb2d1dcb511702e7044d39285..c7501e4614680fcbdd764f0219b94fbc8182513a 100644 (file)
@@ -8,7 +8,7 @@ sys.stdout.write("""
 #include <xen/init.h>
 #include <xsm/xsm.h>
 
-const unsigned char xsm_init_policy[] __initconst = {
+const unsigned char xsm_flask_init_policy[] __initconst = {
 """)
 
 for char in sys.stdin.read():
@@ -19,5 +19,5 @@ for char in sys.stdin.read():
 
 sys.stdout.write("""
 };
-const unsigned int __initconst xsm_init_policy_size = %d;
+const unsigned int __initconst xsm_flask_init_policy_size = %d;
 """ % policy_size)
index 949dfcff75766709cf7664231800fb745e609fd3..9645e244c3dd8c90b6f2e77fcfca0769ba503704 100644 (file)
@@ -42,11 +42,11 @@ static inline int verify(struct xsm_operations *ops)
 
 static int __init xsm_core_init(const void *policy_buffer, size_t policy_size)
 {
-#ifdef CONFIG_XSM_POLICY
+#ifdef CONFIG_XSM_FLASK_POLICY
     if ( policy_size == 0 )
     {
-        policy_buffer = xsm_init_policy;
-        policy_size = xsm_init_policy_size;
+        policy_buffer = xsm_flask_init_policy;
+        policy_size = xsm_flask_init_policy_size;
     }
 #endif