[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/3] monitor: Allow add-fd to any specified f
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/3] monitor: Allow add-fd to any specified fd set |
Date: |
Wed, 10 Oct 2012 15:49:52 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
On 10/10/2012 08:20 AM, Corey Bryant wrote:
> The first call to add an fd to an fd set was previously not
> allowed to choose the fd set ID. The ID was generated as
> the first available and ensuing calls could add more fds by
> specifying the fd set ID. This change allows users to
> choose the fd set ID on the first call.
Unfortunately, it now allows the user to choose arbitrary integer set
ids with large gaps, where previously, the user could only influence set
ids by populating all intermediate ids. That is, before this patch, a
user would have to create 1000000 sets to have an id of 1000000 (if they
didn't run out of memory first on all the earlier sets), but now they
can have an id that large with just one set. Or, taken further,
previously, a user request of -9223372036854775808 would likely fail (if
not, how beefy is your machine?), but now it can succeed and cause
confusion because of integer wraparound. Arbitrary set ids is not
necessarily bad, but I think you need to add bounds-checking on the
user's requested fdset_id to make sure it is positive.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 0/3] command line fd passing using fd sets, Corey Bryant, 2012/10/10
- [Qemu-devel] [PATCH v2 2/3] monitor: Enable adding an inherited fd to an fd set, Corey Bryant, 2012/10/10
- [Qemu-devel] [PATCH v2 1/3] monitor: Allow add-fd to any specified fd set, Corey Bryant, 2012/10/10
- Re: [Qemu-devel] [PATCH v2 1/3] monitor: Allow add-fd to any specified fd set,
Eric Blake <=
- [Qemu-devel] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option, Corey Bryant, 2012/10/10
- Re: [Qemu-devel] [libvirt] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option, Eric Blake, 2012/10/11
- Re: [Qemu-devel] [libvirt] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option, Eric Blake, 2012/10/11
- Re: [Qemu-devel] [libvirt] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option, Corey Bryant, 2012/10/11