[Qemu-block] [PATCH 2/2] HACK: define NBD_SERVER_DEBUG to force malicious server

2017-08-10 Thread Eric Blake
--- nbd/server.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/nbd/server.c b/nbd/server.c index 82a78bf439..d6fbd46370 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -919,6 +919,17 @@ static int nbd_send_reply(QIOChannel *ioc, NBDReply *reply, Error **errp) stl_be_p(buf

[Qemu-block] [PATCH 1/2] nbd: Drop connection if broken server is detected

2017-08-10 Thread Eric Blake
As soon as the server is sending us garbage, we should quit trying to send further messages to the server, and allow all pending coroutines for any remaining replies to error out. Failure to do so can let a malicious server cause the client to hang, for example, if the server sends an invalid

[Qemu-block] [PATCH] nbd: Fix trace message for disconnect

2017-08-10 Thread Eric Blake
NBD_CMD_DISC is a disconnect request, not a data discard request. Signed-off-by: Eric Blake --- Although this is not 2.10 material in isolation (it is only a bad trace message), I don't mind including it in a larger pull request; I'm still planning to fix the issue of a

Re: [Qemu-block] [Qemu-devel] block replication

2017-08-10 Thread Xie Changlong
在 8/10/2017 8:26 PM, Vladimir Sementsov-Ogievskiy 写道: 09.08.2017 17:11, Vladimir Sementsov-Ogievskiy wrote: Hi Wen! I'm trying to understand block/replication code and have a question. Why should we block the region from intersecting cow requests when read? If I understand correctly

[Qemu-block] Block warning messages displayed while compiling

2017-08-10 Thread Programmingkid
Host info: Operating system: Mac OS 10.12.5 Compiler: Apple LLVM version 8.1.0 (clang-802.0.42) Command to reproduce: ./configure --target-list=ppc-softmmu,i386-softmmu && make -j 4 When compiling QEMU I see these warning messages: CC block/vdi.o block/qcow.c:138:19: warning: taking

Re: [Qemu-block] [PATCH 8/8] sockets: fix parsing of ipv4/ipv6 opts in parse_socket_addr

2017-08-10 Thread Eric Blake
On 08/10/2017 11:04 AM, Daniel P. Berrange wrote: > The inet_parse() function looks for 'ipv4' and 'ipv6' > flags, but only treats them as bare bool flags. The normal > QemuOpts parsing would allow on/off values to be set too. > > This updated inet_parse() so that its handling of the

Re: [Qemu-block] [PATCH 4/8] blockdev: convert qemu-nbd server to QIONetListener

2017-08-10 Thread Eric Blake
On 08/10/2017 11:04 AM, Daniel P. Berrange wrote: > Instead of creating a QIOChannelSocket directly for the NBD > server socket, use a QIONetListener. This provides the ability > to listen on multiple sockets at the same time, so enables > full support for IPv4/IPv6 dual stack. > > Signed-off-by:

Re: [Qemu-block] [PATCH 3/8] blockdev: convert internal NBD server to QIONetListener

2017-08-10 Thread Eric Blake
On 08/10/2017 11:04 AM, Daniel P. Berrange wrote: > Instead of creating a QIOChannelSocket directly for the NBD > server socket, use a QIONetListener. This provides the ability > to listen on multiple sockets at the same time, so enables > full support for IPv4/IPv6 dual stack. > > Signed-off-by:

Re: [Qemu-block] [PATCH 2/8] io: introduce a network socket listener API

2017-08-10 Thread Eric Blake
On 08/10/2017 11:04 AM, Daniel P. Berrange wrote: > The existing QIOChannelSocket class provides the ability to > listen on a single socket at a time. This patch introduces > a QIONetListener class that provides a higher level API > concept around listening for network services, allowing > for

Re: [Qemu-block] [PATCH v8 0/8] Optimize VMDK I/O by allocating multiple clusters

2017-08-10 Thread Stefan Hajnoczi
On Thu, Aug 10, 2017 at 9:18 AM, Ashijeet Acharya wrote: > On Thu, Aug 10, 2017 at 1:41 PM, Stefan Hajnoczi wrote: >> >> On Thu, Jul 27, 2017 at 3:33 PM, Ashijeet Acharya >> wrote: >> > Previously posted series patches:

Re: [Qemu-block] [Qemu-devel] [PATCH 0/8] Enable full IPv4/IPv6 dual stack support

2017-08-10 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20170810160451.32723-1-berra...@redhat.com Subject: [Qemu-devel] [PATCH 0/8] Enable full IPv4/IPv6 dual stack support Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-block] [Qemu-devel] [PATCH 0/8] Enable full IPv4/IPv6 dual stack support

2017-08-10 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 20170810160451.32723-1-berra...@redhat.com Subject: [Qemu-devel] [PATCH 0/8] Enable full IPv4/IPv6 dual stack

[Qemu-block] [PATCH 8/8] sockets: fix parsing of ipv4/ipv6 opts in parse_socket_addr

2017-08-10 Thread Daniel P. Berrange
The inet_parse() function looks for 'ipv4' and 'ipv6' flags, but only treats them as bare bool flags. The normal QemuOpts parsing would allow on/off values to be set too. This updated inet_parse() so that its handling of the 'ipv4' and 'ipv6' flags matches that done by QemuOpts. Signed-off-by:

[Qemu-block] [PATCH 7/8] ui: convert VNC server to QIONetListener

2017-08-10 Thread Daniel P. Berrange
The VNC server already has the ability to listen on multiple sockets. Converting it to use the QIONetListener APIs though, will reduce the amount of code in the VNC server and improve the clarity of what is left. Signed-off-by: Daniel P. Berrange --- ui/vnc.c | 194

[Qemu-block] [PATCH 3/8] blockdev: convert internal NBD server to QIONetListener

2017-08-10 Thread Daniel P. Berrange
Instead of creating a QIOChannelSocket directly for the NBD server socket, use a QIONetListener. This provides the ability to listen on multiple sockets at the same time, so enables full support for IPv4/IPv6 dual stack. Signed-off-by: Daniel P. Berrange --- blockdev-nbd.c

[Qemu-block] [PATCH 4/8] blockdev: convert qemu-nbd server to QIONetListener

2017-08-10 Thread Daniel P. Berrange
Instead of creating a QIOChannelSocket directly for the NBD server socket, use a QIONetListener. This provides the ability to listen on multiple sockets at the same time, so enables full support for IPv4/IPv6 dual stack. Signed-off-by: Daniel P. Berrange --- qemu-nbd.c | 50

[Qemu-block] [PATCH 1/8] tests: add functional test validating ipv4/ipv6 address flag handling

2017-08-10 Thread Daniel P. Berrange
The semantics around handling ipv4=on|off & ipv6=on|off are quite subtle to understand in combination with the various hostname addresses and backend types. Introduce a massive test matrix that launches QEMU and validates the ability to connect a client on each protocol as appropriate. The test

[Qemu-block] [PATCH 2/8] io: introduce a network socket listener API

2017-08-10 Thread Daniel P. Berrange
The existing QIOChannelSocket class provides the ability to listen on a single socket at a time. This patch introduces a QIONetListener class that provides a higher level API concept around listening for network services, allowing for listening on multiple sockets. Signed-off-by: Daniel P.

[Qemu-block] [PATCH 0/8] Enable full IPv4/IPv6 dual stack support

2017-08-10 Thread Daniel P. Berrange
Currently all the network listeners in QEMU, except the VNC server, are restricted to listening on a single socket. This makes it impossible to fully support IPv4/IPv6 dual stack. We're restricted to using IPV6_V6ONLY=0 to listen on both protocols from a single socket, but this doesn't work at all

[Qemu-block] [PATCH 6/8] chardev: convert the socket server to QIONetListener

2017-08-10 Thread Daniel P. Berrange
Instead of creating a QIOChannelSocket directly for the chardev server socket, use a QIONetListener. This provides the ability to listen on multiple sockets at the same time, so enables full support for IPv4/IPv6 dual stack. Signed-off-by: Daniel P. Berrange ---

[Qemu-block] [PATCH 5/8] migration: convert socket server to QIONetListener

2017-08-10 Thread Daniel P. Berrange
Instead of creating a QIOChannelSocket directly for the migration server socket, use a QIONetListener. This provides the ability to listen on multiple sockets at the same time, so enables full support for IPv4/IPv6 dual stack. Signed-off-by: Daniel P. Berrange ---

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] file-posix: Do runtime check for ofd lock API

2017-08-10 Thread Christian Ehrhardt
On Fri, Jul 21, 2017 at 2:36 PM, Eric Blake wrote: > On 07/21/2017 05:20 AM, Fam Zheng wrote: > > It is reported that on Windows Subsystem for Linux, ofd operations fail > > with -EINVAL. In other words, QEMU binary built with system headers that > > exports F_OFD_SETLK

Re: [Qemu-block] [PATCH for-2.10 v2 0/5] More bdrv_getlength() fixes

2017-08-10 Thread Eric Blake
On 08/10/2017 08:02 AM, Kevin Wolf wrote: > Am 09.08.2017 um 22:38 hat Eric Blake geschrieben: >> We already have a lot of bdrv_getlength() fixes in -rc2; so I think >> this is still okay for -rc3. >> >> v1 was here (with a typo'd subject line): >>

Re: [Qemu-block] [PATCH v4 4/7] block: convert ThrottleGroup to object with QOM

2017-08-10 Thread Alberto Garcia
On Wed 09 Aug 2017 12:07:31 PM CEST, Manos Pitsidianakis wrote: > +/* unfix buckets to check validity */ > +throttle_get_config(>ts, cfg); > +if (!throttle_is_valid(cfg, errp)) { > +return; > +} > +/* fix buckets again */ > +throttle_config(>ts, tg->clock_type,

Re: [Qemu-block] [PATCH v4 5/7] block: add throttle block filter driver

2017-08-10 Thread Manos Pitsidianakis
On Thu, Aug 10, 2017 at 03:54:02PM +0200, Alberto Garcia wrote: On Wed 09 Aug 2017 12:07:32 PM CEST, Manos Pitsidianakis wrote: +/* Extract ThrottleConfig options. Assumes cfg is initialized and will be + * checked for validity. + * + * Returns -1 and sets errp if a burst_length value is over

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10?] file-posix: Clear out first sector in hdev_create

2017-08-10 Thread Eric Blake
On 08/10/2017 03:01 AM, Fam Zheng wrote: > People get surprised when, after "qemu-imc create -f raw /dev/sdX", they > still see qcow2 with "qemu-img info", if previously the bdev had a qcow2 > header. While this is natural because raw doesn't need to write any > magic bytes during creation,

Re: [Qemu-block] [PATCH v4 5/7] block: add throttle block filter driver

2017-08-10 Thread Alberto Garcia
On Wed 09 Aug 2017 12:07:32 PM CEST, Manos Pitsidianakis wrote: > +/* Extract ThrottleConfig options. Assumes cfg is initialized and will be > + * checked for validity. > + * > + * Returns -1 and sets errp if a burst_length value is over UINT_MAX. > + */ > +static int

Re: [Qemu-block] [PATCH] virtio-blk: handle blk_getlength() errors

2017-08-10 Thread Stefan Hajnoczi
On Tue, Aug 08, 2017 at 01:22:51PM +0100, Stefan Hajnoczi wrote: > If blk_getlength() fails in virtio_blk_update_config() consider the disk > image length to be 0 bytes. > > Signed-off-by: Stefan Hajnoczi > --- > hw/block/virtio-blk.c | 4 +++- > 1 file changed, 3

Re: [Qemu-block] [PATCH for-2.10 v2 0/5] More bdrv_getlength() fixes

2017-08-10 Thread Kevin Wolf
Am 09.08.2017 um 22:38 hat Eric Blake geschrieben: > We already have a lot of bdrv_getlength() fixes in -rc2; so I think > this is still okay for -rc3. > > v1 was here (with a typo'd subject line): > https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg01226.html > > Since v1: > - patch 1:

Re: [Qemu-block] block replication

2017-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2017 17:11, Vladimir Sementsov-Ogievskiy wrote: Hi Wen! I'm trying to understand block/replication code and have a question. Why should we block the region from intersecting cow requests when read? If I understand correctly regardless of writes to the secondary-disk we have consistent

Re: [Qemu-block] [PATCH 0/2] IDE: Do not flush empty drives

2017-08-10 Thread Stefan Hajnoczi
On Wed, Aug 09, 2017 at 05:02:10PM +0100, Stefan Hajnoczi wrote: > John Snow is offline until Monday, QEMU 2.10-rc3 is due to be tagged on > Tuesday, and so I've taken two patches John sent for 2.10 and addressed review > comments. > > Kevin Wolf (1): > IDE: test flush on empty CDROM > >

Re: [Qemu-block] [Qemu-devel] [PATCH 01/12] qemu-iotests: remove dead code

2017-08-10 Thread Paolo Bonzini
On 10/08/2017 00:18, Eric Blake wrote: > On 08/09/2017 04:54 PM, Paolo Bonzini wrote: >> This includes shell function, shell variables, command line options >> (randomize.awk does not exist) and conditions that can never be true >> (./qemu does not exist anymore). > > Can we point to a commit id

Re: [Qemu-block] [Qemu-devel] [PATCH 09/12] qemu-iotests: do not search for binaries in the current directory

2017-08-10 Thread Markus Armbruster
Paolo Bonzini writes: > Looking in the build root is enough. > > Signed-off-by: Paolo Bonzini It's actually *better*. I hate it when tests pick up random garbage I have lying around.

Re: [Qemu-block] [Qemu-devel] [PATCH 08/12] qemu-iotests: fix uninitialized variable

2017-08-10 Thread Markus Armbruster
Drive-by comment: Paolo Bonzini writes: > The function is used in "common" but defined only after the file "This variable" > is sourced. > > Signed-off-by: Paolo Bonzini

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 01/56] qobject: Touch up comments to say @param instead of 'param'

2017-08-10 Thread Markus Armbruster
Eric Blake writes: > On 08/07/2017 09:45 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> qobject/qdict.c | 68 >> - >> qobject/qlist.c | 2 +- >> 2 files changed, 35

Re: [Qemu-block] [PATCH v8 0/8] Optimize VMDK I/O by allocating multiple clusters

2017-08-10 Thread Ashijeet Acharya
On Thu, Aug 10, 2017 at 1:41 PM, Stefan Hajnoczi wrote: > On Thu, Jul 27, 2017 at 3:33 PM, Ashijeet Acharya > wrote: > > Previously posted series patches: > > v1 - http://lists.nongnu.org/archive/html/qemu-devel/2017- > 03/msg02044.html > > v2 -

Re: [Qemu-block] [Qemu-devel] [PATCH v4 17/22] libqtest: Add qmp_args() helper

2017-08-10 Thread Markus Armbruster
Eric Blake writes: > On 08/09/2017 10:57 AM, Markus Armbruster wrote: > >> I don't like the qmp_args name. It's not about arguments, it's about >> sending a command with arguments. >> >> I'm afraid I'm getting pretty thorougly confused by the evolving >> interface. So I

Re: [Qemu-block] [PATCH v8 0/8] Optimize VMDK I/O by allocating multiple clusters

2017-08-10 Thread Stefan Hajnoczi
On Thu, Jul 27, 2017 at 3:33 PM, Ashijeet Acharya wrote: > Previously posted series patches: > v1 - http://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg02044.html > v2 - http://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg05080.html > v3 -

[Qemu-block] [PATCH] file-posix: Clear out first sector in hdev_create

2017-08-10 Thread Fam Zheng
People get surprised when, after "qemu-imc create -f raw /dev/sdX", they still see qcow2 with "qemu-img info", if previously the bdev had a qcow2 header. While this is natural because raw doesn't need to write any magic bytes during creation, hdev_create is free to clear out the first sector to