Re: [Qemu-devel] [PATCH] add fd limitations for avoiding a buffer overflow

2013-01-28 Thread Paolo Bonzini
Il 25/01/2013 15:30, Stefan Hajnoczi ha scritto: > Anthony, Paolo: Is there an alternative to select(2)? I think this was > discussed a bit during the glib event loop integration. > > The two requirements I can think of are: > > 1. Portable so that we don't have to write OS-specific versions (ep

Re: [Qemu-devel] [PATCH] add fd limitations for avoiding a buffer overflow

2013-01-28 Thread Amos Kong
On Sun, Jan 27, 2013 at 01:41:57PM +0200, Michael S. Tsirkin wrote: > On Fri, Jan 25, 2013 at 04:14:49PM +0800, Amos Kong wrote: > > FD_SET() and FD_CLR() are used to add and remove one descriptor from a > > set, the 'fd' should be less than FD_SETSIZE. Glibc will give a warning > > and crash the q

Re: [Qemu-devel] [PATCH] add fd limitations for avoiding a buffer overflow

2013-01-27 Thread Michael S. Tsirkin
On Fri, Jan 25, 2013 at 04:14:49PM +0800, Amos Kong wrote: > FD_SET() and FD_CLR() are used to add and remove one descriptor from a > set, the 'fd' should be less than FD_SETSIZE. Glibc will give a warning > and crash the qemu when we set a fd (1024) to a set. > > # qemu -device virtio-net-pci,ne

Re: [Qemu-devel] [PATCH] add fd limitations for avoiding a buffer overflow

2013-01-25 Thread Stefan Hajnoczi
On Fri, Jan 25, 2013 at 04:14:49PM +0800, Amos Kong wrote: > FD_SET() and FD_CLR() are used to add and remove one descriptor from a > set, the 'fd' should be less than FD_SETSIZE. Glibc will give a warning > and crash the qemu when we set a fd (1024) to a set. > > # qemu -device virtio-net-pci,ne

Re: [Qemu-devel] [PATCH] add fd limitations for avoiding a buffer overflow

2013-01-25 Thread Markus Armbruster
Laszlo Ersek writes: > On 01/25/13 09:14, Amos Kong wrote: >> FD_SET() and FD_CLR() are used to add and remove one descriptor from a >> set, the 'fd' should be less than FD_SETSIZE. Glibc will give a warning >> and crash the qemu when we set a fd (1024) to a set. >> >> # qemu -device virtio-net

Re: [Qemu-devel] [PATCH] add fd limitations for avoiding a buffer overflow

2013-01-25 Thread Jason Wang
On 01/25/2013 04:14 PM, Amos Kong wrote: > FD_SET() and FD_CLR() are used to add and remove one descriptor from a > set, the 'fd' should be less than FD_SETSIZE. Glibc will give a warning > and crash the qemu when we set a fd (1024) to a set. > > # qemu -device virtio-net-pci,netdev=macvtap_netdev

Re: [Qemu-devel] [PATCH] add fd limitations for avoiding a buffer overflow

2013-01-25 Thread Laszlo Ersek
On 01/25/13 09:14, Amos Kong wrote: > FD_SET() and FD_CLR() are used to add and remove one descriptor from a > set, the 'fd' should be less than FD_SETSIZE. Glibc will give a warning > and crash the qemu when we set a fd (1024) to a set. > > # qemu -device virtio-net-pci,netdev=macvtap_netdev,mac

[Qemu-devel] [PATCH] add fd limitations for avoiding a buffer overflow

2013-01-25 Thread Amos Kong
FD_SET() and FD_CLR() are used to add and remove one descriptor from a set, the 'fd' should be less than FD_SETSIZE. Glibc will give a warning and crash the qemu when we set a fd (1024) to a set. # qemu -device virtio-net-pci,netdev=macvtap_netdev,mac=92:ff:8a:11:fe:57 -netdev tap,id=macvtap_n