247 Commits

Author SHA1 Message Date
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
Euler Robot
1710ca191e spec: Update release version with !56
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-01-04 16:26:46 +08:00
Euler Robot
51ce899440 spec: Update patch and changelog with !56
target/arm: Fix write redundant values to kvm

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-01-04 16:26:46 +08:00
Huawei Technologies Co., Ltd
b557041d0a target/arm: Fix write redundant values to kvm
After modifying the value of a ID register, we'd better to try to write
it to KVM so that we can known the value is acceptable for KVM.
Because it may modify the registers' values of KVM, it's not suitable
for other registers.

(cherry-picked from a0d7a9de807639fcfcbe1fe037cb8772d459a9cf)
Signed-off-by: Peng Liang <liangpeng10@huawei.com>
2021-01-04 16:26:46 +08:00
openeuler-ci-bot
c0da532870 !182 Automatically generate code patches with openeuler !57
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-01-04 15:15:01 +08:00
Euler Robot
4ee63994f5 spec: Update release version with !57
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2020-12-31 11:27:02 +08:00
Euler Robot
903c155e74 spec: Update patch and changelog with !57
hostmem: Fix up free host_nodes list right after visited

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2020-12-31 11:26:53 +08:00
Huawei Technologies Co., Ltd
fe07d5c3ef hostmem: Fix up free host_nodes list right after visited
In host_memory_backend_get_host_nodes, we build host_nodes
list and output it to v (a StringOutputVisitor) but forget
to free the list. This fixes the memory leak.

The memory leak stack:

Direct leak of 32 byte(s) in 2 object(s) allocated from:
 #0 0xfffda30b3393 in __interceptor_calloc (/usr/lib64/libasan.so.4+0xd3393)
 #1 0xfffda1d28b9b in g_malloc0 (/usr/lib64/libglib-2.0.so.0+0x58b9b)
 #2 0xaaab05ca6e43 in host_memory_backend_get_host_nodes backends/hostmem.c:94
 #3 0xaaab061ddf83 in object_property_get_uint16List qom/object.c:1478
 #4 0xaaab05866513 in query_memdev hw/core/machine-qmp-cmds.c:312
 #5 0xaaab061d980b in do_object_child_foreach qom/object.c:1001
 #6 0xaaab0586779b in qmp_query_memdev hw/core/machine-qmp-cmds.c:328
 #7 0xaaab0615ed3f in qmp_marshal_query_memdev qapi/qapi-commands-machine.c:327
 #8 0xaaab0632d647 in do_qmp_dispatch qapi/qmp-dispatch.c:147
 #9 0xaaab0632d647 in qmp_dispatch qapi/qmp-dispatch.c:190
 #10 0xaaab0610f74b in monitor_qmp_dispatch monitor/qmp.c:120
 #11 0xaaab0611074b in monitor_qmp_bh_dispatcher monitor/qmp.c:209
 #12 0xaaab063caefb in aio_bh_poll util/async.c:117
 #13 0xaaab063d30fb in aio_dispatch util/aio-posix.c:459
 #14 0xaaab063cac8f in aio_ctx_dispatch util/async.c:268
 #15 0xfffda1d22a6b in g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0+0x52a6b)
 #16 0xaaab063d0e97 in glib_pollfds_poll util/main-loop.c:218
 #17 0xaaab063d0e97 in os_host_main_loop_wait util/main-loop.c:241
 #18 0xaaab063d0e97 in main_loop_wait util/main-loop.c:517
 #19 0xaaab05c8bfa7 in main_loop /root/rpmbuild/BUILD/qemu-4.1.0/vl.c:1791
 #20 0xaaab05713bc3 in main /root/rpmbuild/BUILD/qemu-4.1.0/vl.c:4473
 #21 0xfffda0a83ebf in __libc_start_main (/usr/lib64/libc.so.6+0x23ebf)
 #22 0xaaab0571ed5f (aarch64-softmmu/qemu-system-aarch64+0x88ed5f)
SUMMARY: AddressSanitizer: 32 byte(s) leaked in 2 allocation(s).

Fixes: 4cf1b76bf1e2 (hostmem: add properties for NUMA memory policy)
Reported-by: Euler Robot <euler.robot@huawei.com>
Tested-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
2020-12-31 11:26:53 +08:00
openeuler-ci-bot
141527b3c8 !179 Add qemu-block-rbd and qemu-block-ssh packages
From: @yangming73
Reviewed-by: @zhendongchen,@yorifang
Signed-off-by: @yorifang
2020-12-29 16:22:27 +08:00
Ming Yang
c0ee9876b5 spec: Add two packages.
1. Add qemu-block-rbd package.
2. Add qemu-block-ssh package.

Signed-off-by: Ming Yang <yangming73@huawei.com>
2020-12-28 20:25:54 +08:00
openeuler-ci-bot
c14fc30cad !178 Automatically generate code patches with openeuler !51
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2020-12-16 13:35:17 +08:00
Euler Robot
aae6cc182b spec: Update release version with !51
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2020-12-15 21:27:38 +08:00
Euler Robot
fb6029a728 spec: Update patch and changelog with !51
hw: usb: hcd-ohci: check for processed TD before retire
hw: ehci: check return value of 'usb_packet_map'
hw: usb: hcd-ohci: check len and frame_number variables
hw/net/e1000e: advance desc_offset in case of null descriptor

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2020-12-15 21:27:19 +08:00