From: Jason Wang <jasowang@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
mst@redhat.com, qemu-devel@nongnu.org
Cc: peterx@redhat.com
Subject: Re: [Qemu-devel] [PATCH] virtio: destroy region cache during reset
Date: Wed, 8 Mar 2017 14:22:06 +0800 [thread overview]
Message-ID: <61938aa1-2698-f55e-ea1c-e7d96da0b5d7@redhat.com> (raw)
In-Reply-To: <f3e9db7e-f3ab-1ae5-4da6-05dbd8d0206f@redhat.com>
On 2017年03月08日 11:21, Jason Wang wrote:
>
> On 2017年03月07日 18:55, Paolo Bonzini wrote:
>>
>> On 07/03/2017 09:47, Jason Wang wrote:
>>> We don't destroy region cache during reset which can make the maps
>>> of previous driver leaked to a buggy or malicious driver that don't
>>> set vring address before starting to use the device.
>> I'm still not sure as to how this can happen. Reset does clear
>> desc/used/avail, which should then be checked before accessing the
>> caches.
>
> But the code does not check them in fact? (E.g the attached qtest
> patch can still pass check-qtest).
>
> Thanks
Ok, the reproducer seems wrong. And I think what you mean is something
like the check done in virtio_queue_ready(). But looks like not all
virtqueue check for this. One example is virtio_net_handle_ctrl(), and
there may be even more. So you want to fix them all?
Thanks
next prev parent reply other threads:[~2017-03-08 6:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 8:47 [Qemu-devel] [PATCH] virtio: destroy region cache during reset Jason Wang
2017-03-07 10:16 ` Cornelia Huck
2017-03-08 3:18 ` Jason Wang
2017-03-08 9:19 ` Cornelia Huck
2017-03-08 9:51 ` Jason Wang
2017-03-08 10:12 ` Cornelia Huck
2017-03-09 2:19 ` Jason Wang
2017-03-09 11:07 ` Cornelia Huck
2017-03-09 11:12 ` Paolo Bonzini
2017-03-09 11:38 ` Cornelia Huck
2017-03-10 10:57 ` Jason Wang
2017-03-07 10:55 ` Paolo Bonzini
2017-03-08 3:21 ` Jason Wang
2017-03-08 6:22 ` Jason Wang [this message]
2017-03-08 9:10 ` Paolo Bonzini
2017-03-08 9:48 ` Jason Wang
2017-03-09 11:10 ` Paolo Bonzini
2017-03-09 11:49 ` Cornelia Huck
2017-03-08 9:30 ` Cornelia Huck
2017-03-08 9:53 ` Jason Wang
2017-03-08 10:15 ` Cornelia Huck
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=61938aa1-2698-f55e-ea1c-e7d96da0b5d7@redhat.com \
--to=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--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).