Skip to content

Fix qcow2+luks corruption introduced by commit 8ac0f15f335

Maxim Levitsky qemu-devel 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest3 patches 7 repliesIn review
  2. v63 patches 3 repliesSuperseded
  3. v53 patches 7 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v43 patches8 repliesSuperseded
v33 patches5 repliesSuperseded
v23 patches7 repliesSuperseded
v13 patches9 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3block/qcow2: Fix corruption introduced by commit 8ac0f15f335block/qcow2-cluster.c+4 -31 reply
2/3block/qcow2: refactor encryption codeblock/qcow2-cluster.c block/qcow2-threads.c block/qcow2.c +1 more+70 -472 replies
3/3qemu-iotests: Add test for bz #1745922tests/qemu-iotests/263 tests/qemu-iotests/263.out tests/qemu-iotests/group+132 -01 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchVladimir Sementsov-OgievskiyMax Reitz
1/3R-b R-b
2/3R-b
3/3T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [Qemu-devel] [PATCH v7 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335

Commit 8ac0f15f335 accidently broke the COW of non changed areas of newly allocated clusters, when the write spans multiple clusters, and needs COW both prior and after the write.
This results in 'after' COW area being encrypted with wrong sector address, which render it corrupted.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922

CC qemu-stable <[email protected]>

V2: grammar, spelling and code style fixes.
V3: more fixes after the review.
V4: addressed review comments from Max Reitz,
and futher refactored the qcow2_co_encrypt to just take full host and guest offset which simplifies everything.

V5: reworked the patches so one of them fixes the bug
only and other one is just refactoring

V6: removed do_perform_cow_encrypt

V7: removed do_perform_cow_encrypt take two, this
time I hopefully did that correctly :-)
Also updated commit names and messages a bit

Best regards,
Maxim Levitsky

Maxim Levitsky (3):
block/qcow2: Fix corruption introduced by commit 8ac0f15f335 block/qcow2: refactor encryption code
qemu-iotests: Add test for bz #1745922

 block/qcow2-cluster.c      | 40 ++++++-----------
 block/qcow2-threads.c      | 63 ++++++++++++++++++++------
 block/qcow2.c              |  5 ++-
 block/qcow2.h              |  8 ++--
 tests/qemu-iotests/263     | 91 ++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/263.out | 40 +++++++++++++++++
 tests/qemu-iotests/group   |  1 +
 7 files changed, 202 insertions(+), 46 deletions(-)
 create mode 100755 tests/qemu-iotests/263
 create mode 100644 tests/qemu-iotests/263.out
Signature · 1 line
2.17.2