80 Commits

Author SHA1 Message Date
Euler Robot
eb02e33f40 Hotpatch: introduce DomainHotpatchManage API
Signed-off-by: Hao Wang <wanghao232@huawei.com>
Signed-off-by: Bihong Yu <yubihong@huawei.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
2022-03-18 20:52:48 +08:00
openeuler-ci-bot
60d4c4a423 !91 fix cve-2021-3667 cve-2021-3631
From: @imxcc
Reviewed-by: @kevinzhu1
Signed-off-by: @kevinzhu1
2021-09-26 09:08:05 +00:00
imxcc
389e114ac8 fix cve-2021-3667 cve-2021-3631
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-09-26 16:32:28 +08:00
openeuler-ci-bot
eb8f60125d !87 Automatically generate code patches with openeuler !38
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-24 06:46:20 +00:00
Chen Qun
afd6dce36b spec: Update release version with !38
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-09-24 11:28:33 +08:00
Chen Qun
03afa02c3b spec: Update patch and changelog with !38 conf/domain_conf: pin the retry_interval and retry_timeout parameters to xml !38
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:31 +08:00
Euler Robot
34896f104c 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:31 +08:00
openeuler-ci-bot
8ab4fe5eaf !85 bugfix:virDevMapperGetTargets: Don't ingore EBADF
From: @imxcc
Reviewed-by: @kevinzhu1
Signed-off-by: @kevinzhu1
2021-09-14 14:51:27 +00:00
imxcc
8ac929cbee virDevMapperGetTargets: Don't ignore EBADF
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-09-14 22:34:03 +08:00
imxcc
e4337e3bb0 Modify some different patch files
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-09-14 22:25:39 +08:00
openeuler-ci-bot
951c709e11 !82 when dm-mod not load , libvirt create vm error
From: @friendpalm
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-14 01:08:46 +00:00
heyitao
8f54669cbd Handle kernel without device-mapper support
Signed-off-by: heyitao <heyitao@uniontech.com>
2021-09-02 03:20:31 -04:00
openeuler-ci-bot
6768e48a78 !81 libvirt delete -S git_am from %autosetup, and delete BuildRequires git
From: @chenyanpanHW
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-07-31 12:39:38 +00:00
chenyanpanHW
f08580e7a4
delete -S git_am from %autosetup, and delete BuildRequires git 2021-07-30 23:04:34 +08:00
openeuler-ci-bot
17a3e364f5 !78 [feature]add new CPU model Cooperlake
From: @jingyi_wang
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-07-27 07:59:24 +00:00
Jingyi Wang
909e0586cd Add new CPU model Cooperlake
Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-27 15:19:45 +08:00
openeuler-ci-bot
269ef91758 !75 Automatically generate code patches with openeuler !30
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-07-14 02:20:28 +00:00
Chen Qun
24ad023f15 spec: Update release version with !30
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-07-13 21:28:00 +08:00
Chen Qun
e51f6bf7a4 spec: Update patch and changelog with !30 tests: fix stat mocking with Fedora rawhide(for glibc 2.33) !30
tests: fix stat mocking with Fedora rawhide

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peng Liang <liangpeng10@huawei.com>
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-07-13 21:28:00 +08:00
imxcc
389035428c tests: fix stat mocking with Fedora rawhide
GLibC has a really complicated way of dealing with the 'stat' function
historically, which means our mocks in turn have to look at four
different possible functions to replace, stat, stat64, __xstat,
__xstat64.

In Fedora 33 and earlier:

 - libvirt.so links to __xstat64
 - libc.so library exports stat, stat64, __xstat, __xstat64
 - sys/stat.h header exposes stat and __xstat

In Fedora 34 rawhide:

 - libvirt.so links to stat64
 - libc.so library exports stat, stat64, __xstat, __xstat64
 - sys/stat.h header exposes stat

Historically we only looked at the exported symbols from libc.so to
decide which to mock.

In F34 though we must not consider __xstat / __xstat64 though because
they only existance for binary compatibility. Newly built binaries
won't reference them.

Thus we must introduce a header file check into our logic for deciding
which symbol to mock. We must ignore the __xstat / __xstat64 symbols
if they don't appear in the sys/stat.h header, even if they appear
in libc.so

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Peng Liang <liangpeng10@huawei.com>
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-07-13 21:28:00 +08:00
openeuler-ci-bot
7359780d1e !66 libvirt.spec: remove dtrace for aarch64 OS
From: @lijiajie128
Reviewed-by: @xydong
Signed-off-by: @xydong
2021-03-19 21:39:58 +08:00
Jiajie Li
fd0efbf8ec libvirt.spec: remove dtrace for aarch64 OS
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-03-19 20:17:44 +08:00
openeuler-ci-bot
7557fcf394 !64 Automatically generate code patches with openeuler !26
From: @kuhnchen18
Reviewed-by: @cellfaint
Signed-off-by: @cellfaint
2021-03-18 21:12:25 +08:00
Chen Qun
d9f0a0d97f spec: Update release version with !26
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-03-18 20:10:46 +08:00
Chen Qun
970f1f9ae0 spec: Update patch and changelog with !26 libvirt/conf: Set default values of retry fileds !26
libvirt/conf: Set default values of retry fileds

Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
2021-03-18 20:10:45 +08:00
Chen Qun
9310f12cbc 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-03-18 20:10:45 +08:00
openeuler-ci-bot
d4073186bb !62 Automatically generate code patches with openeuler !25 !24
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-03-09 10:37:26 +08:00
Euler Robot
a5975800f4 spec: Update release version with !25 !24
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-02-27 21:29:08 +08:00
Euler Robot
9d720c6958 spec: Update patch and changelog with !24
add phytium 2000plus and s2500 support on arm architecture for capability
2021-02-27 21:29:08 +08:00
Huawei Technologies Co., Ltd
f41320e694 add phytium 2000plus and s2500 support on arm architecture for capability 2021-02-27 21:29:08 +08:00
Euler Robot
d250526da2 spec: Update patch and changelog with !25
libvirt: Add 'retry' support for error policy
qemu: Support 'retry' BLOCK_IO_ERROR event.

Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
2021-02-27 21:29:06 +08:00
Huawei Technologies Co., Ltd
d7ff1f4b63 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-02-27 21:29:06 +08:00
Huawei Technologies Co., Ltd
d5ed21e52d 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-02-27 21:29:06 +08:00
openeuler-ci-bot
bf58106e5b !54 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-01-21 09:34:39 +08:00
Euler Robot
6a684f06d7 spec: Update release version with !19 !20
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-01-20 10:54:01 +08:00
Euler Robot
bcedf758ec spec: Update patch and changelog with !19
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:54:01 +08:00
Huawei Technologies Co., Ltd
94ac69c182 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:53:54 +08:00
Huawei Technologies Co., Ltd
6b455e4fb1 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:53:27 +08:00
openeuler-ci-bot
7352d162b9 !38 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2020-10-27 15:41:52 +08:00
Euler Robot
e60b829457 spec: Update release version with !14
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2020-10-26 20:59:55 +08:00
Euler Robot
16330ca79d spec: Update patch and changelog with !14
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:59:55 +08:00
Huawei Technologies Co., Ltd
bc9ee542aa 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:59:55 +08:00
Huawei Technologies Co., Ltd
fc93d2b756 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:59:55 +08:00
Huawei Technologies Co., Ltd
6cac390357 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:59:55 +08:00
Huawei Technologies Co., Ltd
27ef2f13e3 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:59:55 +08:00
openeuler-ci-bot
5d4c07442c !34 bugfix: cherry-pick some bugfix patches from openEuler-20.09 branch
From: @zhendongchen
Reviewed-by: @xydong
Signed-off-by: @xydong
2020-09-30 09:19:01 +08:00
AlexChen
b4fd5d3833 libvirt: add the prefix 'libvirt' for some patches
Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-09-29 17:07:13 +08:00
AlexChen
fa8b1908cc libvirt: add the cherry-pick info
Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-09-29 16:59:14 +08:00
AlexChen
811898dff8 cherry-pick some bugfix patches from open source community
cherry-pick patchs list:
2ab8dba5    qemuDomainGetUnplugTimeout: Add G_GNUC_NO_INLINE 
423664a6    virNetDevSwitchdevFeature: Make failure to get 'family_id' non-fatal 
ca616274    virNetDevGetFamilyId: Change signature 
67b973b5    qemuDomainDefPostParse: Fail if unable to fill machine type 
67e19fc9    qemu: Revoke access to mirror on failed blockcopy 
93b15ba0    qemu: fix hang in p2p + xbzrle compression + parallel migration 
a13ac587    util: fix iteration in virSocketAddrResolveService 
88011ed2    libxl: fix crash when initializing driver

Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-09-29 16:59:08 +08:00
hao__wangh
f25125ef95 backport upstream patches 2020-09-29 16:43:19 +08:00