Commit Graph

10071 Commits

Author SHA1 Message Date
Zhongtao Hu
274de024c5 docs: add README for runtime-rs hypervisor crate
add README for runtime-rs hypervisor crate

Fixes:#4634
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2022-09-23 15:20:02 +08:00
Chao Wu
9cf5de0b4e
Merge pull request #5171 from liubin/fix/5170-use-macro
runtime-rs/resource: use macro to reduce duplicated code
2022-09-23 10:59:53 +08:00
Wainer Moschetta
fb56efd658
Merge pull request #5202 from stevenhorsman/remove-skopeo-from-deploy
packaging: Remove skopeo & umoci
2022-09-22 21:31:20 -03:00
wangyongchao.bj
04bbce8dc3 virtcontainers: add warn log record for qmp hotplug cpu error
The qmp command of hotplug cpu failed error was hidden. It didn't friendly for
the user tracing the hotplug cpu error. The PR help us to improve the hotplug
cpu error log. Add real qemu command error log for `failed to hot add vCPUs`.
Through the error message, we can get the reason of the failed qmp command
 for hotplug cpu operation.

Fixes: #5234

Signed-off-by: wangyongchao.bj <wangyongchao.bj@inspur.com>
2022-09-23 08:22:30 +08:00
Gabriela Cervantes
a4a23457ca osbuilder: Export directory variables for libseccomp
To avoid the random failures when we are building the rootfs as it seems
that it does not find the value for the libseccomp and gperf directory,
this PR export these variables.

Fixes #5232

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-09-22 21:45:20 +00:00
Chelsea Mafrica
de869f2565
Merge pull request #5188 from liubin/fix/5187-incorrect-comments-in-kata-types-hypervisor
runtime-rs: fix incorrect comments
2022-09-22 14:09:20 -07:00
Zhongtao Hu
d663f110d7 kata-deploy: get the config path from cri options
get the config path for runtime-rs from cri options

Fixes: #5000
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2022-09-22 17:39:25 +08:00
Zhongtao Hu
c6b3dcb67d kata-deploy: support kata-deploy for runtime-rs
support kata-deploy for runtime-rs

Fixes:#5000
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2022-09-22 17:39:20 +08:00
Ji-Xinyou
46965739a4 runtime-rs: remove hardcoded string
Use KATA_PATH instead of "run/kata"

Fixes: #5229
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
2022-09-22 16:06:51 +08:00
Zhongtao Hu
a394761a5c kata-deploy: add installation for runtime-rs
setup the compile environment and installation path for the Rust runtime

Fixes:#5000
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2022-09-22 15:59:44 +08:00
Peng Tao
ce22a9f134
Merge pull request #5159 from BbolroC/s390-config
kernel: Add crypto kernel config for s390
2022-09-22 15:36:24 +08:00
Peng Tao
a2c13bad45
Merge pull request #5156 from fengwang666/uid-reuse-bug
Non-root hypervisor uid reuse bug
2022-09-22 15:35:39 +08:00
Peng Tao
af174c2b6d
Merge pull request #5195 from wllenyj/update-dbs
Build-in Sandbox: update dragonball-sandbox dependencies
2022-09-22 15:07:11 +08:00
Ji-Xinyou
50299a3292 refactor(runtime-rs): Use RwLock in runtime agent
Use RwLock for Agent in runtime, for better concurrency.

Fixes: #5199
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
2022-09-21 17:43:40 +08:00
Peng Tao
9628c7df0c runtime: update runc dependency
To bring fix to CVE-2022-29162.

Fixes: #5217
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2022-09-21 17:21:37 +08:00
Peng Tao
7fbc883879 runtime-rs: drop dependency on rustc-serialize
We are not using it and it hasn't got any updates for more than five
years, leaving open CVEs unresolved.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2022-09-21 17:19:58 +08:00
Peng Tao
bf2be0cf7a release: Revert kata-deploy changes after 3.0.0-rc0 release
As 3.0.0-rc0 has been released, let's switch the kata-deploy / kata-cleanup
tags back to "latest", and re-add the kata-deploy-stable and the
kata-cleanup-stable files.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2022-09-21 15:19:38 +08:00
snir911
cb977c04bd
Merge pull request #5204 from GabyCT/topic/updatevirt
docs: Update url in virtualization document
2022-09-21 10:05:13 +03:00
Ji-Xinyou
e23bfd615e runtime-rs: make function name more understandable
Change kparams to kernel_params for understandability.

Fixes: #5068
Signed-Off-By: Ji-Xinyou <jerryji0414@outlook.com>
2022-09-21 11:48:11 +08:00
Ji-Xinyou
426a436780 runtime-rs: add unit test and eliminate raw string
Add two unit tests for coverage and eliminate raw strings to constant.

Fixes: #5068
Signed-Off-By: Ji-Xinyou <jerryji0414@outlook.com>
2022-09-21 11:47:07 +08:00
Ji-Xinyou
87959cb72d runtime-rs: debug console support in runtime
Read debug console configuration in kernel params.

Fixes: #5068
Signed-Off-By: Ji-Xinyou <jerryji0414@outlook.com>
2022-09-21 11:46:55 +08:00
Bin Liu
a2e7434a0f
Merge pull request #5082 from QiliangFan/main
dragonball: Fix problem that stdio console cannot connect to stdout
2022-09-21 11:12:19 +08:00
Gabriela Cervantes
d55cf9ab71 docs: Update url in virtualization document
This PR updates the url for the cloud hypervisor in the virtualization
document.

Fixes #5203

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-09-20 16:52:24 +00:00
stevenhorsman
77176cd7b9 packaging: Remove skopeo & umoci
- Remove skopeo and umoci from the CC image

Fixes: #4889
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-20 14:28:40 +01:00
Steve Horsman
f80723a483
Merge pull request #5167 from Alex-Carter01/sev-initrd-rename
kata-deploy: rename make target for sev initrd
2022-09-20 10:50:33 +01:00
wllenyj
0399da677d runtime-rs: update dependencies
Updated Cargo.lock.

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2022-09-20 15:00:14 +08:00
wllenyj
f6f19917a8 dragonball: update dragonball-sandbox dependencies
Updated vmm-sys-util to 0.10.0
Updated virtio-queue to 0.4.0
Updated vm-memory to 0.9.0
Updated linux-loader to 0.5.0

Fixes: #5194

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2022-09-20 14:48:09 +08:00
Zhongtao Hu
e05e42fd3c
Merge pull request #5113 from liubin/fix/5112-call-TomlConfig-validate-func
runtime-rs: call TomlConfig's validate function after load
2022-09-20 14:38:42 +08:00
Zhongtao Hu
fc65e96ad5
Merge pull request #5133 from openanolis/shimmgmt
feat(Shimmgmt): Shim management server and client
2022-09-20 14:37:19 +08:00
Wainer Moschetta
63f931b719
Merge pull request #5127 from Alex-Carter01/depmod-rootfs
CC use depmod in rootfs builder for kernel modules with docker support
2022-09-19 09:33:33 -03:00
Wainer Moschetta
ad49a11761
Merge pull request #5038 from Alex-Carter01/sev-kernel-makefile
CC | packaging: Build SEV capable kernel + efi_secret module
2022-09-19 09:32:33 -03:00
Bin Liu
2caee1f38d runtime-rs: define VFIO unbind path as a const
In src/runtime-rs/crates/hypervisor/src/device/vfio.rs,
the path of new_id is defined as a const, but unbind is used
as a local variable, they should be unified to const.

Fixes: #5189

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-19 16:08:35 +08:00
Bin Liu
3f65ff2d07 runtime-rs: fix incorrect comments
Some comments for types are incorrect in file
 src/libs/kata-types/src/config/hypervisor/mod.rs

Fixes: #5187

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-19 16:03:06 +08:00
Bin Liu
9670a3caac runtime-rs: use Path.is_file to check regular files
Use Path.is_file to replace using `stat` to check the file type.

Fixes: #5185

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-19 15:57:07 +08:00
Joana Pecholt
d9e6eb11ae docs: Guide to use SNP-VMs with Kata-Containers
The guide describes how to set Kata-Containers up so that AMD SEV-SNP
encrypted VMs are used when deploying confidential containers.

Signed-off-by: Joana Pecholt <joana.pecholt@aisec.fraunhofer.de>
2022-09-16 17:51:41 +02:00
Joana Pecholt
ded60173d4 runtime: Enable choice between AMD SEV and SNP
This is based on a patch from @niteeshkd that adds a config
parameter to choose between AMD SEV and SEV-SNP VMs as the
confidential guest type in case both types are supported. SEV is
the default.

Signed-off-by: Joana Pecholt <joana.pecholt@aisec.fraunhofer.de>
2022-09-16 17:51:41 +02:00
Joana Pecholt
22bda0838c runtime: Support for AMD SEV-SNP VMs
This commit adds AMD SEV-SNP as a confidential guest option to the
runtime. Information on required components such as OVMF, QEMU and
a kernel supporting SEV-SNP are defined in the versions file and
corresponding configs are added.

Note: The CPU model 'host' provided by the current SNP-QEMU does
not support all SNP capabilities yet, which is why this option is
changed to EPYC-v4.

Note: The guest's physical address space reduction specified with
ReducedPhysBits is 1. Details are can be found in Section 15.34.6
here https://www.amd.com/system/files/TechDocs/24593.pdf

Fixes #4437

Signed-off-by: Joana Pecholt <joana.pecholt@aisec.fraunhofer.de>
2022-09-16 17:51:41 +02:00
Joana Pecholt
a2bbd29422 kernel: Introduce SNP kernel
This introduces the SNP kernel as a confidential computing guest.

Signed-off-by: Joana Pecholt <joana.pecholt@aisec.fraunhofer.de>
2022-09-16 17:51:41 +02:00
Joana Pecholt
0e69405e16 docs: Developer-Guide updated
Developer-Guide.md is updated to work using current golang versions.
Related Readmes are also updated.

Signed-off-by: Joana Pecholt <joana.pecholt@aisec.fraunhofer.de>
2022-09-16 17:51:41 +02:00
Joana Pecholt
105eda5b9a runtime: Initrd path option added to config
Adds initrd configuration option to the configuration.toml that is
generated for the setup using QEMU.

Signed-off-by: Joana Pecholt <joana.pecholt@aisec.fraunhofer.de>
2022-09-16 17:51:41 +02:00
Alex Carter
59537ceb2d osbuilder: CC, add kmod to rootfs builder docker environment
To use depmod in the rootfs builder, the docker environment will require kmod.

Fixes: kata-containers#5125

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-16 10:13:10 -04:00
Alex Carter
50a959e6cf osbuilder: CC use depmod in rootfs builder for kernel modules
Using depmod when adding kernel modules to get dependencies.

Needed for the efi secret module for sev.

Fixes: #5125

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-16 10:12:49 -04:00
Wainer Moschetta
c53f063acd
Merge pull request #5024 from Alex-Carter01/rootfs-agent-config
CC | rootfs builder: add agent config file to rootfs for offline_sev_kbc
2022-09-16 10:25:30 -03:00
Tim Zhang
32a9d6d66d
Merge pull request #5174 from bergwolf/3.0.0-rc0-branch-bump
# Kata Containers 3.0.0-rc0
2022-09-16 16:59:55 +08:00
stevenhorsman
6233fa95d1 doc: Add new endpoints
Add new endpoints to the sample confidential config for the agent

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
31164eeedf doc: workaround link checker
- Update crictl to remove backticks

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
ef381b084d vendor: Bump image-rs version
- Bump the image-rs version to pick up the signing scheme updates

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
812818d381 agent: Enable security_validate if required
If we are using the offline_fs_kbc and have created a resource json
then switch security_validate on the image_client to enable
the signature verification feature for image-rs

Fixes: #4581
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
216c066795 doc: Update the agent build
Update the agent build to get around the nix & glibc linker problems
by running the libseccomp installation first

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
3aebead189 doc: Update ccv0 doc and scripts
- Update the doc and scripts to reflect that skopeo isn't mandatory
for signature verification any longer
- Update the script to default the aa_kbc to offline_fs_kbc

Fixes: #4581
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00