qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] Re: [PATCH] savevm: fix corruption in vmstate_subsection_load().
Date: Thu, 20 Jan 2011 17:57:32 +0900	[thread overview]
Message-ID: <AANLkTinxXP0cBhW99aNVyoZzTQ7961YoBMAqDq3Ut_Jq@mail.gmail.com> (raw)
In-Reply-To: <4D37F20F.5040008@redhat.com>

2011/1/20 Paolo Bonzini <pbonzini@redhat.com>:
> On 12/14/2010 10:07 AM, Yoshiaki Tamura wrote:
>>
>> Although it's rare to happen in live migration, when the head of a
>> byte stream contains 0x05
>
> IIUC, this happens if you have VMS_STRUCT and the field after the VMS_STRUCT
> starts with 0x5.
>
> I think you should also add this in vmstate_subsection_load:
>
>    sub_vmsd = vmstate_get_subsection(sub, idstr);
>    if (sub_vmsd == NULL) {
>        return -ENOENT;
>    }
> +   assert (!sub_vmsd->subsections);
>    ret = vmstate_load_state(f, sub_vmsd, opaque, version_id);
>
> and this in vmstate_load_state:
>
>    if (field->flags & VMS_STRUCT) {
> +       assert (!vmsd->subsections);
>        ret = vmstate_load_state(f, field->vmsd, addr,
>                                 field->vmsd->version_id);
>    }

Hi Paolo,

You mean, having subsection nested and under VMS_STRUCT are
violations?

Yoshi

>
> Paolo
>
>

  reply	other threads:[~2011-01-20  8:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14  9:07 [Qemu-devel] [PATCH] savevm: fix corruption in vmstate_subsection_load() Yoshiaki Tamura
2011-01-20  2:09 ` Yoshiaki Tamura
2011-01-20  8:27 ` [Qemu-devel] " Paolo Bonzini
2011-01-20  8:57   ` Yoshiaki Tamura [this message]
2011-01-20  9:06     ` Paolo Bonzini
2011-01-20 10:23       ` Yoshiaki Tamura
2011-01-24  8:48         ` Yoshiaki Tamura

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=AANLkTinxXP0cBhW99aNVyoZzTQ7961YoBMAqDq3Ut_Jq@mail.gmail.com \
    --to=tamura.yoshiaki@lab.ntt.co.jp \
    --cc=aliguori@us.ibm.com \
    --cc=pbonzini@redhat.com \
    --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).