From: Kevin Wolf <kwolf@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>, Fam Zheng <famz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] block/vmdk: Report failures in vmdk_read_cid()
Date: Fri, 28 Jul 2017 14:54:46 +0200 [thread overview]
Message-ID: <20170728125446.GE3983@localhost.localdomain> (raw)
In-Reply-To: <20170709170614.24967-1-peter.maydell@linaro.org>
Am 09.07.2017 um 19:06 hat Peter Maydell geschrieben:
> The function vmdk_read_cid() can fail if the read on the underlying
> block device fails, or if there's a format error in the VMDK file.
> However its API doesn't provide a mechanism to report these errors,
> and in some cases we were returning a CID of 0 and in some cases a
> CID of 0xffffffff, either of which might potentially be valid values.
>
> Change the function to return 0 on success or a negative errno, and
> return the CID via a uint32_t* argument. Update the callsites to
> handle and propagate the error appropriately.
>
> This fixes in passing a Coverity-spotted issue (CID 1350038) where
> we weren't checking the return value from sscanf().
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Fam, this is the commit that introduced the qemu-iotests 059 failure for
vmdk. I think what's happening is that we use an image produced by a
fuzzer, and with the additional checks introduced in this patch, we now
fail earlier and don't test the condition any more that we wanted to
test.
So do we need a new version of sample_images/afl9.vmdk.bz2 that has a
valid CID?
Kevin
next prev parent reply other threads:[~2017-07-28 12:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-09 17:06 [Qemu-devel] [PATCH] block/vmdk: Report failures in vmdk_read_cid() Peter Maydell
2017-07-10 1:58 ` Fam Zheng
2017-07-13 12:09 ` Kevin Wolf
2017-07-28 12:54 ` Kevin Wolf [this message]
2018-01-19 11:35 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2018-01-24 4:18 ` Fam Zheng
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=20170728125446.GE3983@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=famz@redhat.com \
--cc=mreitz@redhat.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--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).