Message ID | 1458155923-15648-1-git-send-email-cardoe@cardoe.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 3/16/16 2:18 PM, Doug Goldstein wrote: > Rather than have XSM_MAGIC set in the global xen/config.h and set in > xsm.h if it's unset, just set it once in xsm.h since its only used in > files that already include xsm.h > > Signed-off-by: Doug Goldstein <cardoe@cardoe.com> > --- > CC: Daniel De Graaf <dgdegra@tycho.nsa.gov> > --- > xen/include/xen/config.h | 1 - > xen/include/xsm/xsm.h | 7 +++++-- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h > index 96f5539..3f8c53d 100644 > --- a/xen/include/xen/config.h > +++ b/xen/include/xen/config.h > @@ -79,7 +79,6 @@ > #define STR(...) __STR(__VA_ARGS__) > > #ifdef CONFIG_FLASK > -#define XSM_MAGIC 0xf97cff8c > /* Maintain statistics on the access vector cache */ > #define FLASK_AVC_STATS 1 > #endif > diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h > index 3afed70..37a102a 100644 > --- a/xen/include/xsm/xsm.h > +++ b/xen/include/xsm/xsm.h > @@ -23,8 +23,11 @@ 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 > + > +#ifdef CONFIG_FLASK > +#define XSM_MAGIC 0xf97cff8c > +#else > +#define XSM_MAGIC 0x0 > #endif > > /* These annotations are used by callers and in dummy.h to document the > ping?
On 03/16/2016 03:18 PM, Doug Goldstein wrote: > Rather than have XSM_MAGIC set in the global xen/config.h and set in > xsm.h if it's unset, just set it once in xsm.h since its only used in > files that already include xsm.h > > Signed-off-by: Doug Goldstein <cardoe@cardoe.com> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
On Fri, Mar 25, 2016 at 11:07:19AM -0400, Daniel De Graaf wrote: > On 03/16/2016 03:18 PM, Doug Goldstein wrote: > >Rather than have XSM_MAGIC set in the global xen/config.h and set in > >xsm.h if it's unset, just set it once in xsm.h since its only used in > >files that already include xsm.h > > > >Signed-off-by: Doug Goldstein <cardoe@cardoe.com> > > Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Both patches applied. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h index 96f5539..3f8c53d 100644 --- a/xen/include/xen/config.h +++ b/xen/include/xen/config.h @@ -79,7 +79,6 @@ #define STR(...) __STR(__VA_ARGS__) #ifdef CONFIG_FLASK -#define XSM_MAGIC 0xf97cff8c /* Maintain statistics on the access vector cache */ #define FLASK_AVC_STATS 1 #endif diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index 3afed70..37a102a 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -23,8 +23,11 @@ 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 + +#ifdef CONFIG_FLASK +#define XSM_MAGIC 0xf97cff8c +#else +#define XSM_MAGIC 0x0 #endif /* These annotations are used by callers and in dummy.h to document the
Rather than have XSM_MAGIC set in the global xen/config.h and set in xsm.h if it's unset, just set it once in xsm.h since its only used in files that already include xsm.h Signed-off-by: Doug Goldstein <cardoe@cardoe.com> --- CC: Daniel De Graaf <dgdegra@tycho.nsa.gov> --- xen/include/xen/config.h | 1 - xen/include/xsm/xsm.h | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-)