qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/5] Add SCM_RIGHTS support to unix socket chara


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 2/5] Add SCM_RIGHTS support to unix socket character devices
Date: Wed, 08 Jul 2009 21:17:55 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2

On 07/08/2009 09:11 PM, Anthony Liguori wrote:
Mark McLoughlin wrote:
It only makes sense to have one per getfd command and ...

It would be silly to pass many fds. fds are scarce resources and you don't want to get into a position where you're queuing fds.

If you issue N getfd commands, you've queued N fds.

If a management tool wants to send an fd, it should issue the monitor command that needs the fd along with the fd via SCM_RIGHTS, and then wait for that command to complete before issuing another command that needs an fd.


Why impose unnecessary restrictions? I agree that the guest shouldn't use qemu as an fd store. But putting such limits in the code is laying a trap for the client, which will show up in rare cases, for example two client threads issuing unrelated getfd commands with the client author not knowing it should serialize them.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]