1 | The following changes since commit aceeaa69d28e6f08a24395d0aa6915b687d0a681: | 1 | The following changes since commit 871af84dd599fab68c8ed414d9ecbdb2bcfc5801: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging (2019-12-17 15:55:20 +0000) | 3 | Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2025-01-29 09:51:03 -0500) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | https://github.com/stefanha/qemu.git tags/block-pull-request | 7 | https://gitlab.com/stefanha/qemu.git tags/block-pull-request |
8 | 8 | ||
9 | for you to fetch changes up to 725fe5d10dbd4259b1853b7d253cef83a3c0d22a: | 9 | for you to fetch changes up to 58607752d173438994d28dea7e2c2587726663e6: |
10 | 10 | ||
11 | virtio-blk: fix out-of-bounds access to bitmap in notify_guest_bh (2019-12-19 16:20:25 +0000) | 11 | parallels: fix ext_off assertion failure due to overflow (2025-01-30 15:22:28 -0500) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Pull request | 14 | Pull request |
15 | 15 | ||
16 | ---------------------------------------------------------------- | 16 | ---------------------------------------------------------------- |
17 | 17 | ||
18 | Li Hangjing (1): | 18 | Denis Rastyogin (1): |
19 | virtio-blk: fix out-of-bounds access to bitmap in notify_guest_bh | 19 | parallels: fix ext_off assertion failure due to overflow |
20 | 20 | ||
21 | Stefan Hajnoczi (2): | 21 | block/parallels.c | 4 ++++ |
22 | virtio-blk: deprecate SCSI passthrough | 22 | 1 file changed, 4 insertions(+) |
23 | docs: fix rst syntax errors in unbuilt docs | ||
24 | |||
25 | docs/arm-cpu-features.rst | 6 +++--- | ||
26 | docs/virtio-net-failover.rst | 4 ++-- | ||
27 | docs/virtio-pmem.rst | 19 ++++++++++--------- | ||
28 | hw/block/dataplane/virtio-blk.c | 2 +- | ||
29 | qemu-deprecated.texi | 11 +++++++++++ | ||
30 | 5 files changed, 27 insertions(+), 15 deletions(-) | ||
31 | 23 | ||
32 | -- | 24 | -- |
33 | 2.23.0 | 25 | 2.48.1 |
34 | |||
35 | -- | ||
36 | libvir-list mailing list | ||
37 | libvir-list@redhat.com | ||
38 | https://www.redhat.com/mailman/listinfo/libvir-list | ||
39 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough | ||
2 | support. Deprecate this feature in QEMU too. | ||
3 | 1 | ||
4 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
5 | Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> | ||
6 | Reviewed-by: Christoph Hellwig <hch@lst.de> | ||
7 | Reviewed-by: Thomas Huth <thuth@redhat.com> | ||
8 | Message-id: 20191213144626.1208237-1-stefanha@redhat.com | ||
9 | Message-Id: <20191213144626.1208237-1-stefanha@redhat.com> | ||
10 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
11 | --- | ||
12 | qemu-deprecated.texi | 11 +++++++++++ | ||
13 | 1 file changed, 11 insertions(+) | ||
14 | |||
15 | diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi | ||
16 | index XXXXXXX..XXXXXXX 100644 | ||
17 | --- a/qemu-deprecated.texi | ||
18 | +++ b/qemu-deprecated.texi | ||
19 | @@ -XXX,XX +XXX,XX @@ spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. | ||
20 | |||
21 | @section Device options | ||
22 | |||
23 | +@subsection Emulated device options | ||
24 | + | ||
25 | +@subsubsection -device virtio-blk,scsi=on|off (since 5.0.0) | ||
26 | + | ||
27 | +The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0 | ||
28 | +and later do not support it because the virtio-scsi device was introduced for | ||
29 | +full SCSI support. Use virtio-scsi instead when SCSI passthrough is required. | ||
30 | + | ||
31 | +Note this also applies to ``-device virtio-blk-pci,scsi=on|off'', which is an | ||
32 | +alias. | ||
33 | + | ||
34 | @subsection Block device options | ||
35 | |||
36 | @subsubsection "backing": "" (since 2.12.0) | ||
37 | -- | ||
38 | 2.23.0 | ||
39 | |||
40 | -- | ||
41 | libvir-list mailing list | ||
42 | libvir-list@redhat.com | ||
43 | https://www.redhat.com/mailman/listinfo/libvir-list | ||
44 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | The .rst files outside docs/{devel,interop,specs} aren't built yet and | ||
2 | therefore a few syntax errors have slipped through. Fix them. | ||
3 | 1 | ||
4 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
5 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
6 | Message-Id: <20191111094411.427174-1-stefanha@redhat.com> | ||
7 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
8 | --- | ||
9 | docs/arm-cpu-features.rst | 6 +++--- | ||
10 | docs/virtio-net-failover.rst | 4 ++-- | ||
11 | docs/virtio-pmem.rst | 19 ++++++++++--------- | ||
12 | 3 files changed, 15 insertions(+), 14 deletions(-) | ||
13 | |||
14 | diff --git a/docs/arm-cpu-features.rst b/docs/arm-cpu-features.rst | ||
15 | index XXXXXXX..XXXXXXX 100644 | ||
16 | --- a/docs/arm-cpu-features.rst | ||
17 | +++ b/docs/arm-cpu-features.rst | ||
18 | @@ -XXX,XX +XXX,XX @@ CPU type is possible with the `query-cpu-model-expansion` QMP command. | ||
19 | Below are some examples where `scripts/qmp/qmp-shell` (see the top comment | ||
20 | block in the script for usage) is used to issue the QMP commands. | ||
21 | |||
22 | -(1) Determine which CPU features are available for the `max` CPU type | ||
23 | - (Note, we started QEMU with qemu-system-aarch64, so `max` is | ||
24 | - implementing the ARMv8-A reference manual in this case):: | ||
25 | +1. Determine which CPU features are available for the `max` CPU type | ||
26 | + (Note, we started QEMU with qemu-system-aarch64, so `max` is | ||
27 | + implementing the ARMv8-A reference manual in this case):: | ||
28 | |||
29 | (QEMU) query-cpu-model-expansion type=full model={"name":"max"} | ||
30 | { "return": { | ||
31 | diff --git a/docs/virtio-net-failover.rst b/docs/virtio-net-failover.rst | ||
32 | index XXXXXXX..XXXXXXX 100644 | ||
33 | --- a/docs/virtio-net-failover.rst | ||
34 | +++ b/docs/virtio-net-failover.rst | ||
35 | @@ -XXX,XX +XXX,XX @@ | ||
36 | -======================== | ||
37 | +====================================== | ||
38 | QEMU virtio-net standby (net_failover) | ||
39 | -======================== | ||
40 | +====================================== | ||
41 | |||
42 | This document explains the setup and usage of virtio-net standby feature which | ||
43 | is used to create a net_failover pair of devices. | ||
44 | diff --git a/docs/virtio-pmem.rst b/docs/virtio-pmem.rst | ||
45 | index XXXXXXX..XXXXXXX 100644 | ||
46 | --- a/docs/virtio-pmem.rst | ||
47 | +++ b/docs/virtio-pmem.rst | ||
48 | @@ -XXX,XX +XXX,XX @@ virtio pmem usage | ||
49 | ----------------- | ||
50 | |||
51 | A virtio pmem device backed by a memory-backend-file can be created on | ||
52 | - the QEMU command line as in the following example: | ||
53 | + the QEMU command line as in the following example:: | ||
54 | |||
55 | - -object memory-backend-file,id=mem1,share,mem-path=./virtio_pmem.img,size=4G | ||
56 | - -device virtio-pmem-pci,memdev=mem1,id=nv1 | ||
57 | + -object memory-backend-file,id=mem1,share,mem-path=./virtio_pmem.img,size=4G | ||
58 | + -device virtio-pmem-pci,memdev=mem1,id=nv1 | ||
59 | |||
60 | - where: | ||
61 | - - "object memory-backend-file,id=mem1,share,mem-path=<image>, size=<image size>" | ||
62 | - creates a backend file with the specified size. | ||
63 | + where: | ||
64 | |||
65 | - - "device virtio-pmem-pci,id=nvdimm1,memdev=mem1" creates a virtio pmem | ||
66 | - pci device whose storage is provided by above memory backend device. | ||
67 | + - "object memory-backend-file,id=mem1,share,mem-path=<image>, size=<image size>" | ||
68 | + creates a backend file with the specified size. | ||
69 | + | ||
70 | + - "device virtio-pmem-pci,id=nvdimm1,memdev=mem1" creates a virtio pmem | ||
71 | + pci device whose storage is provided by above memory backend device. | ||
72 | |||
73 | Multiple virtio pmem devices can be created if multiple pairs of "-object" | ||
74 | and "-device" are provided. | ||
75 | @@ -XXX,XX +XXX,XX @@ memory backing has to be added via 'object_add'; afterwards, the virtio | ||
76 | pmem device can be added via 'device_add'. | ||
77 | |||
78 | For example, the following commands add another 4GB virtio pmem device to | ||
79 | -the guest: | ||
80 | +the guest:: | ||
81 | |||
82 | (qemu) object_add memory-backend-file,id=mem2,share=on,mem-path=virtio_pmem2.img,size=4G | ||
83 | (qemu) device_add virtio-pmem-pci,id=virtio_pmem2,memdev=mem2 | ||
84 | -- | ||
85 | 2.23.0 | ||
86 | |||
87 | -- | ||
88 | libvir-list mailing list | ||
89 | libvir-list@redhat.com | ||
90 | https://www.redhat.com/mailman/listinfo/libvir-list | diff view generated by jsdifflib |
1 | From: Li Hangjing <lihangjing@baidu.com> | 1 | From: Denis Rastyogin <gerben@altlinux.org> |
---|---|---|---|
2 | 2 | ||
3 | When the number of a virtio-blk device's virtqueues is larger than | 3 | This error was discovered by fuzzing qemu-img. |
4 | BITS_PER_LONG, the out-of-bounds access to bitmap[ ] will occur. | ||
5 | 4 | ||
6 | Fixes: e21737ab15 ("virtio-blk: multiqueue batch notify") | 5 | When ph.ext_off has a sufficiently large value, the operation |
7 | Cc: qemu-stable@nongnu.org | 6 | le64_to_cpu(ph.ext_off) << BDRV_SECTOR_BITS in |
8 | Cc: Stefan Hajnoczi <stefanha@redhat.com> | 7 | parallels_read_format_extension() can cause an overflow in int64_t. |
9 | Signed-off-by: Li Hangjing <lihangjing@baidu.com> | 8 | This overflow triggers the assert(ext_off > 0) |
10 | Reviewed-by: Xie Yongji <xieyongji@baidu.com> | 9 | check in block/parallels-ext.c: parallels_read_format_extension(), |
11 | Reviewed-by: Chai Wen <chaiwen@baidu.com> | 10 | leading to a crash. |
12 | Message-id: 20191216023050.48620-1-lihangjing@baidu.com | 11 | |
13 | Message-Id: <20191216023050.48620-1-lihangjing@baidu.com> | 12 | This commit adds a check to prevent overflow when shifting ph.ext_off |
13 | by BDRV_SECTOR_BITS, ensuring that the value remains within a valid range. | ||
14 | |||
15 | Reported-by: Leonid Reviakin <L.reviakin@fobos-nt.ru> | ||
16 | Signed-off-by: Denis Rastyogin <gerben@altlinux.org> | ||
17 | Reviewed-by: Denis V. Lunev <den@openvz.org> | ||
18 | Message-ID: <20241212104212.513947-2-gerben@altlinux.org> | ||
14 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 19 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
15 | --- | 20 | --- |
16 | hw/block/dataplane/virtio-blk.c | 2 +- | 21 | block/parallels.c | 4 ++++ |
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | 22 | 1 file changed, 4 insertions(+) |
18 | 23 | ||
19 | diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c | 24 | diff --git a/block/parallels.c b/block/parallels.c |
20 | index XXXXXXX..XXXXXXX 100644 | 25 | index XXXXXXX..XXXXXXX 100644 |
21 | --- a/hw/block/dataplane/virtio-blk.c | 26 | --- a/block/parallels.c |
22 | +++ b/hw/block/dataplane/virtio-blk.c | 27 | +++ b/block/parallels.c |
23 | @@ -XXX,XX +XXX,XX @@ static void notify_guest_bh(void *opaque) | 28 | @@ -XXX,XX +XXX,XX @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags, |
24 | memset(s->batch_notify_vqs, 0, sizeof(bitmap)); | 29 | error_setg(errp, "Catalog too large"); |
25 | 30 | return -EFBIG; | |
26 | for (j = 0; j < nvqs; j += BITS_PER_LONG) { | 31 | } |
27 | - unsigned long bits = bitmap[j]; | 32 | + if (le64_to_cpu(ph.ext_off) >= (INT64_MAX >> BDRV_SECTOR_BITS)) { |
28 | + unsigned long bits = bitmap[j / BITS_PER_LONG]; | 33 | + error_setg(errp, "Invalid image: Too big offset"); |
29 | 34 | + return -EFBIG; | |
30 | while (bits != 0) { | 35 | + } |
31 | unsigned i = j + ctzl(bits); | 36 | |
37 | size = bat_entry_off(s->bat_size); | ||
38 | s->header_size = ROUND_UP(size, bdrv_opt_mem_align(bs->file->bs)); | ||
32 | -- | 39 | -- |
33 | 2.23.0 | 40 | 2.48.1 |
34 | |||
35 | -- | ||
36 | libvir-list mailing list | ||
37 | libvir-list@redhat.com | ||
38 | https://www.redhat.com/mailman/listinfo/libvir-list | ||
39 | diff view generated by jsdifflib |