qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] virtio-9p.c:401: v9fs_string_sprintf: Assertion `!(err


From: Venkateswararao Jujjuri (JV)
Subject: Re: [Qemu-devel] virtio-9p.c:401: v9fs_string_sprintf: Assertion `!(err == -1)' failed.
Date: Wed, 06 Oct 2010 11:25:47 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

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
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]