From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38386 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhORs-0000pj-Nr for qemu-devel@nongnu.org; Mon, 24 Jan 2011 10:35:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhORr-00021v-BA for qemu-devel@nongnu.org; Mon, 24 Jan 2011 10:35:20 -0500 Received: from mail-vw0-f45.google.com ([209.85.212.45]:53459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhORr-00021p-7Q for qemu-devel@nongnu.org; Mon, 24 Jan 2011 10:35:19 -0500 Received: by vws12 with SMTP id 12so1781378vws.4 for ; Mon, 24 Jan 2011 07:35:18 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4D3D9C30.1020702@redhat.com> Date: Mon, 24 Jan 2011 16:35:12 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1295861427-30851-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> In-Reply-To: <1295861427-30851-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2] savevm: fix corruption in vmstate_subsection_load(). List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yoshiaki Tamura Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, quintela@redhat.com On 01/24/2011 10:30 AM, Yoshiaki Tamura wrote: > Although it's rare to happen in live migration, when the head of a > byte stream contains 0x05 which is the marker of subsection, the > loader gets corrupted because vmstate_subsection_load() continues even > the device doesn't require it. This patch adds a checker whether > subsection is needed, and skips following routines if not needed. > > Signed-off-by: Yoshiaki Tamura VMS_STRUCT is a can of worms, since almost all uses of subsections _are_ VMS_STRUCTs. So almost all uses of subsections have ambiguous parsing. :/ So, for now, Acked-by: Paolo Bonzini Paolo