From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Sergey Dyasli <sergey.dyasli@citrix.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>,
Xin Li <xin.li@citrix.com>, Ming Lu <ming.lu@citrix.com>,
Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: [PATCH 2/2] xen/xsm: Rename CONIFIG_XSM_POLICY to CONFIG_XSM_FLASK_POLICY
Date: Tue, 26 Jun 2018 12:09:08 +0100 [thread overview]
Message-ID: <1530011348-4852-3-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1530011348-4852-1-git-send-email-andrew.cooper3@citrix.com>
The embedded policy is specific flask, so update the infrastructure to reflect
this.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Daniel De Graaf <dgdegra@tycho.nsa.gov>
CC: George Dunlap <George.Dunlap@eu.citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Tim Deegan <tim@xen.org>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Sergey Dyasli <sergey.dyasli@citrix.com>
CC: Xin Li <xin.li@citrix.com>
CC: Ming Lu <ming.lu@citrix.com>
---
xen/common/Kconfig | 6 +++---
xen/include/xsm/xsm.h | 6 +++---
xen/xsm/flask/Makefile | 2 +-
xen/xsm/flask/gen-policy.py | 4 ++--
xen/xsm/xsm_core.c | 6 +++---
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 0f15f72..068c320 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -127,10 +127,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
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 1be3d63..70e7a68 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -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_init_flask_policy[];
+extern const unsigned int xsm_init_flask_policy_size;
#endif
#else /* CONFIG_XSM */
diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
index e22ed7c..f5ffab1 100644
--- a/xen/xsm/flask/Makefile
+++ b/xen/xsm/flask/Makefile
@@ -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)
diff --git a/xen/xsm/flask/gen-policy.py b/xen/xsm/flask/gen-policy.py
index 5168d6e..64a79d6 100644
--- a/xen/xsm/flask/gen-policy.py
+++ b/xen/xsm/flask/gen-policy.py
@@ -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_init_flask_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_init_flask_policy_size = %d;
""" % policy_size)
diff --git a/xen/xsm/xsm_core.c b/xen/xsm/xsm_core.c
index 949dfcf..cddcf7a 100644
--- a/xen/xsm/xsm_core.c
+++ b/xen/xsm/xsm_core.c
@@ -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_init_flask_policy;
+ policy_size = xsm_init_flask_policy_size;
}
#endif
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-06-26 11:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 11:09 [PATCH 0/2] xen/xsm: Cleanup in preparation for XSM SILO mode Andrew Cooper
2018-06-26 11:09 ` [PATCH 1/2] xen/xsm: Rename CONFIG_FLASK_* to CONFIG_XSM_FLASK_* Andrew Cooper
2018-06-27 21:21 ` Doug Goldstein
2018-08-17 18:49 ` Daniel De Graaf
2018-06-26 11:09 ` Andrew Cooper [this message]
2018-06-27 21:24 ` [PATCH 2/2] xen/xsm: Rename CONFIG_XSM_POLICY to CONFIG_XSM_FLASK_POLICY Doug Goldstein
2018-08-17 18:57 ` [PATCH 2/2] xen/xsm: Rename CONIFIG_XSM_POLICY " Daniel De Graaf
2018-08-17 23:40 ` Andrew Cooper
2018-06-26 12:04 ` [PATCH 0/2] xen/xsm: Cleanup in preparation for XSM SILO mode Jan Beulich
2018-06-26 12:42 ` Andrew Cooper
2018-06-26 13:16 ` Jan Beulich
2018-06-27 21:19 ` Doug Goldstein
2018-06-27 23:06 ` Andrew Cooper
2018-08-16 12:46 ` Andrew Cooper
2018-08-16 12:56 ` Jan Beulich
2018-08-16 13:18 ` Andrew Cooper
2018-08-16 13:46 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530011348-4852-3-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=ming.lu@citrix.com \
--cc=sergey.dyasli@citrix.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=xin.li@citrix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).