qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Corey Bryant <coreyb@linux.vnet.ibm.com>
Cc: kwolf@redhat.com, libvir-list@redhat.com, qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <5075ED80.3050202@redhat.com> (raw)
In-Reply-To: <1349878805-16352-2-git-send-email-coreyb@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

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   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 617 bytes --]

  reply	other threads:[~2012-10-10 21:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-10 14:20 [Qemu-devel] [PATCH v2 0/3] command line fd passing using fd sets Corey Bryant
2012-10-10 14:20 ` [Qemu-devel] [PATCH v2 1/3] monitor: Allow add-fd to any specified fd set Corey Bryant
2012-10-10 21:49   ` Eric Blake [this message]
2012-10-11 14:29     ` Corey Bryant
2012-10-10 14:20 ` [Qemu-devel] [PATCH v2 2/3] monitor: Enable adding an inherited fd to an " Corey Bryant
2012-10-10 22:01   ` Eric Blake
2012-10-11 14:30     ` Corey Bryant
2012-10-11 11:25   ` Kevin Wolf
2012-10-11 15:04     ` Corey Bryant
2012-10-12  8:30       ` Kevin Wolf
2012-10-10 14:20 ` [Qemu-devel] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option Corey Bryant
2012-10-10 22:31   ` Eric Blake
2012-10-11 14:45     ` Corey Bryant
2012-10-11 15:55       ` Eric Blake
2012-10-11 17:36         ` Corey Bryant
2012-10-11 16:04     ` [Qemu-devel] [libvirt] " Eric Blake
2012-10-11 16:11       ` Eric Blake
2012-10-11 17:49       ` Corey Bryant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5075ED80.3050202@redhat.com \
    --to=eblake@redhat.com \
    --cc=coreyb@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).