qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-io: don't allow I/O operations larger than INT_MAX
Date: Wed, 1 Feb 2017 23:16:38 +0100	[thread overview]
Message-ID: <5c316901-5632-ff05-7700-6427cd33bf74@redhat.com> (raw)
In-Reply-To: <79f66648c685929a144396bda24d13a207131dcf.1485878688.git.berto@igalia.com>

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]

On 31.01.2017 17:09, Alberto Garcia wrote:
> Passing a request size larger than INT_MAX to any of the I/O commands
> results in an error. While 'read' and 'write' handle the error
> correctly, 'aio_read' and 'aio_write' hit an assertion:
> 
> blk_aio_read_entry: Assertion `rwco->qiov->size == acb->bytes' failed.
> 
> The reason is that the QEMU I/O code cannot handle request sizes
> larger than INT_MAX, so this patch makes qemu-io check that all values
> are within range.
> 
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
>  qemu-io-cmds.c | 21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)

Thanks, applied to my block tree, with
%s/INT_MAX/BDRV_REQUEST_MAX_BYTES/g:

https://github.com/XanClic/qemu/commits/block

(Maybe you should take a quick glance on whether all of the changes are
really OK for you, the commit currently resides under
https://github.com/XanClic/qemu/commit/beaf099368f91eb44ebd49e863c57bc0ff80659f
)

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

  parent reply	other threads:[~2017-02-01 22:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 16:09 [Qemu-devel] [PATCH 0/2] qemu-io: check the size of the I/O requests Alberto Garcia
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 [this message]
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=5c316901-5632-ff05-7700-6427cd33bf74@redhat.com \
    --to=mreitz@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).