All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] Fix VMSTATE_BUFFER_UNSAFE macro usage
@ 2013-03-10 13:47 Igor Mitsyanko
  2013-03-10 13:47 ` [Qemu-devel] [PATCH 1/3] vmstate.h: introduce VMSTATE_BUFFER_POINTER_UNSAFE macro Igor Mitsyanko
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Igor Mitsyanko @ 2013-03-10 13:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, i.mitsyanko, andrew, michael, paul, anthony

hw/sd.c and hw/onenand.c were wrongly using VMSTATE_BUFFER_UNSAFE for dynamically
allocated buffer migration, this was causing memory corruption. 
Use VMSTATE_BUFFER_POINTER_UNSAFE (wich has an additional VMS_POINTER flag set) instead.

Not sure what to do with vmstate version for his devices, should I bump it? Migration
was never working for them anyway.

Only tested hw/sd.c, by saving/loading a snapshot of VM while it was playing videofile
from SD card.

Igor Mitsyanko (3):
  vmstate.h: introduce VMSTATE_BUFFER_POINTER_UNSAFE macro
  hw/sd.c: fix migration of dynamically allocated buffer "buf"
  hw/onenand.c: fix migration of dynamically allocated buffer "otp"

 hw/onenand.c                |    3 ++-
 hw/sd.c                     |    2 +-
 include/migration/vmstate.h |    9 +++++++++
 3 files changed, 12 insertions(+), 2 deletions(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-18 18:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-10 13:47 [Qemu-devel] [PATCH 0/3] Fix VMSTATE_BUFFER_UNSAFE macro usage Igor Mitsyanko
2013-03-10 13:47 ` [Qemu-devel] [PATCH 1/3] vmstate.h: introduce VMSTATE_BUFFER_POINTER_UNSAFE macro Igor Mitsyanko
2013-03-10 13:47 ` [Qemu-devel] [PATCH 2/3] hw/sd.c: fix migration of dynamically allocated buffer "buf" Igor Mitsyanko
2013-03-18 18:33   ` Michael Walle
2013-03-10 13:47 ` [Qemu-devel] [PATCH 3/3] hw/onenand.c: fix migration of dynamically allocated buffer "otp" Igor Mitsyanko
2013-03-15 17:12 ` [Qemu-devel] [PATCH 0/3] Fix VMSTATE_BUFFER_UNSAFE macro usage Peter Maydell
     [not found]   ` <51435829.5020106@gmail.com>
2013-03-15 17:23     ` Igor Mitsyanko
2013-03-18 16:19 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.