From: Eric Blake <eblake@redhat.com>
To: Juan Quintela <quintela@redhat.com>, qemu-devel@nongnu.org
Cc: Peter Lieven <pl@kamp.de>
Subject: Re: [Qemu-devel] [PATCH 6/6] migration: catch unknown flags in ram_load
Date: Mon, 16 Jun 2014 11:31:54 -0600 [thread overview]
Message-ID: <539F2A0A.40401@redhat.com> (raw)
In-Reply-To: <1402888539-14961-7-git-send-email-quintela@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]
On 06/15/2014 09:15 PM, Juan Quintela wrote:
> From: Peter Lieven <pl@kamp.de>
>
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-06-16 17:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 3:15 [Qemu-devel] [PULL 0/6] migration queue Juan Quintela
2014-06-16 3:15 ` [Qemu-devel] [PATCH 1/6] savevm: Remove all the unneeded version_minimum_id_old (ppc) Juan Quintela
2014-06-16 3:15 ` [Qemu-devel] [PATCH 2/6] savevm: Remove all the unneeded version_minimum_id_old (x86) Juan Quintela
2014-06-16 3:15 ` [Qemu-devel] [PATCH 3/6] vmstate: Refactor opening of files Juan Quintela
2014-06-16 3:15 ` [Qemu-devel] [PATCH 4/6] migration: Increase default max_downtime from 30ms to 300ms Juan Quintela
2014-06-16 3:15 ` [Qemu-devel] [PATCH 5/6] rdma: Fix block during rdma migration Juan Quintela
2014-06-16 3:15 ` [Qemu-devel] [PATCH 6/6] migration: catch unknown flags in ram_load Juan Quintela
2014-06-16 17:31 ` Eric Blake [this message]
2014-06-17 9:31 ` Peter Lieven
2014-06-17 20:32 ` Eric Blake
2014-06-16 10:39 ` [Qemu-devel] [PULL 0/6] migration queue Peter Maydell
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=539F2A0A.40401@redhat.com \
--to=eblake@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).