51 Commits

Author SHA1 Message Date
Euler Robot
cada203f30 storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath
'virStoragePoolObjListSearch' returns a locked and refed object, thus we
must release it on ACL permission failure.

Fixes: 7aa0e8c0cb8
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-26 21:28:36 +08:00
openeuler-ci-bot
af21f1384d !88 Automatically generate code patches with openeuler !37
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-26 03:43:11 +00:00
Chen Qun
e7cd91f1bb spec: Update release version with !37
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-09-24 11:28:36 +08:00
Chen Qun
1f0781b1d5 spec: Update patch and changelog with !37 conf/domain_conf: pin the retry_interval and retry_timeout parameters to xml !37
conf/domain_conf: pin the retry_interval and retry_timeout parameters to xml

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
2021-09-24 11:28:32 +08:00
Euler Robot
3d370f7c9c conf/domain_conf: pin the retry_interval and retry_timeout parameters to xml
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
2021-09-24 11:28:32 +08:00
openeuler-ci-bot
b00634df9a !77 [feature]add new CPU model Cooperlake
From: @jingyi_wang
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-07-27 07:59:03 +00:00
Jingyi Wang
76a665c23b add new CPU model Cooperlake
Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-27 14:20:39 +08:00
openeuler-ci-bot
e9fa45ed60 !68 Automatically generate code patches with openeuler !27
From: @kuhnchen18
Reviewed-by: @zhanghailiang_lucky
Signed-off-by: @zhanghailiang_lucky
2021-04-25 15:26:39 +08:00
Chen Qun
17078cf659 spec: Update release version with !27
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-04-23 11:28:52 +08:00
Chen Qun
15b02aa020 spec: Update patch and changelog with !27 Add retry policy for error_policy !27
libvirt: Add 'retry' support for error policy
qemu: Support 'retry' BLOCK_IO_ERROR event.
libvirt/conf: Set default values of retry fileds

Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-04-23 11:28:50 +08:00
Chen Qun
80dd360690 libvirt/conf: Set default values of retry fileds
Currently the default values of retry_interval and retry_timeout are set
to -1, when 'driver' option exists without retry fileds. It conflicts
with the default values when the 'driver' option does not exist.

So let's set default values of retry_interval and retry_timeout to 0 when
retry policy is not enabled.

Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
2021-04-23 11:28:50 +08:00
Chen Qun
ef331a03e1 qemu: Support 'retry' BLOCK_IO_ERROR event.
Accept BLOCK_IO_ERROR event with action='retry' from qemu.

Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-04-23 11:28:50 +08:00
Chen Qun
a06da0d07f libvirt: Add 'retry' support for error policy
Introduce error_policy=/rerror_policy='retry' to support
werror=/rerror=retry mechanism in qemu.

Add retry_interval parameter to control the interval between retries.
Add retry_timeout parameter to control the total retry times.

Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-04-23 11:28:50 +08:00
openeuler-ci-bot
7875093a24 !56 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-01-21 09:16:37 +08:00
Euler Robot
6d364f3470 spec: Update release version with !17 !23
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-01-20 10:46:01 +08:00
Euler Robot
c78a686532 spec: Update patch and changelog with !17
util: Move virIsDevMapperDevice() to virdevmapper.c
virdevmapper: Don't use libdevmapper to obtain dependencies

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2021-01-20 10:45:12 +08:00
Huawei Technologies Co., Ltd
0b136aabde virdevmapper: Don't use libdevmapper to obtain dependencies
CVE-2020-14339

When building domain's private /dev in a namespace, libdevmapper
is consulted for getting full dependency tree of domain's disks.
The reason is that for a multipath devices all dependent devices
must be created in the namespace and allowed in CGroups.

However, this approach is very fragile as building of namespace
happens in the forked off child process, after mass close of FDs
and just before dropping privileges and execing QEMU. And it so
happens that when calling libdevmapper APIs, one of them opens
/dev/mapper/control and saves the FD into a global variable. The
FD is kept open until the lib is unlinked or dm_lib_release() is
called explicitly. We are doing neither.

However, the virDevMapperGetTargets() function is called also
from libvirtd (when setting up CGroups) and thus has to be thread
safe. Unfortunately, libdevmapper APIs are not thread safe (nor
async signal safe) and thus we can't use them. Reimplement what
libdevmapper would do using plain C (ioctl()-s, /proc/devices
parsing, /dev/mapper dirwalking, and so on).

Fixes: a30078cb832646177defd256e77c632905f1e6d0
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1858260

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

cherry-pick from commit 22494556542c676d1b9e7f1c1f2ea13ac17e1e3e
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-01-20 10:44:52 +08:00
Huawei Technologies Co., Ltd
1386766ca9 util: Move virIsDevMapperDevice() to virdevmapper.c
CVE-2020-14339

When introducing virdevmapper.c (in v4.3.0-rc1~427) I didn't
realize there is a function that calls in devmapper. The function
is called virIsDevMapperDevice() and lives in virutil.c. Now that
we have a special file for handling devmapper move it there.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit dfa0e118f745fe3f4fe95975c6100f0fc6d788be
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-01-20 10:22:58 +08:00
openeuler-ci-bot
50183dc7eb !43 spec: add --without-firewalld-zone to configure commandline for old firewalld version
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2020-12-09 08:54:47 +08:00
Alex Chen
e5c4324d39 spec: add --without-firewalld-zone to configure commandline for old firewalld version
Because current firewalld version is too old(< 0.7.0) to support
the rule priority setting in the libvirt zone file, so we should
add --without-firewalld-zone to configure commandline.
More info can be found in the following link:
https://github.com/libvirt/libvirt/commit/3b71f2e4.

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2020-12-08 19:49:24 +08:00
openeuler-ci-bot
748b844bcb !35 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2020-10-27 15:41:26 +08:00
Euler Robot
64ab04561d spec: Update release version with !11
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2020-10-26 20:25:40 +08:00
Euler Robot
eab0fdbe92 spec: Update patch and changelog with !11
rpc: gendispatch: handle empty flags
rpc: add support for filtering @acls by uint params
rpc: require write acl for guest agent in virDomainInterfaceAddresses
qemu: agent: set ifname to NULL after freeing

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:25:40 +08:00
Huawei Technologies Co., Ltd
27ddd033e6 qemu: agent: set ifname to NULL after freeing
CVE-2020-25637

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Rported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed-by: Mauro Matteo Cascella <mcascell@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit a63b48c5ecef077bf0f909a85f453a605600cf05
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:25:40 +08:00
Huawei Technologies Co., Ltd
b4631b1117 rpc: require write acl for guest agent in virDomainInterfaceAddresses
CVE-2020-25637

Add a requirement for domain:write if source is set to
VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT.

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit e4116eaa44cb366b59f7fe98f4b88d04c04970ad
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:25:40 +08:00
Huawei Technologies Co., Ltd
f8827bcf88 rpc: add support for filtering @acls by uint params
CVE-2020-25637

Add a new field to @acl annotations for filtering by
unsigned int parameters.

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit 50864dcda191eb35732dbd80fb6ca251a6bba923
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:25:40 +08:00
Huawei Technologies Co., Ltd
6714fa2b16 rpc: gendispatch: handle empty flags
CVE-2020-25637

Prepare for omission of the <flagname> in remote_protocol.x
@acl annotations:
 @acl: <object>:<permission>:<flagname>
so that we can add more field after, e.g.:
 @acl: <object>:<permission>::<field>

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit 955029bd0ad7ef96000f529ac38204a8f4a96401
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:25:40 +08:00
openeuler-ci-bot
aa8eee2f47 !17 Substitute security_context_t with char *
Merge pull request !17 from XuYandong/openEuler-20.03-LTS
2020-08-05 10:08:38 +08:00
Xu Yandong
2a2765c143 Substitute security_context_t with char *
Replace deprecated security_context_t with char

Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-08-04 09:40:08 +00:00
openeuler-ci-bot
e27d30f879 !13 cpu_map: introduce Kunpeng-920 cpu features
Merge pull request !13 from XuYandong/cpumap
2020-05-26 21:26:26 +08:00
Xu Yandong
b74becba6a cpu_map: introduce Kunpeng-920 cpu features
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-26 20:31:02 +08:00
openeuler-ci-bot
50c19888c9 !12 Enable host-model cpu mode for AArch64
Merge pull request !12 from XuYandong/hostmodel
2020-05-21 11:51:15 +08:00
Xu Yandong
969e2d6f9a cpu-model: enable 'host-model' cpu mode for AArch64 architecture
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-20 15:16:15 +08:00
openeuler-ci-bot
7330834bd3 !11 Rebase libvirt to version 6.2.0
Merge pull request !11 from XuYandong/ltsuploadv4
2020-05-12 11:40:36 +08:00
Xu Yandong
dd0ef7b0c8 bugfix: fix virsh dump/migrate and virDaemon return code error
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-12 11:14:39 +08:00
Xu Yandong
e471c406f3 cpu: add cpu model support for kunpeng-920
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-12 11:14:30 +08:00
Xu Yandong
72e8bd75f0 cherry-pick bugfixes from version 5.5.0
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-12 09:23:35 +08:00
Xu Yandong
89e3c1a340 Rebase libvirt to version 6.2.0
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-12 09:23:27 +08:00
openeuler-ci-bot
599af213b0 !5 Fix libvirt CVE-2019-20485
Merge pull request !5 from XuYandong/openEuler-20.03-LTS
2020-05-11 09:37:19 +08:00
Xu Yandong
838527c759 Fix CVE-2019-20485
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-09 17:36:19 +08:00
openeuler-ci-bot
6c0fcc7259 !3 [feature] Add template for PR and issues
Merge pull request !3 from zhanghailiang/master
2020-01-13 11:51:35 +08:00
Zhang Hailiang
bca20ca68d PR/issue: Add templates for Issues and PR
Add issue and PR templates to help developers.

Signed-off-by: Zhang Hailiang <zhang.zhanghailiang@huawei.com>
2020-01-13 11:15:23 +08:00
openeuler-ci-bot
3191016abd !2 fix bug which not translate 'running' when use virsh list command in chinese language
Merge pull request !2 from zhanghailiang/master
2020-01-09 21:08:10 +08:00
Xu Yandong
7b5158f8e6 po: refresh translation of "running state"
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-01-06 15:03:29 +08:00
openeuler-ci-bot
a7c6e5b481 !1 Pick some bugfix patch from libvirt upstream
Merge pull request !1 from openeuler-virt-review/master
2019-12-26 17:23:51 +08:00
Xu Yandong
c94ecc7dd1 sync-patch: cherry pick patches from upstream
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2019-12-26 16:17:12 +08:00
Xu Yandong
2c9b2aeb63 cpu_map: cherry pick patches about CVE-2019-11135
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2019-12-26 16:16:27 +08:00
dogsheng
66b96aff65 Package init 2019-12-25 15:55:44 +08:00
dogsheng
81c6c6500e Package init 2019-12-13 15:41:47 +08:00
zhuchunyi
6d0c3f9009 update code 2019-11-06 19:40:52 +08:00