Commit Graph

10377 Commits

Author SHA1 Message Date
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
Peng Tao
583591099d release: Kata Containers 3.0.0-rc0
- runtime-rs: delete some allow(dead_code) attributes
- kata-types: don't check virtio_fs_daemon for inline-virtio-fs
- kata-types: change return type of getting CPU period/quota function
- runtime-rs: fix host device check pattern
- runtime-rs: remove meaningless comment
- runtime-rs: update rust runtime roadmap
- runk: Enable seccomp support by default
- config: add "inline-virtio-fs" as a "shared_fs" type
- runtime-rs: add README.md
- runk: Refactor container builder
- kernel: fix kernel tarball name for SEV
- libs/kata-types: replace tabs by spaces in comments
- gperf: point URL to mirror site

be242a3c3 release: Adapt kata-deploy for 3.0.0-rc0
156e1c324 runtime-rs: delete some allow(dead_code) attributes
62cf6e6fc runtime-rs: remove meaningless comment
bcf6bf843 runk: Enable seccomp support by default
2b1d05857 runtime-rs: fix host device check pattern
85b49cee0 runtime-rs: add README.md
36d805fab config: add "inline-virtio-fs" as a "shared_fs" type
b948a8ffe kernel: fix kernel tarball name for SEV
50f912615 libs/kata-types: replace tabs by spaces in comments
96c8be715 libs/kata-types: change return type of getting CPU period/quota
fc9c6f87a kata-types: don't check virtio_fs_daemon for inline-virtio-fs
968c2f6e8 runk: Refactor container builder
84268f871 runtime-rs: update rust runtime roadmap
566656b08 gperf: point URL to mirror site

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2022-09-16 03:53:44 +00:00
Peng Tao
be242a3c3c release: Adapt kata-deploy for 3.0.0-rc0
kata-deploy files must be adapted to a new release.  The cases where it
happens are when the release goes from -> to:
* main -> stable:
  * kata-deploy-stable / kata-cleanup-stable: are removed

* stable -> stable:
  * kata-deploy / kata-cleanup: bump the release to the new one.

There are no changes when doing an alpha release, as the files on the
"main" branch always point to the "latest" and "stable" tags.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2022-09-16 03:53:43 +00:00
Alex Carter
9f643ac9c8 osbuilder: add CC's agent config file to rootfs for offline_sev_kbc
Adds default config file.
Adds case in rootfs.sh to copy config.

Fixes kata-containers#5023

Fixes: #5023

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-15 18:26:29 +00:00
Bin Liu
a8a8a28a34 runtime-rs/resource: use macro to reduce duplicated code
Some device types have the same definition, they can be implemented
by macro to reduce code.

And this commit also deleted the `peer_name` field of the structs that
is never been used.

Fixes: #5170

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-15 15:45:26 +08:00
Wang, Arron
8225457dd5 config: Add root hash value and measure config to kernel params
After we have a guest kernel with builtin initramfs which
provide the rootfs measurement capability and Kata rootfs
image with hash device, we need set related root hash value
and measure config to the kernel params in kata configuration file.

Fixes: #5168

Signed-off-by: Wang, Arron <arron.wang@intel.com>
2022-09-15 10:39:57 +08:00
Bin Liu
be22e8408d
Merge pull request #5165 from liubin/fix/5164-remove-dead_code
runtime-rs: delete some allow(dead_code) attributes
2022-09-15 09:32:10 +08:00
Alex Carter
056d85de2c kata-deploy: rename make target for sev initrd
The sev initrd target had been changed to "cc-sev-rootfs-initrd".
This was good discussion as part of #5120.
I failed to rename it from "cc-sev-initrd-image" in kata-deploy-binaries.
The script will fail for a bad build target.

Fixes: #5166

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-14 23:34:33 +00:00
Wainer Moschetta
30460044a5
Merge pull request #5130 from Alex-Carter01/qemu-sev-runtimeclass
CC, kata-deploy: add kata-qemu-sev runtimeclass
2022-09-14 19:47:23 -03:00
Bin Liu
156e1c3247 runtime-rs: delete some allow(dead_code) attributes
Some #![allow(dead_code)]s and code are not needed indeed.

Fixes: #5164

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-14 20:50:30 +08:00
Wainer Moschetta
895150e383
Merge pull request #5120 from Alex-Carter01/initrd-efi-dep
CC, packaging: add sev-initrd target, and add efi_secret module to sev's initrd
2022-09-14 08:03:55 -03:00
qiliangfan
7622452f4b Dragonball: Fix the problem about stdio console
Let stdout stream connect to the com1_device,

Fixes: #5083

Signed-off-by: qiliangfan <fanqiliang@mail.nankai.edu.cn>
2022-09-14 15:53:57 +08:00
Bin Liu
208233288a runtime-rs: add test for StaticResource
Add test case for StaticResource, the old test is not
covering the StaticResource struct.

Fixes: #5162

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-14 11:45:07 +08:00
Bin Liu
adb33a4121 packaging: fix typo in configure-hypervisor.sh
`powwer` is a typo of `power`, and many spaces should
be replaced by tabs for indent.

Fixes: #5160

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-14 11:38:01 +08:00
Feng Wang
f914319874 runtime: store the user name in hypervisor config
The user name will be used to delete the user instead of relying on
uid lookup because uid can be reused.

Fixes: #5155

Signed-off-by: Feng Wang <feng.wang@databricks.com>
2022-09-13 10:32:55 -07:00
Hyounggyu Choi
86a02c5f6a kernel: Add crypto kernel config for s390
This config update supports new crypto algorithms for s390.

Fixes: #5158

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2022-09-13 18:13:57 +02:00
Alex Carter
69230fac97 packaging: add efi secret module to rootfs for sev
Adds the efi_secret kernel module to the sev initrd.

Adds a rootfs flag for kernel module based on the AA_KBC.

Finding the kernel module in the local build based on kernel version and kernel config version.

Moved kernel config version checking function from kernel builder to lib script.

Fixes: #5118

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-13 11:18:16 -04:00
Alex Carter
fa11294b0f packaging: add CC's sev-initrd target
Adds a make target, and a function in the kata-deploy-binaries script.
In the spirit of avoiding code duplication, making the cc-initrd function more generic.

Fixes: #5118

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-13 11:17:54 -04:00
Wainer Moschetta
9b49a6ddc6
Merge pull request #5026 from Alex-Carter01/sev-ovmf-makefile
CC| packaging: Add AmdSev OVMF target for use in payload images
2022-09-13 11:11:51 -03:00
Steve Horsman
65b4261aa8
Merge pull request #3697 from yoheiueda/CCv0-peerpod
Support Peer Pod VMs
2022-09-13 11:14:44 +01:00
Feng Wang
5cafe21770 runtime: make StopVM thread-safe
StopVM can be invoked by multiple threads and needs to be thread-safe

Fixes: #5155

Signed-off-by: Feng Wang <feng.wang@databricks.com>
2022-09-12 21:56:15 -07:00
Feng Wang
c3015927a3 runtime: add more debug logs for non-root user operation
Previously the logging was insufficient and made debugging difficult

Fixes: #5155

Signed-off-by: Feng Wang <feng.wang@databricks.com>
2022-09-12 21:38:57 -07:00
Bin Liu
a58feba9bb
Merge pull request #5105 from liubin/fix/5104-ignore-virtiofs-daemon-for-inline-mode
kata-types: don't check virtio_fs_daemon for inline-virtio-fs
2022-09-13 10:33:56 +08:00
Bin Liu
42d4da9b6c
Merge pull request #5101 from liubin/fix/5100-cpu-period-quota-data-type
kata-types: change return type of getting CPU period/quota function
2022-09-13 10:33:29 +08:00
Tim Zhang
8ec4edcf4f
Merge pull request #5146 from liubin/fix/5145-check-host-dev
runtime-rs: fix host device check pattern
2022-09-13 10:33:05 +08:00
Tim Zhang
447521c6da
Merge pull request #5151 from liubin/fix/5150-remove-comment
runtime-rs: remove meaningless comment
2022-09-13 10:32:53 +08:00
Bin Liu
2f830c09a3
Merge pull request #5073 from openanolis/update
runtime-rs: update rust runtime roadmap
2022-09-13 10:32:25 +08:00
Alex Carter
502a78730b packaging: Build SEV capable kernel + efi_secret module
Adds a new make target for an sev kernel which can be built and put into payload bundles for the operator.

Currently not including this sev kernel target in the cc payload bundle.

Unfortunately having to breakflow from using the generic cc_tee_kernel functions in either the kata-deploy-binaries or build-kernel.
Largely based on using an upstreamed kernel release, meaning the url is the defaul cdn, and e.g. we use version rather than tag.
The upside of this is that we can use the sha sum checking functionality from the generic get_kernel function.

CC label in title removed for commit message check.

Fixes: #5037

Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-09-12 15:52:50 -04:00
Alex Carter
93a1780bdb packaging: Add CC's AmdSev OVMF target for use in payload images
Currently leaving the cc-sev-ovmf-tarball target out of the cc payload.
I was not sure where discussion had landed on the number of payload bundles.
e.g. could be included in a cc bundle along with tdx support or create an SEV bundle.

Fixes: kata-containers#5025

Fixes: #5025

Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-09-12 12:59:11 -04:00
Bin Liu
62cf6e6fc3 runtime-rs: remove meaningless comment
The comment for `generate_mount_path` function is a copy miss
and should be deleted.

Fixes: #5150

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-09 16:07:35 +08:00
Bin Liu
55f4f3a95b
Merge pull request #4897 from ManaSugi/runk/enable-seccomp
runk: Enable seccomp support by default
2022-09-09 14:11:35 +08:00
Wang, Arron
9373ec7d80 kernel: Integrate initramfs into Guest kernel
Integrate initramfs into guest kernel as one binary,
which will be measured by the firmware together.

Fixes: #5148

Signed-off-by: Wang, Arron <arron.wang@intel.com>
2022-09-09 13:35:37 +08:00
Yohei Ueda
5422a056f2
runtime: Copy shared files recursively
This patch enables recursive file copying
when filesystem sharing is not used.

Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 11:22:26 +09:00
Yohei Ueda
de232b8030
agent: support copying of directories and symlinks
This patch allows copying of directories and symlinks when
static file copying is used between host and guest. This change is
necessary to support recursive file copying between shim and agent.

Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 11:07:34 +09:00
Lei Li
c3e6b66051
runtime: Support privileged containers in peer pod VM
This patch fixes the issue of running containers
with privileged as true.

See the discussion at this URL for the details.
https://github.com/confidential-containers/cloud-api-adaptor/issues/111

Author:    Lei Li <cdlleili@cn.ibm.com>
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 11:07:34 +09:00
Yohei Ueda
f9278f22c3
runtime: Support the remote hypervisor type
This patch adds the support of the remote hypervisor type.
Shim opens a Unix domain socket specified in the config file,
and sends TTPRC requests to a external process to control
sandbox VMs.

Fixes #4482

Co-authored-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 11:07:28 +09:00
Manabu Sugimoto
bcf6bf843c runk: Enable seccomp support by default
Enable seccomp support in `runk` by default.
Due to this, `runk` is built with `gnu libc` by default
because the building `runk` with statically linked the `libseccomp`
and `musl` requires additional configurations.
Also, general container runtimes are built with `gnu libc` as
dynamically linked binaries by default.
The user can disable seccomp by `make SECCOMP=no`.

Fixes: #4896

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2022-09-09 10:55:16 +09:00
Yohei Ueda
150e8aba6d
runtime: Add hypervisor proto to support peer pod VMs
This patch adds a protobuf definiton of the remote hypervisor type.

Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 10:18:23 +09:00
Fabiano Fidêncio
55c8c7226d
Merge pull request #5134 from Megan-Wright/CCv0
CCv0: Merge main into CCv0 branch
2022-09-08 19:35:45 +02:00
GabyCT
be462baa7e
Merge pull request #5103 from liubin/fix/5102-add-inline-virtiofs-config
config: add "inline-virtio-fs" as a "shared_fs" type
2022-09-08 10:33:20 -05:00
GabyCT
bcbce8317d
Merge pull request #5061 from liubin/fix/5022-runtime-rs-readme
runtime-rs: add README.md
2022-09-08 10:32:08 -05:00
Alex Carter
7849c7977c kata-deploy: add CC's kata-qemu-sev runtimeclass
After adding an SEV QEMU config file (#4850), need to configure containerd to select this when appropriate based on a new runtimeclass.

Adds to the configuration of containerd so the correct config is selected.

Fixes: #4851

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-08 15:19:45 +00:00
bin liu
2b1d058572 runtime-rs: fix host device check pattern
Host devices should start with `/dev/` but not `/dev`.

Fixes: #5145

Signed-off-by: bin liu <liubin0329@gmail.com>
2022-09-08 22:44:46 +08:00
Fabiano Fidêncio
61fd408594
Merge pull request #5096 from ryansavino/sev-kernel-build-fix-ccv0
kernel: fix kernel tarball name for SEV for CCv0
2022-09-08 11:43:09 +02:00
Bin Liu
85b49cee02 runtime-rs: add README.md
Add README.md for runtime-rs.

Fixes: #5022

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-08 16:03:45 +08:00