xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Jim Fehlig <jfehlig@suse.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] tools: Restrict configuration of qemu processes
Date: Tue, 15 Mar 2016 12:28:40 +0000	[thread overview]
Message-ID: <20160315122840.GB31759@citrix.com> (raw)
In-Reply-To: <56E761E4.5020708@suse.com>

On Mon, Mar 14, 2016 at 07:14:12PM -0600, Jim Fehlig wrote:
> Opps, forgot to cc the tools maintainers, sorry. I can resend if needed.
> 
> Regards,
> Jim
> 
> On 03/14/2016 07:08 PM, Jim Fehlig wrote:
> > Commit 6ef823fd added '-nodefaults' to the qemu args created by
> > libxl, which is a good step in restricting qemu's default
> > configuration. This change takes another step by adding
> > -no-user-config, which ignores any user-provided config files in
> > sysconfdir. Together, -nodefaults and -no-user-config allow Xen
> > to avoid unkown and uncontrolled qemu configuration.
> >
> > Both options are also added to the qemu invocation in the
> > xen-qemu-dom0-disk-backend systemd service file.
> >
> > Signed-off-by: Jim Fehlig <jfehlig@suse.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> > ---
> >  tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 1 +
> >  tools/libxl/libxl_dm.c                                            | 6 ++++++
> >  2 files changed, 7 insertions(+)
> >
> > diff --git a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
> > index acf61a8..f56775b 100644
> > --- a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
> > +++ b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
> > @@ -14,6 +14,7 @@ ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
> >  ExecStart=@qemu_xen_systemd@ -xen-domid 0 \
> >  	-xen-attach -name dom0 -nographic -M xenpv -daemonize \
> >  	-monitor /dev/null -serial /dev/null -parallel /dev/null \
> > +	-nodefaults -no-user-config \
> >  	-pidfile @XEN_RUN_DIR@/qemu-dom0.pid
> >  
> >  [Install]
> > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> > index 4aca38e..cfda24c 100644
> > --- a/tools/libxl/libxl_dm.c
> > +++ b/tools/libxl/libxl_dm.c
> > @@ -828,6 +828,12 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
> >       */
> >      flexarray_append(dm_args, "-nodefaults");
> >  
> > +    /*
> > +     * Do not use any of the user-provided config files in sysconfdir,
> > +     * avoiding unkown and uncontrolled configuration.
> > +     */
> > +    flexarray_append(dm_args, "-no-user-config");
> > +
> >      if (b_info->type == LIBXL_DOMAIN_TYPE_PV) {
> >          flexarray_append(dm_args, "-xen-attach");
> >      }
> 

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

  reply	other threads:[~2016-03-15 12:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15  1:08 Jim Fehlig
2016-03-15  1:14 ` Jim Fehlig
2016-03-15 12:28   ` Wei Liu [this message]
2016-03-22 20:12     ` Jim Fehlig
2016-03-24 13:53 ` Ian Jackson
2016-05-09 16:35   ` Ian Jackson
2016-05-09 22:37     ` Jim Fehlig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160315122840.GB31759@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=jfehlig@suse.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    --subject='Re: [PATCH] tools: Restrict configuration of qemu processes' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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