From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
Cc: Max Reitz <mreitz@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block/vmdk: Report failures in vmdk_read_cid()
Date: Fri, 19 Jan 2018 12:35:43 +0100 [thread overview]
Message-ID: <3f6911ff-bc2e-d32d-6516-ec737ebf4703@redhat.com> (raw)
In-Reply-To: <20170728125446.GE3983@localhost.localdomain>
On 28/07/2017 14:54, Kevin Wolf wrote:
> 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?
This has never been fixed, has it? I still see the failure.
Paolo
next prev parent reply other threads:[~2018-01-19 11:35 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
2018-01-19 11:35 ` Paolo Bonzini [this message]
2018-01-24 4:18 ` [Qemu-devel] [Qemu-block] " 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=3f6911ff-bc2e-d32d-6516-ec737ebf4703@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@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).