All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v7 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335
@ 2019-09-15 20:36 Maxim Levitsky
  2019-09-15 20:36 ` [Qemu-devel] [PATCH v7 1/3] block/qcow2: Fix " Maxim Levitsky
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Maxim Levitsky @ 2019-09-15 20:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Vladimir Sementsov-Ogievskiy,
	Daniel P . Berrangé,
	qemu-block, qemu-stable, Max Reitz, Maxim Levitsky

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 <qemu-stable@nongnu.org>

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

-- 
2.17.2



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

end of thread, other threads:[~2019-09-16 15:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-15 20:36 [Qemu-devel] [PATCH v7 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335 Maxim Levitsky
2019-09-15 20:36 ` [Qemu-devel] [PATCH v7 1/3] block/qcow2: Fix " Maxim Levitsky
2019-09-16 12:42   ` Max Reitz
2019-09-15 20:36 ` [Qemu-devel] [PATCH v7 2/3] block/qcow2: refactor encryption code Maxim Levitsky
2019-09-16  9:17   ` Vladimir Sementsov-Ogievskiy
2019-09-16 12:46   ` Max Reitz
2019-09-15 20:36 ` [Qemu-devel] [PATCH v7 3/3] qemu-iotests: Add test for bz #1745922 Maxim Levitsky
2019-09-16 12:46   ` Max Reitz
2019-09-16 13:39 ` [Qemu-devel] [PATCH v7 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335 Max Reitz
2019-09-16 13:59   ` Maxim Levitsky
2019-09-16 14:59     ` Maxim Levitsky

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.