From: "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] virtio-9p.c:401: v9fs_string_sprintf: Assertion `!(err == -1)' failed.
Date: Wed, 06 Oct 2010 11:25:47 -0700 [thread overview]
Message-ID: <4CACBF2B.3050901@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTikQmwtfS51XFEXh-sxrHZeP3KEUVRd9Vj5kg+kj@mail.gmail.com>
On 10/6/2010 7:42 AM, Stefan Hajnoczi wrote:
> On a related note, there are more uses of BUG_ON() in hw/virtio-9p.c
> which can be triggered from the guest:
>
> submit_pdu():
> BUG_ON(pdu->id >= ARRAY_SIZE(pdu_handlers));
> BUG_ON(handler == NULL);
>
> handle_9p_output():
> BUG_ON(pdu->elem.out_num == 0 || pdu->elem.in_num == 0);
> BUG_ON(pdu->elem.out_sg[0].iov_len < 7);
>
yeah.. these BUG_ONs make sense only if we "trust" the client.
> These should be handled by skipping the bad virtqueue element. We
> could also reset the device but that may freak out the (bad) guest.
May be log an error and skip it? Reset is not a bad idea..if we decided to punish
the client for sending something that is not acceptable. .. any comments?
- JV
>
> Stefan
>
next prev parent reply other threads:[~2010-10-06 18:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 12:48 [Qemu-devel] virtio-9p.c:401: v9fs_string_sprintf: Assertion `!(err == -1)' failed Gerd Hoffmann
2010-10-06 14:42 ` Stefan Hajnoczi
2010-10-06 18:25 ` Venkateswararao Jujjuri (JV) [this message]
2010-10-06 17:58 ` Venkateswararao Jujjuri (JV)
2010-10-06 20:26 ` Venkateswararao Jujjuri (JV)
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=4CACBF2B.3050901@linux.vnet.ibm.com \
--to=jvrao@linux.vnet.ibm.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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.