From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: Michael Tokarev <mjt@tls.msk.ru>, <qemu-trivial@nongnu.org>
Cc: sw@weilnetz.de, armbru@redhat.com, qemu-devel@nongnu.org,
Paolo Bonzini <pbonzini@redhat.com>,
peter.huangpeng@huawei.com, afaerber@suse.de
Subject: Re: [Qemu-trivial] [PATCH v2] vt82c686: fix coverity warning about out-of-bounds write
Date: Wed, 10 Dec 2014 17:20:38 +0800 [thread overview]
Message-ID: <54881066.9000107@huawei.com> (raw)
In-Reply-To: <54880B00.3030108@msgid.tls.msk.ru>
On 2014/12/10 16:57, Michael Tokarev wrote:
> 09.12.2014 10:15, zhanghailiang wrote:
>> Refactor superio_ioport_writeb to fix the out of bounds write warning.
>
> Is it just a warning, or real oob write?
>>From the code it looks like it's just a warning...
>
Er, i don't know when input 'data' will be oxff,
if this happens, it will access superio_conf->config[0xff] which is out of bounds
for superio_conf->config.
Actually, we should check the 'can_write' when access superio_conf->config[] in the follow codes,
but these codes seem a little odd, so refactor it is better choice. ;)
> []
>> +
>> + }
>> + if (can_write == true) {
>
> 09.12.2014 17:08, Paolo Bonzini wrote:
>> Michael, can you remove "== true" when applying this patch?
>
> Sure, just did. Does it mean I can add your R-b too? ;)
>
cc: Paolo
Thanks.
zhanghailiang
WARNING: multiple messages have this Message-ID (diff)
From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-trivial@nongnu.org
Cc: sw@weilnetz.de, armbru@redhat.com, qemu-devel@nongnu.org,
Paolo Bonzini <pbonzini@redhat.com>,
peter.huangpeng@huawei.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] vt82c686: fix coverity warning about out-of-bounds write
Date: Wed, 10 Dec 2014 17:20:38 +0800 [thread overview]
Message-ID: <54881066.9000107@huawei.com> (raw)
In-Reply-To: <54880B00.3030108@msgid.tls.msk.ru>
On 2014/12/10 16:57, Michael Tokarev wrote:
> 09.12.2014 10:15, zhanghailiang wrote:
>> Refactor superio_ioport_writeb to fix the out of bounds write warning.
>
> Is it just a warning, or real oob write?
>>From the code it looks like it's just a warning...
>
Er, i don't know when input 'data' will be oxff,
if this happens, it will access superio_conf->config[0xff] which is out of bounds
for superio_conf->config.
Actually, we should check the 'can_write' when access superio_conf->config[] in the follow codes,
but these codes seem a little odd, so refactor it is better choice. ;)
> []
>> +
>> + }
>> + if (can_write == true) {
>
> 09.12.2014 17:08, Paolo Bonzini wrote:
>> Michael, can you remove "== true" when applying this patch?
>
> Sure, just did. Does it mean I can add your R-b too? ;)
>
cc: Paolo
Thanks.
zhanghailiang
next prev parent reply other threads:[~2014-12-10 9:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 7:15 [Qemu-trivial] [PATCH v2] vt82c686: fix coverity warning about out-of-bounds write zhanghailiang
2014-12-09 7:15 ` [Qemu-devel] " zhanghailiang
2014-12-09 14:08 ` [Qemu-trivial] " Paolo Bonzini
2014-12-09 14:08 ` [Qemu-devel] " Paolo Bonzini
2014-12-10 8:57 ` [Qemu-trivial] " Michael Tokarev
2014-12-10 8:57 ` [Qemu-devel] " Michael Tokarev
2014-12-10 9:14 ` Paolo Bonzini
2014-12-10 9:14 ` [Qemu-devel] " Paolo Bonzini
2014-12-10 9:20 ` zhanghailiang [this message]
2014-12-10 9:20 ` zhanghailiang
2014-12-10 9:53 ` Paolo Bonzini
2014-12-10 9:53 ` [Qemu-devel] " Paolo Bonzini
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=54881066.9000107@huawei.com \
--to=zhang.zhanghailiang@huawei.com \
--cc=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sw@weilnetz.de \
/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.