qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] virtio device error reporting best practice?


From: Peter Maydell
Subject: Re: [Qemu-devel] virtio device error reporting best practice?
Date: Mon, 17 Mar 2014 14:40:09 +0000

On 17 March 2014 14:28, Laszlo Ersek <address@hidden> wrote:
> On 03/17/14 07:02, Dave Airlie wrote:
>> The main reason I'm considering this stuff is for security reasons if
>> the guest asks for something really illegal or crazy what should the
>> expected behaviour of the host be? (at least secure I know that).
>
> exit(1).

No thanks -- the guest should never be able to cause QEMU
to exit (in an ideal world). Use
   qemu_log_mask(LOG_GUEST_ERROR, ...)
and continue.

> If you grep qemu for it, you'll find such examples. Notably,
> "hw/virtio/virtio.c" is chock full of them; if the guest doesn't speak
> the basic protocol, there's nothing for the host to do. See also
> virtio-blk.c (missing or incorrect headers), virtio-net.c (similar
> protocol violations), virtio-scsi.c (wrong header size, bad config etc).

I think these are all examples of legacy code written before we
had a sensible logging API for this kind of thing.

thanks
-- PMM



reply via email to

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