527 Commits

Author SHA1 Message Date
Chen Qun
b405a3c6ee spec: Update release version with !152 !157
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
665079b389 spec: Update patch and changelog with !157 [feature]add support for AVX512_BF16 and new CPU model Cooperlake !157
x86: Intel AVX512_BF16 feature enabling
i386: Add MSR feature bit for MDS-NO
i386: Add macro for stibp
i386: Add new CPU model Cooperlake
target/i386: Add new bit definitions of MSR_IA32_ARCH_CAPABILITIES
target/i386: Add missed security features to Cooperlake CPU model
target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR
target/i386: Export TAA_NO bit to guests

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
3b6358a8ac target/i386: Export TAA_NO bit to guests
TSX Async Abort (TAA) is a side channel attack on internal buffers in
some Intel processors similar to Microachitectural Data Sampling (MDS).

Some future Intel processors will use the ARCH_CAP_TAA_NO bit in the
IA32_ARCH_CAPABILITIES MSR to report that they are not vulnerable to
TAA. Make this bit available to guests.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
6713c545f7 target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR
This is required to disable ITLB multihit mitigations in nested
hypervisors.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
011ace1710 target/i386: Add missed security features to Cooperlake CPU model
It lacks two security feature bits in MSR_IA32_ARCH_CAPABILITIES in
current Cooperlake CPU model, so add them.

This is part of uptream commit 2dea9d9

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
c9a7e0fa18 target/i386: Add new bit definitions of MSR_IA32_ARCH_CAPABILITIES
The bit 6, 7 and 8 of MSR_IA32_ARCH_CAPABILITIES are recently disclosed
for some security issues. Add the definitions for them to be used by named
CPU models.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Message-Id: <20191225063018.20038-2-xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
4251256e51 i386: Add new CPU model Cooperlake
Cooper Lake is intel's successor to Cascade Lake, the new
CPU model inherits features from Cascadelake-Server, while
add one platform associated new feature: AVX512_BF16. Meanwhile,
add STIBP for speculative execution.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Tao Xu <tao3.xu@intel.com>
Message-Id: <1571729728-23284-4-git-send-email-cathy.zhang@intel.com>
Reviewed-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
b0fb8b4b34 i386: Add macro for stibp
stibp feature is already added through the following commit.
0e89165829

Add a macro for it to allow CPU models to report it when host supports.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Tao Xu <tao3.xu@intel.com>
Message-Id: <1571729728-23284-3-git-send-email-cathy.zhang@intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
ea12d023b2 i386: Add MSR feature bit for MDS-NO
Define MSR_ARCH_CAP_MDS_NO in the IA32_ARCH_CAPABILITIES MSR to allow
CPU models to report the feature when host supports it.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Tao Xu <tao3.xu@intel.com>
Message-Id: <1571729728-23284-2-git-send-email-cathy.zhang@intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
f08117fe03 x86: Intel AVX512_BF16 feature enabling
Intel CooperLake cpu adds AVX512_BF16 instruction, defining as
CPUID.(EAX=7,ECX=1):EAX[bit 05].

The patch adds a property for setting the subleaf of CPUID leaf 7 in
case that people would like to specify it.

The release spec link as follows,
https://software.intel.com/sites/default/files/managed/c5/15/\
architecture-instruction-set-extensions-programming-reference.pdf

Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-19 21:29:25 +08:00
Chen Qun
1b38d7c3de spec: Update patch and changelog with !152 hw/net/rocker_of_dpa: fix double free bug of rocker device !152
hw/net/rocker_of_dpa: fix double free bug of rocker device

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-07-19 21:29:23 +08:00
Chen Qun
5ed7c99e69 hw/net/rocker_of_dpa: fix double free bug of rocker device
The of_dpa_cmd_add_l2_flood function of the rocker device
releases the memory of group->l2_flood.group_ids before
applying for new memory. If the l2_group configured by
the guest does not match the input group->l2_flood.group_ids,
the err_out branch is redirected to release the memory of the
group->l2_flood.group_ids branch. The pointer is not set to
NULL after the memory is freed. When the guest accesses the
of_dpa_cmd_add_l2_flood function again, the memory of
group->l2_flood.group_ids is released again. As a result,
the memory is double free.

Fix that by setting group->l2_flood.group_ids to NULL after free.

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
Signed-off-by: Qiang Ning <ningqiang1@huawei.com>
2021-07-19 21:29:23 +08:00
openeuler-ci-bot
5b2e5ce6e1 !319 增加gcc编译依赖
From: @imxcc
Reviewed-by: @kevinzhu1
Signed-off-by: @kevinzhu1
2021-06-28 09:15:59 +00:00
imxcc
9347466659 spec: add gcc buildrequire
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-06-28 16:38:42 +08:00
openeuler-ci-bot
3569d17e6f !315 Automatically generate code patches with openeuler !146
From: @kuhnchen18
Reviewed-by: @imxcc,@imxcc
Signed-off-by: @imxcc,@imxcc
2021-06-21 15:09:54 +00:00
Chen Qun
230bdff72e spec: Update release version with !146
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-06-21 16:27:59 +08:00
Chen Qun
f64c0eea3d spec: Update patch and changelog with !146 fix CVE-2021-3527 #I3U9T9 && CVE-2019-12067#I3VG5H && CVE-2021-20221 #I3UFOP !146
ide: ahci: add check to avoid null dereference (CVE-2019-12067)
hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
usb: limit combined packets to 1 MiB (CVE-2021-3527)

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-06-21 16:27:26 +08:00
Chen Qun
71a60cb18b usb: limit combined packets to 1 MiB (CVE-2021-3527)
Fix CVE-2021-3527

usb-host and usb-redirect try to batch bulk transfers by combining many
small usb packets into a single, large transfer request, to reduce the
overhead and improve performance.

This patch adds a size limit of 1 MiB for those combined packets to
restrict the host resources the guest can bind that way.
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <kraxel@redhat.com>
Message-Id: <20210503132915.2335822-6-kraxel@redhat.com>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-21 16:27:25 +08:00
Chen Qun
b893093b7c hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
Fix CVE-2021-20221

Per the ARM Generic Interrupt Controller Architecture specification
(document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit,
not 10:

  - 4.3 Distributor register descriptions
  - 4.3.15 Software Generated Interrupt Register, GICD_SG

    - Table 4-21 GICD_SGIR bit assignments

    The Interrupt ID of the SGI to forward to the specified CPU
    interfaces. The value of this field is the Interrupt ID, in
    the range 0-15, for example a value of 0b0011 specifies
    Interrupt ID 3.

Correct the irq mask to fix an undefined behavior (which eventually
lead to a heap-buffer-overflow, see [Buglink]):

   $ echo 'writel 0x8000f00 0xff4affb0' | qemu-system-aarch64 -M virt,accel=qtest -qtest stdio
   [I 1612088147.116987] OPENED
  [R +0.278293] writel 0x8000f00 0xff4affb0
  ../hw/intc/arm_gic.c:1498:13: runtime error: index 944 out of bounds for type 'uint8_t [16][8]'
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../hw/intc/arm_gic.c:1498:13

This fixes a security issue when running with KVM on Arm with
kernel-irqchip=off. (The default is kernel-irqchip=on, which is
unaffected, and which is also the correct choice for performance.)

Cc: qemu-stable@nongnu.org
Fixes: CVE-2021-20221
Fixes: 9ee6e8bb ("ARMv7 support.")
Buglink: https://bugs.launchpad.net/qemu/+bug/1913916
Buglink: https://bugs.launchpad.net/qemu/+bug/1913917

Reported-by: Alexander Bulekov's avatarAlexander Bulekov <alxndr@bu.edu>
Signed-off-by: Philippe Mathieu-Daudé's avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210131103401.217160-1-f4bug@amsat.org
Reviewed-by: Peter Maydell's avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell's avatarPeter Maydell <peter.maydell@linaro.org>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-21 16:27:25 +08:00
Chen Qun
a1066296f2 ide: ahci: add check to avoid null dereference (CVE-2019-12067)
Fix CVE-2019-12067

AHCI emulator while committing DMA buffer in ahci_commit_buf()
may do a NULL dereference if the command header 'ad->cur_cmd'
is null. Add check to avoid it.

Reported-by: Bugs SysSec <address@hidden>
Signed-off-by: Prasad J Pandit <address@hidden>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-21 16:27:25 +08:00
openeuler-ci-bot
15f03c48a1 !306 Automatically generate code patches with openeuler !141
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-06-15 11:51:49 +00:00
Chen Qun
ef989d6fc8 spec: Update release version with !141
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-06-15 16:27:16 +08:00
Chen Qun
f1d6caff39 spec: Update patch and changelog with !141 fix CVE-2021-3544 #I3VG5I && fix CVE-2021-3545 #I3V9I8 && fix CVE-2021-3546 #I3V9I7 !141
vhost-user-gpu: fix resource leak in 'vg_resource_create_2d' (CVE-2021-3544)
vhost-user-gpu: fix memory leak in vg_resource_attach_backing (CVE-2021-3544)
vhost-user-gpu: fix memory leak while calling 'vg_resource_unref' (CVE-2021-3544)
vhost-user-gpu: fix memory leak in 'virgl_cmd_resource_unref' (CVE-2021-3544)
vhost-user-gpu: fix memory leak in 'virgl_resource_attach_backing' (CVE-2021-3544)
vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info (CVE-2021-3545)
vhost-user-gpu: fix OOB write in 'virgl_cmd_get_capset' (CVE-2021-3546)

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-06-15 16:27:11 +08:00
Chen Qun
73ab1791c9 vhost-user-gpu: fix OOB write in 'virgl_cmd_get_capset' (CVE-2021-3546)
Fix CVE-2021-3544

If 'virgl_cmd_get_capset' set 'max_size' to 0,
the 'virgl_renderer_fill_caps' will write the data after the 'resp'.
This patch avoid this by checking the returned 'max_size'.

virtio-gpu fix: abd7f08b

 ("display: virtio-gpu-3d: check
virgl capabilities max_size")

Fixes: CVE-2021-3546
Reported-by: default avatarLi Qiang <liq3ea@163.com>
Reviewed-by: default avatarPrasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: default avatarLi Qiang <liq3ea@163.com>
Reviewed-by: Marc-André Lureau's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210516030403.107723-8-liq3ea@163.com>
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-15 16:27:11 +08:00
Chen Qun
d37a5b33e7 vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info (CVE-2021-3545)
Fix CVE-2021-3544

Otherwise some of the 'resp' will be leaked to guest.

Fixes: CVE-2021-3545
Reported-by: default avatarLi Qiang <liq3ea@163.com>
virtio-gpu fix: 42a8dadc

 ("virtio-gpu: fix information leak
in getting capset info dispatch")
Signed-off-by: default avatarLi Qiang <liq3ea@163.com>
Reviewed-by: Marc-André Lureau's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210516030403.107723-2-liq3ea@163.com>
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-15 16:27:11 +08:00
Chen Qun
9d962afa84 vhost-user-gpu: fix memory leak in 'virgl_resource_attach_backing' (CVE-2021-3544)
Fix CVE-2021-3544

If 'virgl_renderer_resource_attach_iov' failed, the 'res_iovs' will
be leaked.

Fixes: CVE-2021-3544
Reported-by: default avatarLi Qiang <liq3ea@163.com>
virtio-gpu fix: 33243031

 ("virtio-gpu-3d: fix memory leak
in resource attach backing")
Signed-off-by: default avatarLi Qiang <liq3ea@163.com>
Reviewed-by: Marc-André Lureau's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210516030403.107723-7-liq3ea@163.com>
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-15 16:27:11 +08:00
Chen Qun
3196f4fa58 vhost-user-gpu: fix memory leak in 'virgl_cmd_resource_unref' (CVE-2021-3544)
Fix CVE-2021-3544

The 'res->iov' will be leaked if the guest trigger following sequences:

	virgl_cmd_create_resource_2d
	virgl_resource_attach_backing
	virgl_cmd_resource_unref

This patch fixes this.

Fixes: CVE-2021-3544
Reported-by: default avatarLi Qiang <liq3ea@163.com>
virtio-gpu fix: 5e8e3c4c

 ("virtio-gpu: fix resource leak
in virgl_cmd_resource_unref"
Signed-off-by: default avatarLi Qiang <liq3ea@163.com>
Reviewed-by: Marc-André Lureau's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210516030403.107723-6-liq3ea@163.com>
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-15 16:27:11 +08:00
Chen Qun
4b5426aecf vhost-user-gpu: fix memory leak while calling 'vg_resource_unref' (CVE-2021-3544)
Fix CVE-2021-3544

If the guest trigger following sequences, the attach_backing will be leaked:

	vg_resource_create_2d
	vg_resource_attach_backing
	vg_resource_unref

This patch fix this by freeing 'res->iov' in vg_resource_destroy.

Fixes: CVE-2021-3544
Reported-by: default avatarLi Qiang <liq3ea@163.com>
virtio-gpu fix: 5e8e3c4c

 ("virtio-gpu: fix resource leak
in virgl_cmd_resource_unref")
Reviewed-by: default avatarPrasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: default avatarLi Qiang <liq3ea@163.com>
Reviewed-by: Marc-André Lureau's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210516030403.107723-5-liq3ea@163.com>
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-15 16:27:11 +08:00
Chen Qun
3f234147fb vhost-user-gpu: fix memory leak in vg_resource_attach_backing (CVE-2021-3544)
Fix CVE-2021-3544

Check whether the 'res' has already been attach_backing to avoid
memory leak.

Fixes: CVE-2021-3544
Reported-by: default avatarLi Qiang <liq3ea@163.com>
virtio-gpu fix: 204f01b3

 ("virtio-gpu: fix memory leak
in resource attach backing")
Signed-off-by: default avatarLi Qiang <liq3ea@163.com>
Reviewed-by: Marc-André Lureau's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210516030403.107723-4-liq3ea@163.com>
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-15 16:27:11 +08:00
Chen Qun
f3b9f9c00c vhost-user-gpu: fix resource leak in 'vg_resource_create_2d' (CVE-2021-3544)
Fix CVE-2021-3544

Call 'vugbm_buffer_destroy' in error path to avoid resource leak.

Fixes: CVE-2021-3544
Reported-by: default avatarLi Qiang <liq3ea@163.com>
Reviewed-by: default avatarPrasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: default avatarLi Qiang <liq3ea@163.com>
Reviewed-by: Marc-André Lureau's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210516030403.107723-3-liq3ea@163.com>
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-15 16:27:11 +08:00
openeuler-ci-bot
23414fd767 !292 Automatically generate code patches with openeuler !118
From: @kuhnchen18
Reviewed-by: @imxcc,@imxcc
Signed-off-by: @imxcc,@imxcc
2021-06-01 09:19:49 +08:00
Chen Qun
36455e017b spec: Update release version with !118
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-05-28 16:27:23 +08:00
Chen Qun
6d6cd0fe82 spec: Update patch and changelog with !118 blockjob: Fix crash with IOthread when block commit after snapshot !118
blockjob: Fix crash with IOthread when block commit after snapshot

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-05-28 16:27:22 +08:00
Chen Qun
951fe1073f blockjob: Fix crash with IOthread when block commit after snapshot
Currently, if guest has workloads, IO thread will acquire aio_context
lock before do io_submit, it leads to segmentfault when do block commit
after snapshot. Just like below:

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0x7f7c7d91f700 (LWP 99907)]
0x00005576d0f65aab in bdrv_mirror_top_pwritev at ../block/mirror.c:1437
1437    ../block/mirror.c: No such file or directory.
(gdb) p s->job
$17 = (MirrorBlockJob *) 0x0
(gdb) p s->stop
$18 = false

Call trace of IO thread:
0  0x00005576d0f65aab in bdrv_mirror_top_pwritev at ../block/mirror.c:1437
1  0x00005576d0f7f3ab in bdrv_driver_pwritev at ../block/io.c:1174
2  0x00005576d0f8139d in bdrv_aligned_pwritev at ../block/io.c:1988
3  0x00005576d0f81b65 in bdrv_co_pwritev_part at ../block/io.c:2156
4  0x00005576d0f8e6b7 in blk_do_pwritev_part at ../block/block-backend.c:1260
5  0x00005576d0f8e84d in blk_aio_write_entry at ../block/block-backend.c:1476
...

Switch to qemu main thread:
0  0x00007f903be704ed in __lll_lock_wait at
/lib/../lib64/libpthread.so.0
1  0x00007f903be6bde6 in _L_lock_941 at /lib/../lib64/libpthread.so.0
2  0x00007f903be6bcdf in pthread_mutex_lock at
/lib/../lib64/libpthread.so.0
3  0x0000564b21456889 in qemu_mutex_lock_impl at
../util/qemu-thread-posix.c:79
4  0x0000564b213af8a5 in block_job_add_bdrv at ../blockjob.c:224
5  0x0000564b213b00ad in block_job_create at ../blockjob.c:440
6  0x0000564b21357c0a in mirror_start_job at ../block/mirror.c:1622
7  0x0000564b2135a9af in commit_active_start at ../block/mirror.c:1867
8  0x0000564b2133d132 in qmp_block_commit at ../blockdev.c:2768
9  0x0000564b2141fef3 in qmp_marshal_block_commit at
qapi/qapi-commands-block-core.c:346
10 0x0000564b214503c9 in do_qmp_dispatch_bh at
../qapi/qmp-dispatch.c:110
11 0x0000564b21451996 in aio_bh_poll at ../util/async.c:164
12 0x0000564b2146018e in aio_dispatch at ../util/aio-posix.c:381
13 0x0000564b2145187e in aio_ctx_dispatch at ../util/async.c:306
14 0x00007f9040239049 in g_main_context_dispatch at
/lib/../lib64/libglib-2.0.so.0
15 0x0000564b21447368 in main_loop_wait at ../util/main-loop.c:232
16 0x0000564b21447368 in main_loop_wait at ../util/main-loop.c:255
17 0x0000564b21447368 in main_loop_wait at ../util/main-loop.c:531
18 0x0000564b212304e1 in qemu_main_loop at ../softmmu/runstate.c:721
19 0x0000564b20f7975e in main at ../softmmu/main.c:50

In IO thread when do bdrv_mirror_top_pwritev, the job is NULL, and stop field
is false, this means the MirrorBDSOpaque "s" object has not been initialized
yet, and this object is initialized by block_job_create(), but the initialize
process is stuck in acquiring the lock.

In this situation, IO thread come to bdrv_mirror_top_pwritev(),which means that
mirror-top node is already inserted into block graph, but its bs->opaque->job
is not initialized.

The root cause is that qemu main thread do release/acquire when hold the lock,
at the same time, IO thread get the lock after release stage, and the crash
occured.

Actually, in this situation, job->job.aio_context will not equal to
qemu_get_aio_context(), and will be the same as bs->aio_context,
thus, no need to release the lock, becasue bdrv_root_attach_child()
will not change the context.

This patch fix this issue.

Fixes: 132ada80 "block: Adjust AioContexts when attaching nodes"

Signed-off-by: Michael Qiu <qiudayu@huayun.com>
Message-Id: <20210203024059.52683-1-08005325@163.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-05-28 16:27:22 +08:00
openeuler-ci-bot
e65ee6ced4 !288 arm/cpu: Fixed function undefined error at compile time under arm
From: @zhouli57
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-05-20 11:36:13 +08:00
zhouli57
69f71b8b94 arm/cpu: Fixed function undefined error at compile time under arm 2021-05-20 11:10:10 +08:00
openeuler-ci-bot
1369fa9a7f !285 为block-rbd, block-iscsi和block-ssh添加strip
From: @yangming73
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-05-20 10:53:13 +08:00
Ming Yang
454f2844f7 Merge branch 'master' of gitee.com:src-openeuler/qemu into master 2021-05-20 10:08:04 +08:00
openeuler-ci-bot
68306567c3 !287 util/cacheinfo: fix crash when compiling with uClibc
From: @zhouli57
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-05-20 09:08:00 +08:00
zhouli57
eefa614339 util/cacheinfo: fix crash when compiling with uClibc 2021-05-19 17:21:24 +08:00
Ming Yang
de95cacd5f add strip for block-iscsi.so, block-rbd.so and block-ssh.so.
Signed-off-by: Ming Yang <yangming73@huawei.com>
2021-05-19 09:11:35 +00:00
openeuler-ci-bot
289abf1b2b !242 Automatically generate code patches with openeuler !88
From: @kuhnchen18
Reviewed-by: @zhanghailiang_lucky,@zhanghailiang_lucky
Signed-off-by: @zhanghailiang_lucky,@zhanghailiang_lucky
2021-04-25 15:12:15 +08:00
Chen Qun
6f1aa31d5f spec: Update release version with !88
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-03-26 11:14:37 +08:00
Chen Qun
2562f7d6dc spec: Update patch and changelog with !88 fix CVE-2020-15469 #I1NJI5 !88
hw/pci-host: add pci-intack write method
pci-host: add pcie-msi read method
vfio: add quirk device write method
prep: add ppc-parity write method
nvram: add nrf51_soc flash read method
spapr_pci: add spapr msi read method
tz-ppc: add dummy read/write methods
imx7-ccm: add digprog mmio write method

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-03-26 11:14:36 +08:00
Chen Qun
4820dec00a imx7-ccm: add digprog mmio write method
fix CVE-2020-15469

Add digprog mmio write method to avoid assert failure during
initialisation.

Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-03-26 11:14:36 +08:00
Chen Qun
c38364c2b7 tz-ppc: add dummy read/write methods
fix CVE-2020-15469

Add tz-ppc-dummy mmio read/write methods to avoid assert failure
during initialisation.

Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-03-26 11:14:36 +08:00
Chen Qun
15d7b2a4ea spapr_pci: add spapr msi read method
fix CVE-2020-15469

Add spapr msi mmio read method to avoid NULL pointer dereference
issue.

Reported-by: Lei Sun <slei.casper@gmail.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-03-26 11:14:36 +08:00
Chen Qun
47423175b7 nvram: add nrf51_soc flash read method
fix CVE-2020-15469

Add nrf51_soc mmio read method to avoid NULL pointer dereference
issue.

Reported-by: Lei Sun <slei.casper@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-03-26 11:14:36 +08:00
Chen Qun
1b0c5d2eeb prep: add ppc-parity write method
fix CVE-2020-15469

Add ppc-parity mmio write method to avoid NULL pointer dereference
issue.

Reported-by: Lei Sun <slei.casper@gmail.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-03-26 11:14:35 +08:00
Chen Qun
5b10ef9531 vfio: add quirk device write method 2021-03-26 11:14:35 +08:00