Add section footers to detect corrupted migration streams
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 12 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | Merge section header writingsavevm.c | +28 | 1 reply | |
| 2/4 | Disable section footers on older machine typeshw/ hw/ include/ +1 more | +12 | 2 replies | |
| 3/4 | Add a protective section footerinclude/ savevm.c | +62 | 1 reply | |
| 4/4 | Teach analyze-migration.py about section footersscripts/ | +5 | 0 replies |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Amit Shah | Juan Quintela |
|---|---|---|
| Series | R-b | |
| 1/4 | R-b | |
| 2/4 | R-b | |
| 3/4 | R-b | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH 0/4] Add section footers to detect corrupted migration streams
From: "Dr. David Alan Gilbert" <[email protected]>
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 series 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.
The footers are tied to new machine types (on both pc types).
Dr. David Alan Gilbert (4):
Merge section header writing
Disable section footers on older machine types Add a protective section footer
Teach analyze-migration.py about section footers
hw/i386/pc_piix.c | 2 + hw/i386/pc_q35.c | 2 + include/migration/migration.h | 2 + savevm.c | 141 ++++++++++++++++++++++++++++-------------- scripts/analyze-migration.py | 5 ++ 5 files changed, 107 insertions(+), 45 deletions(-)
Signature · 1 line
2.4.1