[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 570542: qcow2-bitmap: Fix uint64_t left-shift
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 570542: qcow2-bitmap: Fix uint64_t left-shift overflow |
Date: |
Thu, 07 Nov 2019 10:16:45 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 570542ecb11e04b61ef4b3f4d0965a6915232a88
https://github.com/qemu/qemu/commit/570542ecb11e04b61ef4b3f4d0965a6915232a88
Author: Tuguoyi <address@hidden>
Date: 2019-11-07 (Thu, 07 Nov 2019)
Changed paths:
M block/qcow2-bitmap.c
Log Message:
-----------
qcow2-bitmap: Fix uint64_t left-shift overflow
There are two issues in In check_constraints_on_bitmap(),
1) The sanity check on the granularity will cause uint64_t
integer left-shift overflow when cluster_size is 2M and the
granularity is BIGGER than 32K.
2) The way to calculate image size that the maximum bitmap
supported can map to is a bit incorrect.
This patch fix it by add a helper function to calculate the
number of bytes needed by a normal bitmap in image and compare
it to the maximum bitmap bytes supported by qemu.
Fixes: 5f72826e7fc62167cf3a
Signed-off-by: Guoyi Tu <address@hidden>
Message-id: address@hidden
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Cc: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: 24552feb6ae2f615b76c2b95394af43901f75046
https://github.com/qemu/qemu/commit/24552feb6ae2f615b76c2b95394af43901f75046
Author: Max Reitz <address@hidden>
Date: 2019-11-07 (Thu, 07 Nov 2019)
Changed paths:
M block/qcow2.h
Log Message:
-----------
qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK
Masks for L2 table entries should have 64 bit.
Fixes: b6c246942b14d3e0dec46a6c5868ed84e7dbea19
Buglink: https://bugs.launchpad.net/qemu/+bug/1850000
Cc: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: b7cd2c11f76d27930f53d3cf26d7b695c78d613b
https://github.com/qemu/qemu/commit/b7cd2c11f76d27930f53d3cf26d7b695c78d613b
Author: Max Reitz <address@hidden>
Date: 2019-11-07 (Thu, 07 Nov 2019)
Changed paths:
A tests/qemu-iotests/272
A tests/qemu-iotests/272.out
M tests/qemu-iotests/group
Log Message:
-----------
iotests: Add test for 4G+ compressed qcow2 write
Test what qemu-img check says about an image after one has written
compressed data to an offset above 4 GB.
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: f14c8b1b0d6381ac3abd36993c3244e7f9b12301
https://github.com/qemu/qemu/commit/f14c8b1b0d6381ac3abd36993c3244e7f9b12301
Author: Peter Maydell <address@hidden>
Date: 2019-11-07 (Thu, 07 Nov 2019)
Changed paths:
M block/qcow2-bitmap.c
M block/qcow2.h
A tests/qemu-iotests/272
A tests/qemu-iotests/272.out
M tests/qemu-iotests/group
Log Message:
-----------
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-11-07'
into staging
Block patches for 4.2.0-rc0/4.1.1:
- Fix writing to compressed qcow2 images > 4 GB
- Fix size sanity check for qcow2 bitmaps
# gpg: Signature made Thu 07 Nov 2019 14:30:56 GMT
# gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg: issuer "address@hidden"
# gpg: Good signature from "Max Reitz <address@hidden>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40
* remotes/maxreitz/tags/pull-block-2019-11-07:
iotests: Add test for 4G+ compressed qcow2 write
qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK
qcow2-bitmap: Fix uint64_t left-shift overflow
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/6a5d22083d50...f14c8b1b0d63
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 570542: qcow2-bitmap: Fix uint64_t left-shift overflow,
Peter Maydell <=