qemu-patch-raspberry4/migration
Dr. David Alan Gilbert f68945d42b Add a protective section footer
Badly formatted migration streams can go undetected or produce
misleading errors due to a lock of checking at the end of sections.
In particular a section that adds an extra 0x00 at the end
causes what looks like a normal end of stream and thus doesn't produce
any errors, and something that ends in a 0x01..0x04 kind of look
like real section headers and then fail when the section parser tries
to figure out which section they are.  This is made worse by the
choice of 0x00..0x04 being small numbers that are particularly common
in normal section data.

This patch adds a section footer consisting of a marker (0x7e - ~)
followed by the section-id that was also sent in the header.  If
they mismatch then it throws an error explaining which section was
being loaded.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-06-12 06:54:01 +02:00
..
block.c block: Ensure consistent bitmap function prototypes 2015-04-28 15:36:10 +02:00
exec.c Remove migration- pre/post fixes off files in migration/ dir 2014-12-16 17:47:36 +05:30
fd.c Handle bi-directional communication for fd migration 2015-01-16 13:06:17 +05:30
Makefile.objs Split the QEMU buffered file code out 2014-12-16 17:47:36 +05:30
migration.c Move loadvm_handlers into MigrationIncomingState 2015-06-12 06:54:01 +02:00
qemu-file-buf.c migration: Remove unused functions 2015-03-17 15:20:37 +01:00
qemu-file-internal.h Split struct QEMUFile out 2014-12-16 17:47:36 +05:30
qemu-file-stdio.c Start migrating migration code into a migration directory 2014-12-16 17:47:36 +05:30
qemu-file-unix.c socket shutdown 2015-01-16 13:06:17 +05:30
qemu-file.c Move copy out of qemu_peek_buffer 2015-06-12 06:54:01 +02:00
ram.c arch_init: Clean up the duplicate variable 'len' defining in ram_load() 2015-06-12 06:42:34 +02:00
rdma.c qemu_ram_foreach_block: pass up error value, and down the ramblock name 2015-06-12 06:54:01 +02:00
savevm.c Add a protective section footer 2015-06-12 06:54:01 +02:00
tcp.c Remove migration- pre/post fixes off files in migration/ dir 2014-12-16 17:47:36 +05:30
unix.c Remove migration- pre/post fixes off files in migration/ dir 2014-12-16 17:47:36 +05:30
vmstate.c Move copy out of qemu_peek_buffer 2015-06-12 06:54:01 +02:00
xbzrle.c Start migrating migration code into a migration directory 2014-12-16 17:47:36 +05:30