[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] xen/xsm: Reduce compiler command line clutter



>>> On 19.03.14 at 20:18, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> wrote:
> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -47,8 +47,6 @@ 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

Removing even the -DFLASK_ENABLE is inconsistent with
FLASK_ENABLE being configurable independently of
XSM_ENABLE in Config.mk. If it's really is impossible to build
with XSM enabled by FLASK disabled, then this should be
reflected there too. If that configuration is possible (e.g.
for someone wanting to implement/test another XSM
"plugin"), then you should retain the setting above.

> --- a/xen/include/xen/config.h
> +++ b/xen/include/xen/config.h
> @@ -98,4 +98,17 @@
>  #define __cpuinitdata
>  #define __cpuinit
>  
> +#ifdef XSM_ENABLE
> +/* FLASK is currently the only XSM provider, so always enable it if XSM is 
> enabled
> + */

That's not a valid reason - someone (see above) may want to
implement another one.

Also - coding style.

> --- a/xen/include/xsm/xsm.h
> +++ b/xen/include/xsm/xsm.h
> @@ -23,9 +23,6 @@ DEFINE_XEN_GUEST_HANDLE(xsm_op_t);
>  
>  /* policy magic number (defined by XSM_MAGIC) */
>  typedef u32 xsm_magic_t;
> -#ifndef XSM_MAGIC
> -#define XSM_MAGIC 0x00000000
> -#endif

This would then also need to be retained I suppose.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.