[libvirt] [PATCH 1/3] utils: Implement virCommandPassFDGetFDIndex
Martin Kletzander
mkletzan at redhat.com
Wed Feb 25 13:58:21 UTC 2015
On Wed, Feb 25, 2015 at 06:03:40AM -0700, Eric Blake wrote:
>On 02/24/2015 09:52 PM, Martin Kletzander wrote:
>
>>> The problem of having to prevent the reordering of file descriptors
>>> when we are building the QEMU command line with file descriptors
>>> already exists today. So maybe I could just remove this flag and the
>>> related check knowing that reordering of file descriptors and building
>>> the QEMU command line that contains file descriptor (from before the
>>> order) would not be allowed today without any of the patches I am
>>> trying to add.
>>>
>>
>> You surely and safely can. The point behind reordering FDs was that
>> when you're using FD passing as done by systemd, those FDs passed must
>> start from number 3. However, because we are already passing a bunch
>> of file descriptors to QEMU and other commands, we *must not* reorder
>> any file descriptors because it wouldn't work, of course.
>
>Or we fix the code to ALWAYS reorder file descriptors, including
>updating the qemu code to use the reordered numbers instead of assuming
>unchanged passthrough. I'm still in the middle of an audit in my local
>code base of what that would entail.
>
I'd be really afraid of that. Not because I wrote the reorder code
but mainly because the added one would just add a lot of renumbering
that seems pointless to me. Also the reordering is just a hack to
make LISTEN_FDS work and I see no other usable case for it.
>
>--
>Eric Blake eblake redhat com +1-919-301-3266
>Libvirt virtualization library http://libvirt.org
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150225/b1ab148e/attachment-0001.sig>
More information about the libvir-list
mailing list