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

Maxim Levitsky posted 3 patches 4 years, 7 months ago
Test docker-clang@ubuntu failed
Test FreeBSD passed
Test checkpatch passed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190913172741.5662-1-mlevitsk@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
There is a newer version of this series
block/qcow2-cluster.c      | 34 ++++----------
block/qcow2-threads.c      | 81 +++++++++++++++++++++++++++------
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, 215 insertions(+), 45 deletions(-)
create mode 100755 tests/qemu-iotests/263
create mode 100644 tests/qemu-iotests/263.out
[Qemu-devel] [PATCH v6 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335
Posted by Maxim Levitsky 4 years, 7 months ago
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

Best regards,
	Maxim Levitsky

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

 block/qcow2-cluster.c      | 34 ++++----------
 block/qcow2-threads.c      | 81 +++++++++++++++++++++++++++------
 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, 215 insertions(+), 45 deletions(-)
 create mode 100755 tests/qemu-iotests/263
 create mode 100644 tests/qemu-iotests/263.out

-- 
2.17.2


Re: [Qemu-devel] [PATCH v6 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335
Posted by no-reply@patchew.org 4 years, 7 months ago
Patchew URL: https://patchew.org/QEMU/20190913172741.5662-1-mlevitsk@redhat.com/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

libudev           no
default devices   yes

warning: Python 2 support is deprecated
warning: Python 3 will be required for building future versions of QEMU
cross containers  no

NOTE: guest cross-compilers enabled: cc


The full log is available at
http://patchew.org/logs/20190913172741.5662-1-mlevitsk@redhat.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com