History log of /qemu/nbd/ (Results 226 – 250 of 377)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
fdad35ef22-Nov-2017 Eric Blake <eblake@redhat.com>

nbd/server: CVE-2017-15119 Reject options larger than 32M

The NBD spec gives us permission to abruptly disconnect on clients
that send outrageously large option requests, rather than having
to spend

nbd/server: CVE-2017-15119 Reject options larger than 32M

The NBD spec gives us permission to abruptly disconnect on clients
that send outrageously large option requests, rather than having
to spend the time reading to the end of the option. No real
option request requires that much data anyways; and meanwhile, we
already have the practice of abruptly dropping the connection on
any client that sends NBD_CMD_WRITE with a payload larger than 32M.

For comparison, nbdkit drops the connection on any request with
more than 4096 bytes; however, that limit is probably too low
(as the NBD spec states an export name can theoretically be up
to 4096 bytes, which means a valid NBD_OPT_INFO could be even
longer) - even if qemu doesn't permit exports longer than 256
bytes.

It could be argued that a malicious client trying to get us to
read nearly 4G of data on a bad request is a form of denial of
service. In particular, if the server requires TLS, but a client
that does not know the TLS credentials sends any option (other
than NBD_OPT_STARTTLS or NBD_OPT_EXPORT_NAME) with a stated
payload of nearly 4G, then the server was keeping the connection
alive trying to read all the payload, tying up resources that it
would rather be spending on a client that can get past the TLS
handshake. Hence, this warranted a CVE.

Present since at least 2.5 when handling known options, and made
worse in 2.6 when fixing support for NBD_FLAG_C_FIXED_NEWSTYLE
to handle unknown options.

CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>

show more ...


/qemu/Changelog
/qemu/MAINTAINERS
/qemu/Makefile
/qemu/Makefile.target
/qemu/README
/qemu/VERSION
/qemu/accel/stubs/tcg-stub.c
/qemu/accel/tcg/atomic_template.h
/qemu/accel/tcg/cpu-exec.c
/qemu/accel/tcg/cputlb.c
/qemu/accel/tcg/user-exec.c
/qemu/block.c
/qemu/block/block-backend.c
/qemu/block/bochs.c
/qemu/block/cloop.c
/qemu/block/dmg.c
/qemu/block/io.c
/qemu/block/qapi.c
/qemu/block/qcow2-cache.c
/qemu/block/qcow2-cluster.c
/qemu/block/qcow2-refcount.c
/qemu/block/qcow2.c
/qemu/block/qcow2.h
/qemu/block/rbd.c
/qemu/block/replication.c
/qemu/block/snapshot.c
/qemu/block/vvfat.c
/qemu/blockjob.c
/qemu/configure
/qemu/docs/interop/qmp-intro.txt
/qemu/docs/pcie.txt
/qemu/docs/rdma.txt
/qemu/exec.c
/qemu/hw/arm/aspeed.c
/qemu/hw/arm/aspeed_soc.c
/qemu/hw/arm/virt.c
/qemu/hw/arm/xlnx-zcu102.c
/qemu/hw/char/spapr_vty.c
/qemu/hw/intc/armv7m_nvic.c
/qemu/hw/misc/aspeed_scu.c
/qemu/hw/net/e1000.c
/qemu/hw/net/eepro100.c
/qemu/hw/net/net_rx_pkt.c
/qemu/hw/net/net_tx_pkt.c
/qemu/hw/net/virtio-net.c
/qemu/hw/net/vmware_utils.h
/qemu/hw/net/vmxnet3.c
/qemu/hw/net/vmxnet3.h
/qemu/hw/ppc/spapr.c
/qemu/hw/ppc/spapr_drc.c
/qemu/hw/s390x/s390-virtio-hcall.h
/qemu/include/block/block.h
/qemu/include/block/blockjob_int.h
/qemu/include/block/snapshot.h
/qemu/include/exec/memory-internal.h
/qemu/include/hw/compat.h
/qemu/include/hw/misc/aspeed_scu.h
/qemu/include/hw/pci/pci.h
/qemu/include/net/checksum.h
/qemu/include/qapi/qmp/qbool.h
/qemu/include/qapi/qmp/qdict.h
/qemu/include/qapi/qmp/qlist.h
/qemu/include/qapi/qmp/qnull.h
/qemu/include/qapi/qmp/qnum.h
/qemu/include/qapi/qmp/qobject.h
/qemu/include/qapi/qmp/qstring.h
/qemu/include/qapi/qmp/types.h
/qemu/include/qemu-common.h
/qemu/include/qemu/coroutine_int.h
/qemu/include/qemu/osdep.h
/qemu/linux-user/elfload.c
/qemu/linux-user/hppa/syscall_nr.h
/qemu/linux-user/hppa/target_cpu.h
/qemu/linux-user/main.c
/qemu/linux-user/signal.c
/qemu/linux-user/syscall.c
/qemu/linux-user/syscall_defs.h
/qemu/migration/block.c
/qemu/migration/ram.c
/qemu/migration/savevm.c
server.c
/qemu/net/colo-compare.c
/qemu/pc-bios/README
/qemu/pc-bios/s390-ccw.img
/qemu/pc-bios/s390-ccw/virtio-scsi.c
/qemu/qapi/block-core.json
/qemu/qapi/migration.json
/qemu/qapi/qapi-clone-visitor.c
/qemu/qapi/string-input-visitor.c
/qemu/qemu-doc.texi
/qemu/qemu-img.c
/qemu/qemu-options.hx
/qemu/qemu.nsi
/qemu/qga/commands-win32.c
/qemu/qobject/qbool.c
/qemu/qobject/qdict.c
/qemu/qobject/qlist.c
/qemu/qobject/qnull.c
/qemu/qobject/qnum.c
/qemu/qobject/qobject.c
/qemu/qobject/qstring.c
/qemu/scripts/coccinelle/qobject.cocci
/qemu/scripts/get_maintainer.pl
/qemu/scripts/make-release
/qemu/scripts/qmp/qemu-ga-client
/qemu/scripts/update-linux-headers.sh
/qemu/target/arm/helper.c
/qemu/target/ppc/machine.c
/qemu/target/ppc/translate_init.c
/qemu/target/s390x/helper.c
/qemu/target/s390x/misc_helper.c
/qemu/target/sparc/mmu_helper.c
/qemu/tests/.gitignore
/qemu/tests/Makefile.include
/qemu/tests/check-qnull.c
/qemu/tests/check-qobject.c
/qemu/tests/qemu-iotests/020
/qemu/tests/qemu-iotests/020.out
/qemu/tests/qemu-iotests/060
/qemu/tests/qemu-iotests/060.out
/qemu/tests/qemu-iotests/087
/qemu/tests/qemu-iotests/133
/qemu/tests/qemu-iotests/133.out
/qemu/tests/qemu-iotests/176
/qemu/tests/qemu-iotests/176.out
/qemu/tests/qemu-iotests/182
/qemu/tests/qemu-iotests/196
/qemu/tests/qemu-iotests/196.out
/qemu/tests/qemu-iotests/198
/qemu/tests/qemu-iotests/198.out
/qemu/tests/qemu-iotests/200
/qemu/tests/qemu-iotests/200.out
/qemu/tests/qemu-iotests/common.filter
/qemu/tests/qemu-iotests/common.qemu
/qemu/tests/qemu-iotests/group
/qemu/util/async.c
/qemu/util/qemu-coroutine-sleep.c
/qemu/util/qemu-coroutine.c
/qemu/version.rc
fed5f8f815-Nov-2017 Eric Blake <eblake@redhat.com>

nbd/server: Fix error reporting for bad requests

The NBD spec says an attempt to NBD_CMD_TRIM on a read-only
export should fail with EPERM, as a trim has the potential
to change disk contents, but w

nbd/server: Fix error reporting for bad requests

The NBD spec says an attempt to NBD_CMD_TRIM on a read-only
export should fail with EPERM, as a trim has the potential
to change disk contents, but we were relying on the block
layer to catch that for us, which might not always give the
right error (and even if it does, it does not let us pass
back a sane message for structured replies).

The NBD spec says an attempt to NBD_CMD_WRITE_ZEROES out of
bounds should fail with ENOSPC, not EINVAL.

Our check for u64 offset + u32 length wraparound up front is
pointless; nothing uses offset until after the second round
of sanity checks, and we can just as easily ensure there is
no wraparound by checking whether offset is in bounds (since
a disk size cannot exceed off_t which is 63 bits, adding a
32-bit number for a valid offset can't overflow). Bonus:
dropping the up-front check lets us keep the connection alive
after NBD_CMD_WRITE, whereas before we would drop the
connection (of course, any client sending a packet that would
trigger the failure is already buggy, so it's also okay to
drop the connection, but better quality-of-implementation
never hurts).

Solve all of these issues by some code motion and improved
request validation.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171115213557.3548-1-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

show more ...

01b05c6613-Nov-2017 Eric Blake <eblake@redhat.com>

nbd/client: Don't hard-disconnect on ESHUTDOWN from server

The NBD spec says that a server may fail any transmission request
with ESHUTDOWN when it is apparent that no further request from
the clien

nbd/client: Don't hard-disconnect on ESHUTDOWN from server

The NBD spec says that a server may fail any transmission request
with ESHUTDOWN when it is apparent that no further request from
the client can be successfully honored. The client is supposed
to then initiate a soft shutdown (wait for all remaining in-flight
requests to be answered, then send NBD_CMD_DISC). However, since
qemu's server never uses ESHUTDOWN errors, this code was mostly
untested since its introduction in commit b6f5d3b5.

More recently, I learned that nbdkit as the NBD server is able to
send ESHUTDOWN errors, so I finally tested this code, and noticed
that our client was special-casing ESHUTDOWN to cause a hard
shutdown (immediate disconnect, with no NBD_CMD_DISC), but only
if the server sends this error as a simple reply. Further
investigation found that commit d2febedb introduced a regression
where structured replies behave differently than simple replies -
but that the structured reply behavior is more in line with the
spec (even if we still lack code in nbd-client.c to properly quit
sending further requests). So this patch reverts the portion of
b6f5d3b5 that introduced an improper hard-disconnect special-case
at the lower level, and leaves the future enhancement of a nicer
soft-disconnect at the higher level for another day.

CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171113194857.13933-1-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

show more ...

cb6b1a3f13-Nov-2017 Eric Blake <eblake@redhat.com>

nbd/client: Use error_prepend() correctly

When using error prepend(), it is necessary to end with a space
in the format string; otherwise, messages come out incorrectly,
such as when connecting to a

nbd/client: Use error_prepend() correctly

When using error prepend(), it is necessary to end with a space
in the format string; otherwise, messages come out incorrectly,
such as when connecting to a socket that hangs up immediately:

can't open device nbd://localhost:10809/: Failed to read dataUnexpected end-of-file before all bytes were read

Originally botched in commit e44ed99d, then several more instances
added in the meantime.

Pre-existing and not fixed here: we are inconsistent on capitalization;
some of our messages start with lower case, and others start with upper,
although the use of error_prepend() is much nicer to read when all
fragments consistently start with lower.

CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171113152424.25381-1-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>

show more ...


/qemu/MAINTAINERS
/qemu/Makefile
/qemu/VERSION
/qemu/accel/tcg/atomic_template.h
/qemu/accel/tcg/cpu-exec.c
/qemu/accel/tcg/cputlb.c
/qemu/accel/tcg/translate-all.c
/qemu/accel/tcg/user-exec.c
/qemu/block/block-backend.c
/qemu/block/nbd-client.c
/qemu/block/parallels.c
/qemu/block/qcow2-cluster.c
/qemu/block/qcow2-refcount.c
/qemu/block/qcow2.c
/qemu/block/snapshot.c
/qemu/block/throttle-groups.c
/qemu/block/vhdx.c
/qemu/configure
/qemu/crypto/cipher.c
/qemu/crypto/hash.c
/qemu/crypto/hmac.c
/qemu/default-configs/arm-softmmu.mak
/qemu/default-configs/i386-softmmu.mak
/qemu/default-configs/x86_64-softmmu.mak
/qemu/disas.c
/qemu/docs/specs/tpm.txt
/qemu/exec.c
/qemu/hw/arm/exynos4_boards.c
/qemu/hw/arm/highbank.c
/qemu/hw/arm/raspi.c
/qemu/hw/arm/xlnx-zcu102.c
/qemu/hw/arm/xlnx-zynqmp.c
/qemu/hw/char/serial.c
/qemu/hw/display/sm501.c
/qemu/hw/display/vga.c
/qemu/hw/display/virtio-gpu.c
/qemu/hw/display/vmware_vga.c
/qemu/hw/i386/pc.c
/qemu/hw/i386/pc_piix.c
/qemu/hw/i386/pc_q35.c
/qemu/hw/intc/ioapic.c
/qemu/hw/intc/trace-events
/qemu/hw/intc/xics.c
/qemu/hw/intc/xics_kvm.c
/qemu/hw/misc/Makefile.objs
/qemu/hw/misc/vmcoreinfo.c
/qemu/hw/net/eepro100.c
/qemu/hw/pci-bridge/Makefile.objs
/qemu/hw/pci-host/piix.c
/qemu/hw/pci-host/q35.c
/qemu/hw/pci/pci.c
/qemu/hw/ppc/e500.c
/qemu/hw/ppc/spapr_hcall.c
/qemu/hw/s390x/s390-pci-bus.c
/qemu/hw/scsi/vhost-user-scsi.c
/qemu/hw/tpm/tpm_emulator.c
/qemu/hw/tpm/tpm_tis.c
/qemu/hw/virtio/virtio.c
/qemu/include/disas/bfd.h
/qemu/include/exec/cpu_ldst.h
/qemu/include/exec/cpu_ldst_useronly_template.h
/qemu/include/exec/exec-all.h
/qemu/include/hw/boards.h
/qemu/include/hw/compat.h
/qemu/include/hw/i386/pc.h
/qemu/include/hw/pci-host/q35.h
/qemu/include/hw/pci/pci.h
/qemu/include/hw/ppc/xics.h
/qemu/include/qemu/thread-posix.h
/qemu/include/qom/cpu.h
client.c
/qemu/net/colo-compare.c
/qemu/net/colo.c
/qemu/net/colo.h
/qemu/net/socket.c
/qemu/numa.c
/qemu/pc-bios/bios-256k.bin
/qemu/pc-bios/bios.bin
/qemu/pc-bios/vgabios-cirrus.bin
/qemu/pc-bios/vgabios-qxl.bin
/qemu/pc-bios/vgabios-stdvga.bin
/qemu/pc-bios/vgabios-virtio.bin
/qemu/pc-bios/vgabios-vmware.bin
/qemu/pc-bios/vgabios.bin
/qemu/qemu-doc.texi
/qemu/qemu-options.hx
/qemu/roms/seabios
/qemu/scripts/update-linux-headers.sh
/qemu/slirp/tcp_subr.c
/qemu/target/arm/cpu.c
/qemu/target/arm/helper-a64.c
/qemu/target/arm/translate-a64.c
/qemu/target/i386/cpu.c
/qemu/target/ppc/compat.c
/qemu/target/s390x/translate.c
/qemu/tests/acpi-test-data/pc/DSDT
/qemu/tests/acpi-test-data/pc/DSDT.bridge
/qemu/tests/acpi-test-data/pc/DSDT.cphp
/qemu/tests/acpi-test-data/pc/DSDT.ipmikcs
/qemu/tests/acpi-test-data/pc/DSDT.memhp
/qemu/tests/acpi-test-data/q35/DSDT
/qemu/tests/acpi-test-data/q35/DSDT.bridge
/qemu/tests/acpi-test-data/q35/DSDT.cphp
/qemu/tests/acpi-test-data/q35/DSDT.ipmibt
/qemu/tests/acpi-test-data/q35/DSDT.memhp
/qemu/tests/acpi-utils.h
/qemu/tests/bios-tables-test.c
/qemu/tests/docker/Makefile.include
/qemu/tests/docker/docker.py
/qemu/tests/qemu-iotests/030
/qemu/tests/qemu-iotests/040
/qemu/tests/qemu-iotests/055
/qemu/tests/qemu-iotests/060
/qemu/tests/qemu-iotests/060.out
/qemu/tests/qemu-iotests/077
/qemu/tests/qemu-iotests/077.out
/qemu/tests/qemu-iotests/083
/qemu/tests/qemu-iotests/093
/qemu/tests/qemu-iotests/093.out
/qemu/tests/qemu-iotests/136
/qemu/tests/qemu-iotests/194
/qemu/tests/qemu-iotests/common.rc
/qemu/tests/test-aio-multithread.c
/qemu/tests/test-crypto-block.c
/qemu/tests/vmgenid-test.c
/qemu/ui/console-gl.c
/qemu/ui/console.c
/qemu/ui/sdl2.c
/qemu/util/async.c
/qemu/util/stats64.c
/qemu/vl.c
ef8c887e08-Nov-2017 Eric Blake <eblake@redhat.com>

nbd/server: Fix structured read of length 0

The NBD spec was recently clarified to state that a read of length 0
should not be attempted by a compliant client; but that a server must
still handle it

nbd/server: Fix structured read of length 0

The NBD spec was recently clarified to state that a read of length 0
should not be attempted by a compliant client; but that a server must
still handle it correctly in an unspecified manner (that is, either
a successful no-op or an error reply, but not a crash) [1]. However,
it also implies that NBD_REPLY_TYPE_OFFSET_DATA must have a non-zero
payload length, but our existing code was replying with a chunk
that a picky client could reject as invalid because it was missing
a payload (our own client implementation was recently patched to be
that picky, after first fixing it to not send 0-length requests).

We are already doing successful no-ops for 0-length writes and for
non-structured reads; so for consistency, we want structured reply
reads to also be a no-op. The easiest way to do this is to return
a NBD_REPLY_TYPE_NONE chunk; this is best done via a new helper
function (especially since future patches for other structured
replies may benefit from using the same helper).

[1] https://github.com/NetworkBlockDevice/nbd/commit/ee926037

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171108215703.9295-8-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

show more ...

efdc0c1008-Nov-2017 Eric Blake <eblake@redhat.com>

nbd: Fix struct name for structured reads

A closer read of the NBD spec shows that a structured reply chunk
for a hole is not quite identical to the prefix of a data chunk,
because the hole has to a

nbd: Fix struct name for structured reads

A closer read of the NBD spec shows that a structured reply chunk
for a hole is not quite identical to the prefix of a data chunk,
because the hole has to also send a 32-bit size field. Although
we do not yet send holes, we should fix the misleading information
in our header and make it easier for a future patch to support
sparse reads. Messed up in commit bae245d1.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171108215703.9295-5-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

show more ...

079d326608-Nov-2017 Eric Blake <eblake@redhat.com>

nbd/client: Nicer trace of structured reply

It's useful to know which structured reply chunk is being processed.
Missed in commit d2febedb.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id:

nbd/client: Nicer trace of structured reply

It's useful to know which structured reply chunk is being processed.
Missed in commit d2febedb.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171108215703.9295-4-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

show more ...

46321d6b01-Nov-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd/server: fix nbd_negotiate_handle_info

namelen should be here, length is unrelated, and always 0 at this
point. Broken in introduction in commit f37708f6, but mostly
harmless (replying with '' a

nbd/server: fix nbd_negotiate_handle_info

namelen should be here, length is unrelated, and always 0 at this
point. Broken in introduction in commit f37708f6, but mostly
harmless (replying with '' as the name does not violate protocol,
and does not confuse qemu as the nbd client since our implementation
does not ask for the name; but might confuse some other client that
does ask for the name especially if the default export is different
than the export name being queried).

Adding an assert makes it obvious that we are not skipping any bytes
in the client's message, as well as making it obvious that we were
using the wrong variable.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
CC: qemu-stable@nongnu.org
Message-Id: <20171101154204.27146-1-vsementsov@virtuozzo.com>
[eblake: improve commit message, squash in assert addition]
Signed-off-by: Eric Blake <eblake@redhat.com>

show more ...

f140e30027-Oct-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd: Minimal structured read for client

Minimal implementation: for structured error only error_report error
message.

Note that test 83 is now more verbose, because the implementation
prints more w

nbd: Minimal structured read for client

Minimal implementation: for structured error only error_report error
message.

Note that test 83 is now more verbose, because the implementation
prints more warnings about unexpected communication errors; perhaps
future patches should tone things down by using trace messages
instead of traces, but the common case of successful communication
is no noisier than before.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171027104037.8319-13-eblake@redhat.com>

show more ...

56dc682b27-Oct-2017 Eric Blake <eblake@redhat.com>

nbd: Move nbd_read() to common header

An upcoming change to block/nbd-client.c will want to read the
tail of a structured reply chunk directly from the wire. Move
this function to make it easier.

nbd: Move nbd_read() to common header

An upcoming change to block/nbd-client.c will want to read the
tail of a structured reply chunk directly from the wire. Move
this function to make it easier.

Based on a patch from Vladimir Sementsov-Ogievskiy.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171027104037.8319-12-eblake@redhat.com>

show more ...

d2febedb27-Oct-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd/client: prepare nbd_receive_reply for structured reply

In following patch nbd_receive_reply will be used both for simple
and structured reply header receiving.
NBDReply is altered into union of

nbd/client: prepare nbd_receive_reply for structured reply

In following patch nbd_receive_reply will be used both for simple
and structured reply header receiving.
NBDReply is altered into union of simple reply header and structured
reply chunk header, simple error translation moved to block/nbd-client
to be consistent with further structured reply error translation.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171027104037.8319-11-eblake@redhat.com>

show more ...

d795299b27-Oct-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd/client: refactor nbd_receive_starttls

Split out nbd_request_simple_option to be reused for structured reply
option.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed

nbd/client: refactor nbd_receive_starttls

Split out nbd_request_simple_option to be reused for structured reply
option.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171027104037.8319-10-eblake@redhat.com>

show more ...

a57f6dea27-Oct-2017 Eric Blake <eblake@redhat.com>

nbd/server: Include human-readable message in structured errors

The NBD spec permits including a human-readable error string if
structured replies are in force, so we might as well send the
client t

nbd/server: Include human-readable message in structured errors

The NBD spec permits including a human-readable error string if
structured replies are in force, so we might as well send the
client the message that we logged on any error.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171027104037.8319-9-eblake@redhat.com>

show more ...

5c54e7fa27-Oct-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd: Minimal structured read for server

Minimal implementation of structured read: one structured reply chunk,
no segmentation.
Minimal structured error implementation: no text message.
Support DF f

nbd: Minimal structured read for server

Minimal implementation of structured read: one structured reply chunk,
no segmentation.
Minimal structured error implementation: no text message.
Support DF flag, but just ignore it, as there is no segmentation any
way.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171027104037.8319-8-eblake@redhat.com>

show more ...

e68c35cf27-Oct-2017 Eric Blake <eblake@redhat.com>

nbd/server: Refactor zero-length option check

Consolidate the response for a non-zero-length option payload
into a new function, nbd_reject_length(). This check will
also be used when introducing s

nbd/server: Refactor zero-length option check

Consolidate the response for a non-zero-length option payload
into a new function, nbd_reject_length(). This check will
also be used when introducing support for structured replies.

Note that STARTTLS response differs based on time: if the connection
is still unencrypted, we set fatal to true (a client that can't
request TLS correctly may still think that we are ready to start
the TLS handshake, so we must disconnect); while if the connection
is already encrypted, the client is sending a bogus request but
is no longer at risk of being confused by continuing the connection.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171027104037.8319-7-eblake@redhat.com>
[eblake: correct return value on STARTTLS]
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

show more ...

8cbee49e27-Oct-2017 Eric Blake <eblake@redhat.com>

nbd/server: Simplify nbd_negotiate_options loop

Instead of making each caller check whether a transmission error
occurred, we can sink a common error check to the end of the loop.

Signed-off-by: Er

nbd/server: Simplify nbd_negotiate_options loop

Instead of making each caller check whether a transmission error
occurred, we can sink a common error check to the end of the loop.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171027104037.8319-6-eblake@redhat.com>
[eblake: squash in compiler warning fix]
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

show more ...

8fb48b8b27-Oct-2017 Eric Blake <eblake@redhat.com>

nbd/server: Report error for write to read-only export

When the server is read-only, we were already reporting an error
message for NBD_CMD_WRITE_ZEROES, but failed to set errp for a
similar NBD_CMD

nbd/server: Report error for write to read-only export

When the server is read-only, we were already reporting an error
message for NBD_CMD_WRITE_ZEROES, but failed to set errp for a
similar NBD_CMD_WRITE. This will matter more once structured
replies allow the server to propagate the errp information back
to the client. While at it, use an error message that makes a
bit more sense if viewed on the client side.

Note that when using qemu-io to test qemu-nbd behavior, it is
rather difficult to convince qemu-io to send protocol violations
(such as a read beyond bounds), because we have a lot of active
checking on the client side that a qemu-io request makes sense
before it ever goes over the wire to the server. The case of a
client attempting a write when the server is started as
'qemu-nbd -r' is one of the few places where we can easily test
error path handling, without having to resort to hacking in known
temporary bugs to either the server or client. [Maybe we want a
future patch to the client to do up-front checking on writes to a
read-only export, the way it does up-front bounds checking; but I
don't see anything in the NBD spec that points to a protocol
violation in our current behavior.]

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171027104037.8319-5-eblake@redhat.com>

show more ...

bae245d127-Oct-2017 Eric Blake <eblake@redhat.com>

nbd: Expose constants and structs for structured read

Upcoming patches will implement the NBD structured reply
extension [1] for both client and server roles. Declare the
constants, structs, and lo

nbd: Expose constants and structs for structured read

Upcoming patches will implement the NBD structured reply
extension [1] for both client and server roles. Declare the
constants, structs, and lookup routines that will be valuable
whether the server or client code is backported in isolation.

This includes moving one constant from an internal header to
the public header, as part of the structured read processing
will be done in block/nbd-client.c rather than nbd/client.c.

[1]https://github.com/NetworkBlockDevice/nbd/blob/extension-structured-reply/doc/proto.md

Based on patches from Vladimir Sementsov-Ogievskiy.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171027104037.8319-4-eblake@redhat.com>

show more ...

dd68944027-Oct-2017 Eric Blake <eblake@redhat.com>

nbd: Move nbd_errno_to_system_errno() to public header

This is needed in preparation for structured reply handling,
as we will be performing the translation from NBD error to
system errno value high

nbd: Move nbd_errno_to_system_errno() to public header

This is needed in preparation for structured reply handling,
as we will be performing the translation from NBD error to
system errno value higher in the stack at block/nbd-client.c.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171027104037.8319-3-eblake@redhat.com>

show more ...

e7a78d0e27-Oct-2017 Eric Blake <eblake@redhat.com>

nbd: Include error names in trace messages

NBD errors were originally sent over the wire based on Linux errno
values; but not all the world is Linux, and not all platforms share
the same values. Si

nbd: Include error names in trace messages

NBD errors were originally sent over the wire based on Linux errno
values; but not all the world is Linux, and not all platforms share
the same values. Since a number isn't very easy to decipher on all
platforms, update the trace messages to include the name of NBD
errors being sent/received over the wire. Tweak the trace messages
to be at the point where we are using the NBD error, not the
translation to the host errno values.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171027104037.8319-2-eblake@redhat.com>

show more ...


/qemu/.gitignore
/qemu/.gitmodules
/qemu/MAINTAINERS
/qemu/Makefile
/qemu/Makefile.objs
/qemu/Makefile.target
/qemu/accel/kvm/kvm-all.c
/qemu/accel/tcg/cpu-exec.c
/qemu/accel/tcg/cputlb.c
/qemu/accel/tcg/softmmu_template.h
/qemu/accel/tcg/tcg-runtime.c
/qemu/accel/tcg/translate-all.c
/qemu/accel/tcg/translator.c
/qemu/backends/tpm.c
/qemu/block.c
/qemu/block/blkdebug.c
/qemu/block/io.c
/qemu/block/mirror.c
/qemu/block/qcow2-cluster.c
/qemu/block/qcow2.c
/qemu/block/qed.c
/qemu/block/throttle.c
/qemu/block/trace-events
/qemu/bsd-user/main.c
/qemu/capstone
/qemu/chardev/char-socket.c
/qemu/configure
/qemu/contrib/libvhost-user/libvhost-user.c
/qemu/contrib/libvhost-user/libvhost-user.h
/qemu/cpus.c
/qemu/default-configs/i386-softmmu.mak
/qemu/default-configs/or1k-softmmu.mak
/qemu/default-configs/pci.mak
/qemu/default-configs/ppc-linux-user.mak
/qemu/default-configs/ppc-softmmu.mak
/qemu/default-configs/ppc64-linux-user.mak
/qemu/default-configs/ppc64-softmmu.mak
/qemu/default-configs/ppc64abi32-linux-user.mak
/qemu/default-configs/ppc64le-linux-user.mak
/qemu/default-configs/ppcemb-softmmu.mak
/qemu/default-configs/x86_64-softmmu.mak
/qemu/disas.c
/qemu/disas/arm.c
/qemu/docs/devel/loads-stores.rst
/qemu/docs/specs/tpm.txt
/qemu/docs/specs/vmcoreinfo.txt
/qemu/dump.c
/qemu/exec.c
/qemu/hmp-commands.hx
/qemu/hmp.c
/qemu/hmp.h
/qemu/hw/9pfs/9p.c
/qemu/hw/acpi/piix4.c
/qemu/hw/acpi/tco.c
/qemu/hw/acpi/trace-events
/qemu/hw/acpi/vmgenid.c
/qemu/hw/alpha/dp264.c
/qemu/hw/audio/ac97.c
/qemu/hw/audio/es1370.c
/qemu/hw/audio/intel-hda.c
/qemu/hw/block/nvme.c
/qemu/hw/block/xen_disk.c
/qemu/hw/char/serial-pci.c
/qemu/hw/core/loader.c
/qemu/hw/core/qdev.c
/qemu/hw/cris/axis_dev88.c
/qemu/hw/display/cirrus_vga.c
/qemu/hw/display/qxl.c
/qemu/hw/display/sm501.c
/qemu/hw/display/vga-pci.c
/qemu/hw/display/vga.c
/qemu/hw/display/vmware_vga.c
/qemu/hw/i2c/smbus_ich9.c
/qemu/hw/i386/acpi-build.c
/qemu/hw/i386/amd_iommu.c
/qemu/hw/i386/kvm/pci-assign.c
/qemu/hw/i386/pc.c
/qemu/hw/i386/pc_piix.c
/qemu/hw/i386/pc_q35.c
/qemu/hw/i386/xen/xen-hvm.c
/qemu/hw/i386/xen/xen_platform.c
/qemu/hw/i386/xen/xen_pvdevice.c
/qemu/hw/ide/core.c
/qemu/hw/ide/ich.c
/qemu/hw/ide/macio.c
/qemu/hw/ide/pci.c
/qemu/hw/ide/qdev.c
/qemu/hw/input/ps2.c
/qemu/hw/input/trace-events
/qemu/hw/intc/Makefile.objs
/qemu/hw/intc/ompic.c
/qemu/hw/ipack/tpci200.c
/qemu/hw/isa/i82378.c
/qemu/hw/isa/lpc_ich9.c
/qemu/hw/isa/piix4.c
/qemu/hw/isa/vt82c686.c
/qemu/hw/lm32/lm32_boards.c
/qemu/hw/lm32/milkymist.c
/qemu/hw/m68k/an5206.c
/qemu/hw/m68k/mcf5206.c
/qemu/hw/m68k/mcf5208.c
/qemu/hw/mips/boston.c
/qemu/hw/mips/cps.c
/qemu/hw/mips/gt64xxx_pci.c
/qemu/hw/mips/mips_fulong2e.c
/qemu/hw/mips/mips_jazz.c
/qemu/hw/mips/mips_malta.c
/qemu/hw/mips/mips_mipssim.c
/qemu/hw/mips/mips_r4k.c
/qemu/hw/misc/Makefile.objs
/qemu/hw/misc/edu.c
/qemu/hw/misc/ivshmem.c
/qemu/hw/misc/macio/macio.c
/qemu/hw/misc/pci-testdev.c
/qemu/hw/misc/vmcoreinfo.c
/qemu/hw/moxie/moxiesim.c
/qemu/hw/net/e1000.c
/qemu/hw/net/e1000e.c
/qemu/hw/net/eepro100.c
/qemu/hw/net/ne2000.c
/qemu/hw/net/pcnet-pci.c
/qemu/hw/net/rocker/rocker.c
/qemu/hw/net/rtl8139.c
/qemu/hw/net/sungem.c
/qemu/hw/net/sunhme.c
/qemu/hw/net/vmxnet3.c
/qemu/hw/nvram/fw_cfg.c
/qemu/hw/openrisc/cputimer.c
/qemu/hw/openrisc/openrisc_sim.c
/qemu/hw/pci-bridge/dec.c
/qemu/hw/pci-bridge/gen_pcie_root_port.c
/qemu/hw/pci-bridge/i82801b11.c
/qemu/hw/pci-bridge/ioh3420.c
/qemu/hw/pci-bridge/pci_bridge_dev.c
/qemu/hw/pci-bridge/pci_expander_bridge.c
/qemu/hw/pci-bridge/pcie_pci_bridge.c
/qemu/hw/pci-bridge/pcie_root_port.c
/qemu/hw/pci-bridge/xio3130_downstream.c
/qemu/hw/pci-bridge/xio3130_upstream.c
/qemu/hw/pci-host/apb.c
/qemu/hw/pci-host/bonito.c
/qemu/hw/pci-host/gpex.c
/qemu/hw/pci-host/grackle.c
/qemu/hw/pci-host/piix.c
/qemu/hw/pci-host/ppce500.c
/qemu/hw/pci-host/prep.c
/qemu/hw/pci-host/q35.c
/qemu/hw/pci-host/uninorth.c
/qemu/hw/pci-host/versatile.c
/qemu/hw/pci-host/xilinx-pcie.c
/qemu/hw/pci/pci.c
/qemu/hw/pci/pci_bridge.c
/qemu/hw/pci/pcie_host.c
/qemu/hw/ppc/e500.c
/qemu/hw/ppc/e500plat.c
/qemu/hw/ppc/mac_newworld.c
/qemu/hw/ppc/mac_oldworld.c
/qemu/hw/ppc/mpc8544ds.c
/qemu/hw/ppc/pnv.c
/qemu/hw/ppc/pnv_core.c
/qemu/hw/ppc/ppc.c
/qemu/hw/ppc/ppc405_uc.c
/qemu/hw/ppc/ppc440_bamboo.c
/qemu/hw/ppc/ppc4xx_devs.c
/qemu/hw/ppc/ppc4xx_pci.c
/qemu/hw/ppc/prep.c
/qemu/hw/ppc/spapr.c
/qemu/hw/ppc/spapr_cpu_core.c
/qemu/hw/ppc/spapr_hcall.c
/qemu/hw/ppc/spapr_pci.c
/qemu/hw/ppc/virtex_ml507.c
/qemu/hw/s390x/css.c
/qemu/hw/s390x/event-facility.c
/qemu/hw/s390x/s390-ccw.c
/qemu/hw/s390x/s390-pci-bus.c
/qemu/hw/s390x/s390-virtio-ccw.c
/qemu/hw/s390x/virtio-ccw.c
/qemu/hw/s390x/virtio-ccw.h
/qemu/hw/scsi/esp-pci.c
/qemu/hw/scsi/lsi53c895a.c
/qemu/hw/scsi/megasas.c
/qemu/hw/scsi/mptsas.c
/qemu/hw/scsi/scsi-disk.c
/qemu/hw/scsi/vmw_pvscsi.c
/qemu/hw/sd/sdhci.c
/qemu/hw/sh4/r2d.c
/qemu/hw/sh4/sh_pci.c
/qemu/hw/sh4/shix.c
/qemu/hw/sparc/leon3.c
/qemu/hw/sparc/sun4m.c
/qemu/hw/sparc64/niagara.c
/qemu/hw/sparc64/sparc64.c
/qemu/hw/sparc64/sun4u.c
/qemu/hw/tpm/Makefile.objs
/qemu/hw/tpm/tpm_emulator.c
/qemu/hw/tpm/tpm_int.h
/qemu/hw/tpm/tpm_ioctl.h
/qemu/hw/tpm/tpm_passthrough.c
/qemu/hw/tpm/tpm_tis.c
/qemu/hw/tpm/tpm_util.c
/qemu/hw/tpm/tpm_util.h
/qemu/hw/tricore/tricore_testboard.c
/qemu/hw/unicore32/puv3.c
/qemu/hw/usb/dev-smartcard-reader.c
/qemu/hw/usb/hcd-ehci-pci.c
/qemu/hw/usb/hcd-ohci.c
/qemu/hw/usb/hcd-uhci.c
/qemu/hw/usb/hcd-xhci.c
/qemu/hw/vfio/ccw.c
/qemu/hw/vfio/pci-quirks.c
/qemu/hw/vfio/pci.c
/qemu/hw/virtio/vhost.c
/qemu/hw/virtio/virtio-pci.c
/qemu/hw/virtio/virtio-pci.h
/qemu/hw/virtio/virtio.c
/qemu/hw/watchdog/wdt_i6300esb.c
/qemu/hw/xen/xen_backend.c
/qemu/hw/xen/xen_pt.c
/qemu/hw/xtensa/sim.c
/qemu/hw/xtensa/xtfpga.c
/qemu/include/block/block.h
/qemu/include/block/block_int.h
/qemu/include/disas/bfd.h
/qemu/include/disas/capstone.h
/qemu/include/disas/disas.h
/qemu/include/exec/cpu-all.h
/qemu/include/exec/exec-all.h
/qemu/include/exec/gen-icount.h
/qemu/include/exec/helper-gen.h
/qemu/include/exec/helper-head.h
/qemu/include/exec/log.h
/qemu/include/exec/ram_addr.h
/qemu/include/exec/tb-context.h
/qemu/include/exec/tb-hash-xx.h
/qemu/include/exec/tb-hash.h
/qemu/include/exec/tb-lookup.h
/qemu/include/hw/ide/internal.h
/qemu/include/hw/mips/cps.h
/qemu/include/hw/misc/vmcoreinfo.h
/qemu/include/hw/nvram/fw_cfg.h
/qemu/include/hw/or-irq.h
/qemu/include/hw/pci/pci.h
/qemu/include/hw/ppc/pnv.h
/qemu/include/hw/ppc/pnv_core.h
/qemu/include/hw/ppc/ppc.h
/qemu/include/hw/ppc/spapr.h
/qemu/include/hw/ppc/spapr_cpu_core.h
/qemu/include/hw/qdev-core.h
/qemu/include/hw/s390x/css.h
/qemu/include/hw/s390x/event-facility.h
/qemu/include/hw/s390x/s390-ccw.h
/qemu/include/hw/s390x/s390-virtio-ccw.h
/qemu/include/hw/sparc/sparc64.h
/qemu/include/hw/xen/xen_backend.h
/qemu/include/io/channel-websock.h
/qemu/include/qemu/futex.h
/qemu/include/qemu/osdep.h
/qemu/include/qemu/typedefs.h
/qemu/include/qom/cpu.h
/qemu/include/qom/object.h
/qemu/include/sysemu/dump.h
/qemu/include/sysemu/tpm.h
/qemu/include/sysemu/tpm_backend.h
/qemu/include/ui/console.h
/qemu/include/ui/egl-helpers.h
/qemu/include/ui/gtk.h
/qemu/include/ui/input.h
/qemu/include/ui/sdl2.h
/qemu/include/ui/shader.h
/qemu/include/ui/spice-display.h
/qemu/io/channel-websock.c
/qemu/io/trace-events
/qemu/libdecnumber/Makefile.objs
/qemu/linux-user/arm/target_cpu.h
/qemu/linux-user/elfload.c
/qemu/linux-user/ioctls.h
/qemu/linux-user/main.c
/qemu/linux-user/signal.c
/qemu/linux-user/strace.c
/qemu/linux-user/syscall.c
/qemu/linux-user/syscall_defs.h
/qemu/memory.c
/qemu/migration/migration.c
/qemu/migration/migration.h
/qemu/migration/page_cache.c
/qemu/migration/page_cache.h
/qemu/migration/postcopy-ram.c
/qemu/migration/postcopy-ram.h
/qemu/migration/ram.c
/qemu/migration/ram.h
/qemu/migration/tls.c
/qemu/monitor.c
client.c
common.c
nbd-internal.h
server.c
trace-events
/qemu/net/filter-mirror.c
/qemu/numa.c
/qemu/os-posix.c
/qemu/pc-bios/bios-256k.bin
/qemu/pc-bios/bios.bin
/qemu/pc-bios/keymaps/Makefile
/qemu/pc-bios/keymaps/ar
/qemu/pc-bios/keymaps/bepo
/qemu/pc-bios/keymaps/cz
/qemu/pc-bios/keymaps/da
/qemu/pc-bios/keymaps/de
/qemu/pc-bios/keymaps/de-ch
/qemu/pc-bios/keymaps/en-gb
/qemu/pc-bios/keymaps/en-us
/qemu/pc-bios/keymaps/es
/qemu/pc-bios/keymaps/et
/qemu/pc-bios/keymaps/fi
/qemu/pc-bios/keymaps/fo
/qemu/pc-bios/keymaps/fr
/qemu/pc-bios/keymaps/fr-be
/qemu/pc-bios/keymaps/fr-ca
/qemu/pc-bios/keymaps/fr-ch
/qemu/pc-bios/keymaps/hr
/qemu/pc-bios/keymaps/hu
/qemu/pc-bios/keymaps/is
/qemu/pc-bios/keymaps/it
/qemu/pc-bios/keymaps/ja
/qemu/pc-bios/keymaps/lt
/qemu/pc-bios/keymaps/lv
/qemu/pc-bios/keymaps/mk
/qemu/pc-bios/keymaps/nl
/qemu/pc-bios/keymaps/no
/qemu/pc-bios/keymaps/pl
/qemu/pc-bios/keymaps/pt
/qemu/pc-bios/keymaps/pt-br
/qemu/pc-bios/keymaps/ru
/qemu/pc-bios/keymaps/th
/qemu/pc-bios/keymaps/tr
/qemu/pc-bios/openbios-ppc
/qemu/pc-bios/openbios-sparc32
/qemu/pc-bios/openbios-sparc64
/qemu/pc-bios/s390-ccw.img
/qemu/pc-bios/s390-ccw/sclp.c
/qemu/pc-bios/s390-netboot.img
/qemu/pc-bios/vgabios-cirrus.bin
/qemu/pc-bios/vgabios-qxl.bin
/qemu/pc-bios/vgabios-stdvga.bin
/qemu/pc-bios/vgabios-virtio.bin
/qemu/pc-bios/vgabios-vmware.bin
/qemu/pc-bios/vgabios.bin
/qemu/qapi-schema.json
/qemu/qapi/migration.json
/qemu/qapi/tpm.json
/qemu/qapi/ui.json
/qemu/qemu-doc.texi
/qemu/qemu-img.c
/qemu/qemu-img.texi
/qemu/qemu-io-cmds.c
/qemu/qemu-keymap.c
/qemu/qemu-options.hx
/qemu/qga/commands-posix.c
/qemu/qga/commands-win32.c
/qemu/qga/qapi-schema.json
/qemu/qga/vss-win32/install.cpp
/qemu/qga/vss-win32/requester.cpp
/qemu/qom/cpu.c
/qemu/qom/object.c
/qemu/roms/config.seabios-128k
/qemu/roms/openbios
/qemu/roms/seabios
/qemu/scripts/archive-source.sh
/qemu/scripts/checkpatch.pl
/qemu/scripts/dump-guest-memory.py
/qemu/scripts/git-submodule.sh
/qemu/scsi/qemu-pr-helper.c
/qemu/stubs/Makefile.objs
/qemu/stubs/tpm.c
/qemu/target/alpha/cpu.c
/qemu/target/alpha/cpu.h
/qemu/target/alpha/translate.c
/qemu/target/arm/cpu.c
/qemu/target/arm/helper-a64.c
/qemu/target/arm/helper-a64.h
/qemu/target/arm/op_helper.c
/qemu/target/arm/translate-a64.c
/qemu/target/arm/translate.c
/qemu/target/arm/translate.h
/qemu/target/cris/cpu.c
/qemu/target/cris/cpu.h
/qemu/target/cris/translate.c
/qemu/target/cris/translate_v10.c
/qemu/target/hppa/cpu.c
/qemu/target/hppa/helper.h
/qemu/target/hppa/op_helper.c
/qemu/target/hppa/translate.c
/qemu/target/i386/cpu.c
/qemu/target/i386/translate.c
/qemu/target/lm32/cpu.c
/qemu/target/lm32/cpu.h
/qemu/target/lm32/translate.c
/qemu/target/m68k/cpu.c
/qemu/target/m68k/cpu.h
/qemu/target/m68k/helper.h
/qemu/target/m68k/op_helper.c
/qemu/target/m68k/translate.c
/qemu/target/microblaze/cpu.c
/qemu/target/microblaze/translate.c
/qemu/target/mips/cpu.c
/qemu/target/mips/cpu.h
/qemu/target/mips/mips-defs.h
/qemu/target/mips/translate.c
/qemu/target/mips/translate_init.c
/qemu/target/moxie/cpu.c
/qemu/target/moxie/cpu.h
/qemu/target/moxie/translate.c
/qemu/target/nios2/cpu.c
/qemu/target/nios2/cpu.h
/qemu/target/nios2/translate.c
/qemu/target/openrisc/cpu.c
/qemu/target/openrisc/cpu.h
/qemu/target/openrisc/machine.c
/qemu/target/openrisc/sys_helper.c
/qemu/target/openrisc/translate.c
/qemu/target/ppc/Makefile.objs
/qemu/target/ppc/cpu-models.c
/qemu/target/ppc/cpu-models.h
/qemu/target/ppc/cpu-qom.h
/qemu/target/ppc/cpu.h
/qemu/target/ppc/int_helper.c
/qemu/target/ppc/kvm.c
/qemu/target/ppc/translate.c
/qemu/target/ppc/translate_init.c
/qemu/target/s390x/Makefile.objs
/qemu/target/s390x/cpu-qom.h
/qemu/target/s390x/cpu.c
/qemu/target/s390x/cpu.h
/qemu/target/s390x/cpu_models.c
/qemu/target/s390x/diag.c
/qemu/target/s390x/excp_helper.c
/qemu/target/s390x/helper.c
/qemu/target/s390x/helper.h
/qemu/target/s390x/insn-data.def
/qemu/target/s390x/internal.h
/qemu/target/s390x/interrupt.c
/qemu/target/s390x/ioinst.c
/qemu/target/s390x/kvm-stub.c
/qemu/target/s390x/kvm.c
/qemu/target/s390x/kvm_s390x.h
/qemu/target/s390x/machine.c
/qemu/target/s390x/mem_helper.c
/qemu/target/s390x/misc_helper.c
/qemu/target/s390x/mmu_helper.c
/qemu/target/s390x/sigp.c
/qemu/target/s390x/trace-events
/qemu/target/s390x/translate.c
/qemu/target/sh4/cpu-qom.h
/qemu/target/sh4/cpu.c
/qemu/target/sh4/cpu.h
/qemu/target/sh4/translate.c
/qemu/target/sparc/cpu.c
/qemu/target/sparc/cpu.h
/qemu/target/sparc/translate.c
/qemu/target/tilegx/cpu.c
/qemu/target/tilegx/translate.c
/qemu/target/tricore/cpu.c
/qemu/target/tricore/cpu.h
/qemu/target/tricore/translate.c
/qemu/target/unicore32/cpu.c
/qemu/target/unicore32/cpu.h
/qemu/target/unicore32/translate.c
/qemu/target/xtensa/cpu.c
/qemu/target/xtensa/cpu.h
/qemu/target/xtensa/helper.c
/qemu/target/xtensa/translate.c
/qemu/tcg/optimize.c
/qemu/tcg/tcg-op.c
/qemu/tcg/tcg-op.h
/qemu/tcg/tcg.c
/qemu/tcg/tcg.h
/qemu/tests/.gitignore
/qemu/tests/Makefile.include
/qemu/tests/ahci-test.c
/qemu/tests/boot-order-test.c
/qemu/tests/boot-serial-test.c
/qemu/tests/docker/Makefile.include
/qemu/tests/docker/run
/qemu/tests/endianness-test.c
/qemu/tests/fw_cfg-test.c
/qemu/tests/ipmi-bt-test.c
/qemu/tests/libqos/ahci.c
/qemu/tests/libqos/libqos.c
/qemu/tests/libqos/malloc.c
/qemu/tests/libqtest.c
/qemu/tests/libqtest.h
/qemu/tests/m25p80-test.c
/qemu/tests/migration-test.c
/qemu/tests/pc-cpu-test.c
/qemu/tests/pnv-xscom-test.c
/qemu/tests/prom-env-test.c
/qemu/tests/pxe-test.c
/qemu/tests/qemu-iotests/067
/qemu/tests/qemu-iotests/074.out
/qemu/tests/qemu-iotests/087
/qemu/tests/qemu-iotests/125
/qemu/tests/qemu-iotests/125.out
/qemu/tests/qemu-iotests/127
/qemu/tests/qemu-iotests/127.out
/qemu/tests/qemu-iotests/177
/qemu/tests/qemu-iotests/177.out
/qemu/tests/qemu-iotests/184
/qemu/tests/qemu-iotests/184.out
/qemu/tests/qemu-iotests/191
/qemu/tests/qemu-iotests/191.out
/qemu/tests/qemu-iotests/common.filter
/qemu/tests/qemu-iotests/group
/qemu/tests/qht-bench.c
/qemu/tests/tco-test.c
/qemu/tests/test-filter-mirror.c
/qemu/tests/test-filter-redirector.c
/qemu/tests/vhost-user-bridge.c
/qemu/tests/virtio-balloon-test.c
/qemu/tests/virtio-blk-test.c
/qemu/tests/virtio-console-test.c
/qemu/tests/virtio-serial-test.c
/qemu/tests/vmgenid-test.c
/qemu/tpm.c
/qemu/ui/console-gl.c
/qemu/ui/console.c
/qemu/ui/egl-headless.c
/qemu/ui/egl-helpers.c
/qemu/ui/gtk-egl.c
/qemu/ui/gtk-gl-area.c
/qemu/ui/gtk.c
/qemu/ui/input-keymap.c
/qemu/ui/input-legacy.c
/qemu/ui/input.c
/qemu/ui/keycodemapdb
/qemu/ui/sdl2-gl.c
/qemu/ui/shader.c
/qemu/ui/shader/texture-blit-flip.vert
/qemu/ui/spice-display.c
/qemu/util/osdep.c
/qemu/util/oslib-posix.c
/qemu/util/qemu-sockets.c
/qemu/vl.c
92652b1212-Oct-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd: header constants indenting

Prepare indenting for the following commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Messag

nbd: header constants indenting

Prepare indenting for the following commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171012095319.136610-9-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>

show more ...

de79bfc312-Oct-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd/server: simplify reply transmission

Send qiov via qio_channel_writev_all instead of calling nbd_write twice
with a cork.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
M

nbd/server: simplify reply transmission

Send qiov via qio_channel_writev_all instead of calling nbd_write twice
with a cork.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171012095319.136610-8-vsementsov@virtuozzo.com>
[eblake: rebase to tweaks earlier in series]
Signed-off-by: Eric Blake <eblake@redhat.com>

show more ...

978df1b612-Oct-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd/server: refactor nbd_co_send_simple_reply parameters

Pass client and buffer (*data) parameters directly, to make the function
consistent with further structured reply sending functions.

Signed-

nbd/server: refactor nbd_co_send_simple_reply parameters

Pass client and buffer (*data) parameters directly, to make the function
consistent with further structured reply sending functions.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171012095319.136610-7-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>

show more ...

14cea41d12-Oct-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd/server: do not use NBDReply structure

NBDReply structure will be upgraded in future patches to handle both
simple and structured replies and will be used only in the client

Signed-off-by: Vladi

nbd/server: do not use NBDReply structure

NBDReply structure will be upgraded in future patches to handle both
simple and structured replies and will be used only in the client

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171012095319.136610-6-vsementsov@virtuozzo.com>
[eblake: rebase to tweaks earlier in series]
Signed-off-by: Eric Blake <eblake@redhat.com>

show more ...

caad538412-Oct-2017 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

nbd/server: structurize simple reply header sending

Use packed structure instead of pointer arithmetics.

Also, merge two redundant traces into one.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vse

nbd/server: structurize simple reply header sending

Use packed structure instead of pointer arithmetics.

Also, merge two redundant traces into one.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171012095319.136610-5-vsementsov@virtuozzo.com>
[eblake: tweak and mention impact on traces, fix errp usage]
Signed-off-by: Eric Blake <eblake@redhat.com>

show more ...

12345678910>>...16