qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/6] migration: catch unknown flags in ram_load


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 6/6] migration: catch unknown flags in ram_load
Date: Mon, 16 Jun 2014 11:31:54 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 06/15/2014 09:15 PM, Juan Quintela wrote:
> From: Peter Lieven <address@hidden>
> 
> if a saved vm has unknown flags in the memory data qemu
> currently simply ignores this flag and continues which
> yields in an unpredictable result.
> 
> This patch catches all unknown flags and aborts the
> loading of the vm. Additionally error reports are thrown
> if the migration aborts abnormally.

This patch is a strict improvement, so I'm glad it went in.  However, I
still feel that we aren't doing a good job of silently ignoring
unexpected combinations of flag bits, and had suggestions in the
original thread on further followups that are worth having before the
2.1 release.

> -
> -        if (flags & RAM_SAVE_FLAG_COMPRESS) {
> +        } else if (flags & RAM_SAVE_FLAG_COMPRESS) {
>              void *host;

Among other things, switching from a chain of if-else to a switch might
make it easier to document explicit supported combinations of flags and
reject other values from an invalid stream.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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