[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
- [Qemu-devel] virtio device error reporting best practice?, Dave Airlie, 2014/03/17
- Re: [Qemu-devel] virtio device error reporting best practice?, Laszlo Ersek, 2014/03/17
- Re: [Qemu-devel] virtio device error reporting best practice?,
Peter Maydell <=
- Re: [Qemu-devel] virtio device error reporting best practice?, Laszlo Ersek, 2014/03/17
- Re: [Qemu-devel] virtio device error reporting best practice?, Peter Maydell, 2014/03/17
- Re: [Qemu-devel] virtio device error reporting best practice?, Gerd Hoffmann, 2014/03/17
- Re: [Qemu-devel] virtio device error reporting best practice?, Andreas Färber, 2014/03/17
- Re: [Qemu-devel] virtio device error reporting best practice?, Kevin Wolf, 2014/03/18
- Re: [Qemu-devel] virtio device error reporting best practice?, Richard W.M. Jones, 2014/03/17
- Re: [Qemu-devel] virtio device error reporting best practice?, Richard W.M. Jones, 2014/03/17
- Re: [Qemu-devel] virtio device error reporting best practice?, Stefan Hajnoczi, 2014/03/26
Re: [Qemu-devel] virtio device error reporting best practice?, Gerd Hoffmann, 2014/03/17
Re: [Qemu-devel] virtio device error reporting best practice?, Rusty Russell, 2014/03/18