[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outs
From: |
Wei Xu |
Subject: |
[Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket |
Date: |
Wed, 22 Jun 2016 23:24:53 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
There has been comments on this patch, but i forgot adding this patch to
the list, just forward it again.
Recently I'm working on a fd passing issue, selinux forbids qemu to
create a unix socket for a chardev when managing VMs with libvirt,
because qemu don't have sufficient permissions in this case, and
proposal from libvirt team is opening the 'fd' in libvirt and merely
passing it to qemu.
I finished a RFC patch for Unix socket after a glance of the code,
and not sure if this is right or there maybe other side-effects,
please point me out.
I tested it for both server and client mode 'PF_UNIX' socket with a VM
running vhost-user.
Old command line:
-chardev socket,id=char0,path=/var/run/openvswitch/vhost-user1,server
New command line:
-chardev
socket,id=char0,path=/var/run/openvswitch/vhost-user1,server,sockfd=$n
because unix socket is bundled with a path, so it should be kept even
with the
'fd' is indicated, this looks odd, any comments?
Wei Xu (3):
chardev: add new socket fd parameter for unix socket
chardev: save the passed in 'fd' parameter during parsing
sockets: replace creating a new socket with the record one
qapi-schema.json | 3 ++-
qemu-char.c | 10 ++++++++++
util/qemu-sockets.c | 25 +++++++++++++++++--------
3 files changed, 29 insertions(+), 9 deletions(-)
--
2.7.1
- Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket, (continued)
- Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket, Michal Privoznik, 2016/06/13
- Message not available
- Message not available
- Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket, Wei Xu, 2016/06/14
- Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket, Daniel P. Berrange, 2016/06/14
- Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket, Aaron Conole, 2016/06/14
- Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket, Wei Xu, 2016/06/14
- Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket, Amnon Ilan, 2016/06/14
- Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket, Aaron Conole, 2016/06/14
- [Qemu-devel] Channel paths (was: Re: [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket), Sascha Silbe, 2016/06/02
- Message not available
- Re: [Qemu-devel] Channel paths (was: Re: [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket), Daniel P. Berrange, 2016/06/03
- Re: [Qemu-devel] Channel paths, Sascha Silbe, 2016/06/07
[Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket,
Wei Xu <=