259 Commits

Author SHA1 Message Date
Jiajie Li
c29fbf0083 add iscsi rpm package requirement 2021-03-11 21:10:41 +08:00
Jiajie Li
d82535f081 iscsi: make iscsi rpm package
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-03-10 15:15:45 +08:00
openeuler-ci-bot
22d951e1e6 !214 qemu spec: configure for zstd
From: @lijiajie128
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-03-04 09:18:37 +08:00
Jiajie Li
482b3d0cc3 qemu spec: add --enable-zstd to configure parameter
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-03-03 14:47:59 +08:00
openeuler-ci-bot
5ad95274c0 !206 Automatically generate code patches with openeuler !77 !78
From: @zhendongchen
Reviewed-by: @yorifang,@yorifang
Signed-off-by: @yorifang,@yorifang
2021-02-27 14:53:20 +08:00
Euler Robot
6dd6890812 spec: Update release version with !77 !78
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-02-26 16:28:21 +08:00
Euler Robot
f8f7dd42e8 spec: Update patch and changelog with !78
block-backend: Stop retrying when draining

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-02-26 16:27:55 +08:00
Huawei Technologies Co., Ltd
5f96f6bac3 block-backend: Stop retrying when draining
Retrying failed requests when draining would make the draining hung. So it
is better not to trigger the retry timer when draining. And after the
virtual devices go back to work, they would retry those queued requests.

Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-02-26 16:27:55 +08:00
Euler Robot
f8b7dd549d spec: Update patch and changelog with !77
ide:atapi: check io_buffer_index in ide_atapi_cmd_reply_end

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-02-26 16:27:53 +08:00
Huawei Technologies Co., Ltd
42a23f0a2f ide:atapi: check io_buffer_index in ide_atapi_cmd_reply_end
Fix CVE-2020-29443

During data transfer via packet command in 'ide_atapi_cmd_reply_end'
's->io_buffer_index' could exceed the 's->io_buffer' length, leading
to OOB access issue. Add check to avoid it.
 ...
 #9  ahci_pio_transfer ../hw/ide/ahci.c:1383
 #10 ide_transfer_start_norecurse ../hw/ide/core.c:553
 #11 ide_atapi_cmd_reply_end ../hw/ide/atapi.c:284
 #12 ide_atapi_cmd_read_pio ../hw/ide/atapi.c:329
 #13 ide_atapi_cmd_read ../hw/ide/atapi.c:442
 #14 cmd_read ../hw/ide/atapi.c:988
 #15 ide_atapi_cmd ../hw/ide/atapi.c:1352
 #16 ide_transfer_start ../hw/ide/core.c:561
 #17 cmd_packet ../hw/ide/core.c:1729
 #18 ide_exec_cmd ../hw/ide/core.c:2107
 #19 handle_reg_h2d_fis ../hw/ide/ahci.c:1267
 #20 handle_cmd ../hw/ide/ahci.c:1318
 #21 check_cmd ../hw/ide/ahci.c:592
 #22 ahci_port_write ../hw/ide/ahci.c:373
 #23 ahci_mem_write ../hw/ide/ahci.c:513

Reported-by: Wenxiang Qian <leonwxqian@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-02-26 16:27:53 +08:00
openeuler-ci-bot
84aba4188b !204 Automatically generate code patches with openeuler !71
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-02-24 15:22:20 +08:00
Euler Robot
cfccf26734 spec: Update release version with !71
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-02-19 21:28:48 +08:00
Euler Robot
e76de305cc spec: Update patch and changelog with !71
ati: use vga_read_byte in ati_cursor_define
sd: sdhci: assert data_count is within fifo_buffer
msix: add valid.accepts methods to check address

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-02-19 21:27:56 +08:00
Huawei Technologies Co., Ltd
bd0d09f113 msix: add valid.accepts methods to check address
Fix CVE-2020-13754

While doing msi-x mmio operations, a guest may send an address
that leads to an OOB access issue. Add valid.accepts methods to
ensure that ensuing mmio r/w operation don't go beyond regions.

Reported-by: Ren Ding <rding@gatech.edu>
Reported-by: Hanqing Zhao <hanqing@gatech.edu>
Reported-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>

patch link: https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00004.html
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-02-19 21:27:56 +08:00
Huawei Technologies Co., Ltd
03ac057064 sd: sdhci: assert data_count is within fifo_buffer
Fix CVE-2020-17380

While doing multi block SDMA, transfer block size may exceed
the 's->fifo_buffer[s->buf_maxsz]' size. It may leave the
current element pointer 's->data_count' pointing out of bounds.
Leading the subsequent DMA r/w operation to OOB access issue.
Assert that 's->data_count' is within fifo_buffer.

 -> https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Fsdhci_oob_write1
 ==1459837==ERROR: AddressSanitizer: heap-buffer-overflow
 WRITE of size 54722048 at 0x61500001e280 thread T3
 #0  __interceptor_memcpy (/lib64/libasan.so.6+0x3a71d)
 #1  flatview_read_continue ../exec.c:3245
 #2  flatview_read ../exec.c:3278
 #3  address_space_read_full ../exec.c:3291
 #4  address_space_rw ../exec.c:3319
 #5  dma_memory_rw_relaxed ../include/sysemu/dma.h:87
 #6  dma_memory_rw ../include/sysemu/dma.h:110
 #7  dma_memory_read ../include/sysemu/dma.h:116
 #8  sdhci_sdma_transfer_multi_blocks ../hw/sd/sdhci.c:629
 #9  sdhci_write ../hw/sd/sdhci.c:1097
 #10 memory_region_write_accessor ../softmmu/memory.c:483
 ...

Reported-by: Ruhr-University <bugs-syssec@rub.de>
Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>

patch link: https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg01175.html
Signed-off-by: Jiajie Li <lijiajie11@hw.com>
2021-02-19 21:27:56 +08:00
Huawei Technologies Co., Ltd
ecc2505f20 ati: use vga_read_byte in ati_cursor_define
fix CVE-2019-20808

This makes sure reads are confined to vga video memory.

v3: use uint32_t, fix cut+paste bug.
v2: fix ati_cursor_draw_line too.

Reported-by: xu hang <flier_m@outlook.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190917111441.27405-3-kraxel@redhat.com

cherry-pick from aab0e2a661b2b6bf7915c0aefe807fb60d6d9d13
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-02-19 21:27:56 +08:00
openeuler-ci-bot
2e657fa808 !199 Automatically generate code patches with openeuler !69
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-02-10 10:24:41 +08:00
Euler Robot
99eb051c68 spec: Update release version with !69
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-02-04 16:28:08 +08:00
Euler Robot
ef3cb17353 spec: Update patch and changelog with !69
migration: Add multi-thread compress method
migration: Refactoring multi-thread compress migration
migration: Add multi-thread compress ops
migration: Add zstd support in multi-thread compression
migration: Add compress_level sanity check
doc: Update multi-thread compression doc
configure: Enable test and libs for zstd

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-02-04 16:27:33 +08:00
Huawei Technologies Co., Ltd
086515ab47 configure: Enable test and libs for zstd
configure: Enable test and libs for zstd
Add it to several build systems to make testing good.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-02-04 16:27:33 +08:00
Huawei Technologies Co., Ltd
928670c540 doc: Update multi-thread compression doc
Modify the doc to fit the previous changes.

Signed-off-by: Zeyu Jin <jinzeyu@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-02-04 16:27:33 +08:00
Huawei Technologies Co., Ltd
1154612ba1 migration: Add compress_level sanity check
Zlib compression has level from 1 to 9. However Zstd compression has level
from 1 to 22 (level >= 20 not recommanded). Let's do sanity check here
to make sure a vaild compress_level is given by user.

Signed-off-by: Zeyu Jin <jinzeyu@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-02-04 16:27:33 +08:00
Huawei Technologies Co., Ltd
e865b3f1cf migration: Add zstd support in multi-thread compression
This patch enables zstd option in multi-thread compression.

Signed-off-by: Zeyu Jin <jinzeyu@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-02-04 16:27:33 +08:00
Huawei Technologies Co., Ltd
70bc9a5a34 migration: Add multi-thread compress ops
Add the MigrationCompressOps and MigrationDecompressOps structures to make
the compression method configurable for multi-thread compression migration.

Signed-off-by: Zeyu Jin <jinzeyu@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-02-04 16:27:33 +08:00
Huawei Technologies Co., Ltd
e5ce7b7f34 migration: Refactoring multi-thread compress migration
Code refactor for the compression procedure which includes:

1. Move qemu_compress_data and qemu_put_compression_data from qemu-file.c to
ram.c, for the reason that most part of the code logical has nothing to do
with qemu-file. Besides, the decompression code is located at ram.c only.

2. Simplify the function input arguments for compression and decompression.
Wrap the input into the param structure which already exists. This change also
makes the function much more flexible for other compression methods.

Signed-off-by: Zeyu Jin <jinzeyu@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-02-04 16:27:33 +08:00
Huawei Technologies Co., Ltd
9b2dc3992a migration: Add multi-thread compress method
A multi-thread compress method parameter is added to hold the method we
are going to use. By default the 'zlib' method is used to maintain the
compatibility as before.

Signed-off-by: Zeyu Jin <jinzeyu@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-02-04 16:27:33 +08:00
openeuler-ci-bot
582fa99198 !197 Automatically generate code patches with openeuler !65
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-02-01 10:23:15 +08:00
Euler Robot
34a1635015 spec: Update release version with !65
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-01-30 16:26:59 +08:00
Euler Robot
4bffc50ac3 spec: Update patch and changelog with !65
scsi-bus: Refactor the code that retries requests
scsi-disk: Add support for retry on errors
qapi/block-core: Add retry option for error action
block-backend: Introduce retry timer
block-backend: Add device specific retry callback
block-backend: Enable retry action on errors
block-backend: Add timeout support for retry
block: Add error retry param setting
virtio-blk: Refactor the code that processes queued requests
virtio-blk: On restart, process queued requests in the proper context
virtio_blk: Add support for retry on errors

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
4b34648df6 virtio_blk: Add support for retry on errors
Insert failed requests into device's list for later retry and handle
queued requests to implement retry_request_cb.

Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
42eba74d76 virtio-blk: On restart, process queued requests in the proper context
On restart, we were scheduling a BH to process queued requests, which
would run before starting up the data plane, leading to those requests
being assigned and started on coroutines on the main context.

This could cause requests to be wrongly processed in parallel from
different threads (the main thread and the iothread managing the data
plane), potentially leading to multiple issues.

For example, stopping and resuming a VM multiple times while the guest
is generating I/O on a virtio_blk device can trigger a crash with a
stack tracing looking like this one:

<------>
 Thread 2 (Thread 0x7ff736765700 (LWP 1062503)):
 #0  0x00005567a13b99d6 in iov_memset
     (iov=0x6563617073206f4e, iov_cnt=1717922848, offset=516096, fillc=0, bytes=7018105756081554803)
     at util/iov.c:69
 #1  0x00005567a13bab73 in qemu_iovec_memset
     (qiov=0x7ff73ec99748, offset=516096, fillc=0, bytes=7018105756081554803) at util/iov.c:530
 #2  0x00005567a12f411c in qemu_laio_process_completion (laiocb=0x7ff6512ee6c0) at block/linux-aio.c:86
 #3  0x00005567a12f42ff in qemu_laio_process_completions (s=0x7ff7182e8420) at block/linux-aio.c:217
 #4  0x00005567a12f480d in ioq_submit (s=0x7ff7182e8420) at block/linux-aio.c:323
 #5  0x00005567a12f43d9 in qemu_laio_process_completions_and_submit (s=0x7ff7182e8420)
     at block/linux-aio.c:236
 #6  0x00005567a12f44c2 in qemu_laio_poll_cb (opaque=0x7ff7182e8430) at block/linux-aio.c:267
 #7  0x00005567a13aed83 in run_poll_handlers_once (ctx=0x5567a2b58c70, timeout=0x7ff7367645f8)
     at util/aio-posix.c:520
 #8  0x00005567a13aee9f in run_poll_handlers (ctx=0x5567a2b58c70, max_ns=16000, timeout=0x7ff7367645f8)
     at util/aio-posix.c:562
 #9  0x00005567a13aefde in try_poll_mode (ctx=0x5567a2b58c70, timeout=0x7ff7367645f8)
     at util/aio-posix.c:597
 #10 0x00005567a13af115 in aio_poll (ctx=0x5567a2b58c70, blocking=true) at util/aio-posix.c:639
 #11 0x00005567a109acca in iothread_run (opaque=0x5567a2b29760) at iothread.c:75
 #12 0x00005567a13b2790 in qemu_thread_start (args=0x5567a2b694c0) at util/qemu-thread-posix.c:519
 #13 0x00007ff73eedf2de in start_thread () at /lib64/libpthread.so.0
 #14 0x00007ff73ec10e83 in clone () at /lib64/libc.so.6

 Thread 1 (Thread 0x7ff743986f00 (LWP 1062500)):
 #0  0x00005567a13b99d6 in iov_memset
     (iov=0x6563617073206f4e, iov_cnt=1717922848, offset=516096, fillc=0, bytes=7018105756081554803)
     at util/iov.c:69
 #1  0x00005567a13bab73 in qemu_iovec_memset
     (qiov=0x7ff73ec99748, offset=516096, fillc=0, bytes=7018105756081554803) at util/iov.c:530
 #2  0x00005567a12f411c in qemu_laio_process_completion (laiocb=0x7ff6512ee6c0) at block/linux-aio.c:86
 #3  0x00005567a12f42ff in qemu_laio_process_completions (s=0x7ff7182e8420) at block/linux-aio.c:217
 #4  0x00005567a12f480d in ioq_submit (s=0x7ff7182e8420) at block/linux-aio.c:323
 #5  0x00005567a12f4a2f in laio_do_submit (fd=19, laiocb=0x7ff5f4ff9ae0, offset=472363008, type=2)
     at block/linux-aio.c:375
 #6  0x00005567a12f4af2 in laio_co_submit
     (bs=0x5567a2b8c460, s=0x7ff7182e8420, fd=19, offset=472363008, qiov=0x7ff5f4ff9ca0, type=2)
     at block/linux-aio.c:394
 #7  0x00005567a12f1803 in raw_co_prw
     (bs=0x5567a2b8c460, offset=472363008, bytes=20480, qiov=0x7ff5f4ff9ca0, type=2)
     at block/file-posix.c:1892
 #8  0x00005567a12f1941 in raw_co_pwritev
     (bs=0x5567a2b8c460, offset=472363008, bytes=20480, qiov=0x7ff5f4ff9ca0, flags=0)
     at block/file-posix.c:1925
 #9  0x00005567a12fe3e1 in bdrv_driver_pwritev
     (bs=0x5567a2b8c460, offset=472363008, bytes=20480, qiov=0x7ff5f4ff9ca0, qiov_offset=0, flags=0)
     at block/io.c:1183
 #10 0x00005567a1300340 in bdrv_aligned_pwritev
     (child=0x5567a2b5b070, req=0x7ff5f4ff9db0, offset=472363008, bytes=20480, align=512, qiov=0x7ff72c0425b8, qiov_offset=0, flags=0) at block/io.c:1980
 #11 0x00005567a1300b29 in bdrv_co_pwritev_part
     (child=0x5567a2b5b070, offset=472363008, bytes=20480, qiov=0x7ff72c0425b8, qiov_offset=0, flags=0)
     at block/io.c:2137
 #12 0x00005567a12baba1 in qcow2_co_pwritev_task
     (bs=0x5567a2b92740, file_cluster_offset=472317952, offset=487305216, bytes=20480, qiov=0x7ff72c0425b8, qiov_offset=0, l2meta=0x0) at block/qcow2.c:2444
 #13 0x00005567a12bacdb in qcow2_co_pwritev_task_entry (task=0x5567a2b48540) at block/qcow2.c:2475
 #14 0x00005567a13167d8 in aio_task_co (opaque=0x5567a2b48540) at block/aio_task.c:45
 #15 0x00005567a13cf00c in coroutine_trampoline (i0=738245600, i1=32759) at util/coroutine-ucontext.c:115
 #16 0x00007ff73eb622e0 in __start_context () at /lib64/libc.so.6
 #17 0x00007ff6626f1350 in  ()
 #18 0x0000000000000000 in  ()
<------>

This is also known to cause crashes with this message (assertion
failed):

 aio_co_schedule: Co-routine was already scheduled in 'aio_co_schedule'

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1812765
Signed-off-by: Sergio Lopez <slp(a)redhat.com>
Message-Id: <20200603093240.40489-3-slp(a)redhat.com>
Signed-off-by: Kevin Wolf <kwolf(a)redhat.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
5e4dbf3e78 virtio-blk: Refactor the code that processes queued requests
Move the code that processes queued requests from
virtio_blk_dma_restart_bh() to its own, non-static, function. This
will allow us to call it from the virtio_blk_data_plane_start() in a
future patch.

Signed-off-by: Sergio Lopez <slp(a)redhat.com>
Message-Id: <20200603093240.40489-2-slp(a)redhat.com>
Signed-off-by: Kevin Wolf <kwolf(a)redhat.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
e2373c22c5 block: Add error retry param setting
Add "retry_interval" and "retry_timeout" parameter for drive and device
option. These parameter are valid only when werror/rerror=retry.

eg. --drive file=image,rerror=retry,retry_interval=1000,retry_timeout=5000

Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
7cdf5c3730 block-backend: Add timeout support for retry
Retry should only be triggered when timeout is not reached, so let's check
timeout before retry. Device should also reset retry_start_time after
successful retry.

Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
c5a58a3c03 block-backend: Enable retry action on errors
Enable retry action when backend's retry timer is available. It would
trigger the timer to do device specific retry action.

Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
788fb23e33 block-backend: Add device specific retry callback
Add retry_request_cb in BlockDevOps to do device specific retry action.
Backend's timer would be registered only when the backend is set 'retry'
on errors and the device supports retry action.

Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
e15dae90d8 block-backend: Introduce retry timer
Add a timer to regularly trigger retry on errors.

Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
ce6e9dbebe qapi/block-core: Add retry option for error action
Add a new error action 'retry' to support retry on errors.

Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
06391f3674 scsi-disk: Add support for retry on errors
Mark failed requests as to be retried and implement retry_request_cb to
handle these requests.

Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
2021-01-30 16:26:59 +08:00
Huawei Technologies Co., Ltd
88c646e68d scsi-bus: Refactor the code that retries requests
Move the code that retries requests from scsi_dma_restart_bh() to its own,
non-static, function. This will allow us to call it from the
retry_request_cb() of scsi-disk in a future patch.

Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
2021-01-30 16:26:59 +08:00
openeuler-ci-bot
755f2398af !192 feature: enable spice protocol
From: @yorifang
Reviewed-by: @zhendongchen
Signed-off-by: @zhendongchen
2021-01-21 09:16:22 +08:00
Ying Fang
1f69406f31 feature: enable spice protocol
Enable the spice protocol

Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-01-19 20:14:15 +08:00
Ying Fang
e68cf6bcb7 spec: recoder changelog
Nothing but just reorder the changelog.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-01-19 20:11:31 +08:00
openeuler-ci-bot
293311b862 !190 Automatically generate code patches with openeuler !60
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-01-18 10:02:28 +08:00
Euler Robot
d048d2e58f spec: Update release version with !60
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-01-15 11:27:06 +08:00
Euler Robot
83a95bec06 spec: Update patch and changelog with !60
memory: clamp cached translation in case it points to an MMIO region

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-01-15 11:26:50 +08:00
Huawei Technologies Co., Ltd
adf69c7e9f memory: clamp cached translation in case it points to an MMIO region
In using the address_space_translate_internal API, address_space_cache_init
forgot one piece of advice that can be found in the code for
address_space_translate_internal:

    /* MMIO registers can be expected to perform full-width accesses based only
     * on their address, without considering adjacent registers that could
     * decode to completely different MemoryRegions.  When such registers
     * exist (e.g. I/O ports 0xcf8 and 0xcf9 on most PC chipsets), MMIO
     * regions overlap wildly.  For this reason we cannot clamp the accesses
     * here.
     *
     * If the length is small (as is the case for address_space_ldl/stl),
     * everything works fine.  If the incoming length is large, however,
     * the caller really has to do the clamping through memory_access_size.
     */

address_space_cache_init is exactly one such case where "the incoming length
is large", therefore we need to clamp the resulting length---not to
memory_access_size though, since we are not doing an access yet, but to
the size of the resulting section.  This ensures that subsequent accesses
to the cached MemoryRegionSection will be in range.

With this patch, the enclosed testcase notices that the used ring does
not fit into the MSI-X table and prints a "qemu-system-x86_64: Cannot map used"
error.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry-picked from 4bfb024b)
Fix CVE-2020-27821
Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-01-15 11:26:50 +08:00
openeuler-ci-bot
77ddf84cc1 !186 spec: updating the license info
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-01-12 09:15:26 +08:00
Alex Chen
a650a5c510 spec: updating the license info
Specify the version of CC-BY license

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-01-08 14:00:45 +08:00
openeuler-ci-bot
2cf6d11541 !183 Automatically generate code patches with openeuler !56
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-01-06 09:41:47 +08:00