From: Wei Liu Subject: Re: [PATCH v2 4/6] tools: Expose XSM Flask initial SIDs list to tools Date: Tue, 19 May 2015 16:48:43 +0100 Message-ID: <20150519154843.GL26335@zion.uk.xensource.com> References: <1432043061.12989.129.camel@citrix.com> <1432043078-30736-4-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1432043078-30736-4-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: ian.jackson@eu.citrix.com, Daniel De Graaf , wei.liu2@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, May 19, 2015 at 02:44:36PM +0100, Ian Campbell wrote: > By generating tools/include/xen-xsm/flask/flask.h using the same tool > as used during the hypervisor build. > > Note that this is done regardless of whether XSM is enabled, since we > want the tools to be agnostic to whether or not XSM is enabled in the > hypervisor > > Signed-off-by: Ian Campbell Acked-by: Wei Liu > --- > .gitignore | 1 + > tools/include/Makefile | 16 ++++++++++++++-- > 2 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/.gitignore b/.gitignore > index c6185a0..3bc9cd9 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -147,6 +147,7 @@ tools/hotplug/Linux/xen-hotplug-common.sh > tools/hotplug/Linux/xendomains > tools/hotplug/NetBSD/rc.d/xencommons > tools/include/xen/* > +tools/include/xen-xsm/* > tools/include/xen-foreign/*.(c|h|size) > tools/include/xen-foreign/checker > tools/libxl/libxlu_cfg_y.output > diff --git a/tools/include/Makefile b/tools/include/Makefile > index 601f79c..869b3f3 100644 > --- a/tools/include/Makefile > +++ b/tools/include/Makefile > @@ -1,8 +1,11 @@ > XEN_ROOT = $(CURDIR)/../.. > include $(XEN_ROOT)/tools/Rules.mk > > +# Relative to $(XEN_ROOT)/xen/xsm/flask > +FLASK_H_DEPEND := policy/initial_sids > + > .PHONY: all > -all: xen-foreign xen/.dir > +all: xen-foreign xen/.dir xen-xsm/.dir > > .PHONY: xen-foreign > xen-foreign: > @@ -19,6 +22,15 @@ xen/.dir: > ln -s ../xen-foreign xen/foreign > touch $@ > > +# Not xen/xsm as that clashes with link to > +# $(XEN_ROOT)/xen/include/public/xsm above. > +xen-xsm/.dir: $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh \ > + $(patsubst %,$(XEN_ROOT)/xen/xsm/flask/%,$(FLASK_H_DEPEND)) > + mkdir -p xen-xsm/flask > + cd $(XEN_ROOT)/xen/xsm/flask/ && \ > + $(SHELL) policy/mkflask.sh $(AWK) $(CURDIR)/xen-xsm/flask $(FLASK_H_DEPEND) > + touch $@ > + > .PHONY: install > install: all > $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86 > @@ -47,7 +59,7 @@ install: all > > .PHONY: clean > clean: > - rm -rf xen > + rm -rf xen xen-xsm > $(MAKE) -C xen-foreign clean > > > -- > 1.7.10.4