From: Alberto Garcia <berto@igalia.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
Max Reitz <mreitz@redhat.com>, Alberto Garcia <berto@igalia.com>
Subject: [Qemu-devel] [PATCH 0/2] qemu-io: check the size of the I/O requests
Date: Tue, 31 Jan 2017 18:09:53 +0200 [thread overview]
Message-ID: <cover.1485878688.git.berto@igalia.com> (raw)
Hi,
qemu-io allows arbitrary values (up to SIZE_MAX) for the size of its
I/O requests, but QEMU cannot handle anything larger than INT_MAX.
$ qemu-io -c 'aio_write 0 2G' hd.qcow2
block/block-backend.c:1035: blk_aio_write_entry:
Assertion `!rwco->qiov || rwco->qiov->size == acb->bytes' failed.
$ qemu-io -c 'aio_read 0 1G 1G' hd.qcow2
block/block-backend.c:1024:
blk_aio_read_entry: Assertion `rwco->qiov->size == acb->bytes' failed.
This series checks that those values are within range and also adds
assertions to qemu_iovec_add() and qemu_iovec_init_external() to
detect these cases earlier.
Regards,
Berto
Alberto Garcia (2):
qemu-io: don't allow I/O operations larger than INT_MAX
iov: assert that qiov->size doesn't exceed INT_MAX
qemu-io-cmds.c | 21 ++++++++++++---------
util/iov.c | 7 ++++++-
2 files changed, 18 insertions(+), 10 deletions(-)
--
2.11.0
next reply other threads:[~2017-01-31 16:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 16:09 Alberto Garcia [this message]
2017-01-31 16:09 ` [Qemu-devel] [PATCH 1/2] qemu-io: don't allow I/O operations larger than INT_MAX Alberto Garcia
2017-01-31 16:31 ` Eric Blake
2017-01-31 16:36 ` Alberto Garcia
2017-01-31 16:41 ` Eric Blake
2017-01-31 18:11 ` Alberto Garcia
2017-01-31 22:33 ` Max Reitz
2017-02-01 21:36 ` Max Reitz
2017-02-01 21:49 ` Alberto Garcia
2017-02-01 22:16 ` Max Reitz
2017-02-02 8:52 ` Alberto Garcia
2017-02-03 19:00 ` Max Reitz
2017-01-31 16:09 ` [Qemu-devel] [PATCH 2/2] iov: assert that qiov->size doesn't exceed INT_MAX Alberto Garcia
2017-01-31 16:45 ` Eric Blake
2017-02-01 21:51 ` Max Reitz
2017-02-01 21:55 ` Alberto Garcia
2017-02-01 21:56 ` Max Reitz
2017-02-01 22:00 ` Alberto Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1485878688.git.berto@igalia.com \
--to=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.