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@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list