From: Daniel De Graaf Date: Mon, 24 Mar 2014 09:54:27 +0000 (+0100) Subject: xsm: Reduce compiler command line clutter X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5350 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=98bef9974d9b39fbb7d052c50db950435f0b2513;p=xen.git xsm: Reduce compiler command line clutter 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 Reviewed-by: Jan Beulich Acked-by: Keir Fraser --- diff --git a/xen/Rules.mk b/xen/Rules.mk index 3a6cec5487..42c713fa35 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 8bae6e6488..7bef8a648d 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__ */