xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] xen/xsm: Reduce compiler command line clutter
@ 2014-03-20 15:29 Daniel De Graaf
  2014-03-20 15:29 ` [PATCH v2 2/2] xen/evtchn: optimize XSM ssid field Daniel De Graaf
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Daniel De Graaf @ 2014-03-20 15:29 UTC (permalink / raw)
  To: xen-devel; +Cc: Daniel De Graaf, Keir Fraser, Jan Beulich

Move the preprocessor definitions for all FLASK parameters other than
the enable flag off the compiler command line and into config.h, which
is the preferred location for such definitions.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>

---
Changes from v1: Leave FLASK_ENABLE on the command line to retain the
ability to turn off FLASK while leaving XSM enabled.

 xen/Rules.mk             |  3 +--
 xen/include/xen/config.h | 10 ++++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 3a6cec5..42c713f 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -47,8 +47,7 @@ CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
 CFLAGS += -nostdinc
 
 CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE
-CFLAGS-$(FLASK_ENABLE)  += -DFLASK_ENABLE -DXSM_MAGIC=0xf97cff8c
-CFLAGS-$(FLASK_ENABLE)  += -DFLASK_DEVELOP -DFLASK_BOOTPARAM -DFLASK_AVC_STATS
+CFLAGS-$(FLASK_ENABLE)  += -DFLASK_ENABLE
 CFLAGS-$(verbose)       += -DVERBOSE
 CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h
index 8bae6e6..7bef8a6 100644
--- a/xen/include/xen/config.h
+++ b/xen/include/xen/config.h
@@ -98,4 +98,14 @@
 #define __cpuinitdata
 #define __cpuinit
 
+#ifdef FLASK_ENABLE
+#define XSM_MAGIC 0xf97cff8c
+/* Enable permissive mode (xl setenforce or flask_enforcing parameter) */
+#define FLASK_DEVELOP 1
+/* Allow runtime disabling of FLASK via the flask_enable parameter */
+#define FLASK_BOOTPARAM 1
+/* Maintain statistics on the access vector cache */
+#define FLASK_AVC_STATS 1
+#endif
+
 #endif /* __XEN_CONFIG_H__ */
-- 
1.8.5.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-03-24 10:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-20 15:29 [PATCH v2 1/2] xen/xsm: Reduce compiler command line clutter Daniel De Graaf
2014-03-20 15:29 ` [PATCH v2 2/2] xen/evtchn: optimize XSM ssid field Daniel De Graaf
2014-03-20 15:59   ` Jan Beulich
2014-03-21 13:28   ` David Vrabel
2014-03-21 14:54     ` Daniel De Graaf
2014-03-21 15:00       ` Jan Beulich
2014-03-21 15:16       ` David Vrabel
2014-03-21 17:43         ` Daniel De Graaf
2014-03-24  8:38           ` Jan Beulich
2014-03-24 10:53             ` David Vrabel
2014-03-24  9:07   ` Keir Fraser
2014-03-20 15:54 ` [PATCH v2 1/2] xen/xsm: Reduce compiler command line clutter Jan Beulich
2014-03-24  9:05 ` Keir Fraser

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).