Re: [Qemu-devel] [PATCH 2/4] nbd: Limit nbdflags to 16 bits

2016-08-01 Thread Paolo Bonzini
On 01/08/2016 13:43, Eric Blake wrote: > On 08/01/2016 03:17 AM, Paolo Bonzini wrote: >> >> >> On 21/07/2016 21:34, Eric Blake wrote: >>> Furthermore, upstream NBD has never passed the global flags to >>> the kernel via ioctl(NBD_SET_FLAGS) (the ioctl was first >>> introduced in NBD 2.9.22; then

Re: [Qemu-devel] [PATCH 2/4] nbd: Limit nbdflags to 16 bits

2016-08-01 Thread Eric Blake
On 08/01/2016 03:17 AM, Paolo Bonzini wrote: > > > On 21/07/2016 21:34, Eric Blake wrote: >> Furthermore, upstream NBD has never passed the global flags to >> the kernel via ioctl(NBD_SET_FLAGS) (the ioctl was first >> introduced in NBD 2.9.22; then a latent bug in NBD 3.1 actually >> tried to OR

Re: [Qemu-devel] [PATCH 2/4] nbd: Limit nbdflags to 16 bits

2016-08-01 Thread Paolo Bonzini
On 21/07/2016 21:34, Eric Blake wrote: > Furthermore, upstream NBD has never passed the global flags to > the kernel via ioctl(NBD_SET_FLAGS) (the ioctl was first > introduced in NBD 2.9.22; then a latent bug in NBD 3.1 actually > tried to OR the global flags with the transmission flags, with > t

[Qemu-devel] [PATCH 2/4] nbd: Limit nbdflags to 16 bits

2016-07-21 Thread Eric Blake
Rather than asserting that nbdflags is within range, just give it the correct type to begin with :) nbdflags corresponds to the per-export portion of NBD Protocol "transmission flags", which is 16 bits in response to NBD_OPT_EXPORT_NAME and NBD_OPT_GO. Furthermore, upstream NBD has never passed t