From: Wei Liu Subject: Re: [PATCH v7] run QEMU as non-root Date: Fri, 7 Aug 2015 16:36:53 +0100 Message-ID: <20150807153652.GX6005@zion.uk.xensource.com> References: <1437671282-29517-1-git-send-email-stefano.stabellini@eu.citrix.com> <55B62FFC.9070903@m2r.biz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <55B62FFC.9070903@m2r.biz> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Fabio Fantoni Cc: Ian.Jackson@eu.citrix.com, xen-devel@lists.xensource.com, wei.liu2@citrix.com, ian.campbell@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Mon, Jul 27, 2015 at 03:19:56PM +0200, Fabio Fantoni wrote: > Il 23/07/2015 19:08, Stefano Stabellini ha scritto: > >Try to use "xen-qemudepriv-domid$domid" first, then > >"xen-qemudepriv-shared" and root if everything else fails. > > > >The uids need to be manually created by the user or, more likely, by the > >xen package maintainer. > > > >Expose a device_model_user setting in libxl_domain_build_info, so that > >opinionated callers, such as libvirt, can set any user they like. Do not > >fall back to root if device_model_user is set. > > > >QEMU is going to setuid and setgid to the user ID and the group ID of > >the specified user, soon after initialization, before starting to deal > >with any guest IO. > > > >To actually secure QEMU when running in Dom0, we need at least to > >deprivilege the privcmd and xenstore interfaces, this is just the first > >step in that direction. > > > >Signed-off-by: Stefano Stabellini > > Thanks for this patch, now I'll test it. > I think can be good add also domU's xl cfg parameter for set custom user to > use instead make possible only in libxl from external tools, is possible to > add it? It looks trivial to me. The hardest part would be picking a name for the new option and writing that down in manpage. :-) Wei.