Commit Graph

18786 Commits

Author SHA1 Message Date
Fabiano Fidêncio
a5e1521727 kernel: bake in Mellanox MLX5 Ethernet support
The MLX5 Ethernet driver is useful well beyond the DPU/SmartNIC use case
(any guest sitting on top of a Mellanox/ConnectX NIC benefits from it),
yet the existing config fragment lived under dpu/ and was only pulled in
when the kernel was built with `-D nvidia`.

Promote it to a first-class common fragment so every Kata kernel gets
MLX5 Ethernet built in.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-04-28 11:02:39 +02:00
Saul Paredes
03796a1126 Merge pull request #12909 from microsoft/saul/fix_failing_aks_check
tests: describe pods deployment when testing deployment output
2026-04-27 14:40:20 -07:00
Saul Paredes
dc658a0551 Merge pull request #12917 from sespiros/darwin-libc-mode
genpolicy: make FileType::from portable across Darwin
2026-04-27 14:36:51 -07:00
Fabiano Fidêncio
7820877de5 Merge pull request #12368 from alextibbles/docker-howto
docs: add a simple how-to on using kata from docker
2026-04-27 19:21:11 +02:00
Saul Paredes
7c8df3b9e6 Revert "test: temp skip failing tests on AKS"
This reverts commit 90e94ab305.
2026-04-27 09:36:51 -07:00
Alex Tibbles
90286d3072 docs: add a simple how-to on using kata from docker
Create a new how-to covering simple installation and configuration of
kata as a docker daemon runtime.

Signed-off-by: Alex Tibbles <alex@bleg.org>
2026-04-27 17:51:13 +02:00
Saul Paredes
3273c4e1cc Revert "ci: Skip tests not working with k8s 1.36.0"
This reverts commit df68536cd6.
2026-04-27 08:08:27 -07:00
Saul Paredes
51f234cb56 tests: describe pods deployment when testing deployment output
For k8s 1.36.0, the events of a pod are no longer included in the "kubectl describe pod"
output when describing a deployment. Describe using the "app" label instead.

Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
2026-04-27 08:07:58 -07:00
Spyros Seimenis
d7385eee99 genpolicy: make FileType::from portable across Darwin
libc::S_IF* are u16 on Darwin/BSD and u32 on Linux. The match in
FileType::from and its tests mix both widths and don't compile on
Darwin. Cast everything to u32; on Linux that's a no-op, hence the
clippy::unnecessary_cast allow (rust-lang/rust-clippy#6466).

Fixes: #12916

Signed-off-by: Spyros Seimenis <sse@edgeless.systems>
2026-04-27 12:14:04 +03:00
Steve Horsman
d5785b4eba Merge pull request #12872 from stevenhorsman/bump-rust-to-1.93
Bump rust to 1.93
2026-04-27 09:01:00 +01:00
Steve Horsman
63e50dd946 Merge pull request #12817 from burgerdev/regorus-bump
genpolicy: update regorus to 0.9.1
2026-04-26 13:58:40 +01:00
Fabiano Fidêncio
120d895d60 Merge pull request #12918 from mythi/no-ita
tests: align qemu-tdx kbs tests to use Trustee AS
2026-04-26 13:13:59 +02:00
Fabiano Fidêncio
74d9d043f0 agent: raise regorus policy length limits
regorus 0.9.0 introduced a hard, per-engine ceiling on parsed-policy
size (1024 columns / 1 MiB / 20 000 lines, see lexer.rs:30 in
microsoft/regorus). The 1024-column cap rejects realistic policies
emitted by `genpolicy`: the `NVIDIA_REQUIRE_CUDA` environment variable
on `nvcr.io/nvidia/k8s/cuda-sample` is roughly 1.3 KiB on a single line,
so the agent's `set_policy()` returns an error, the agent (PID 1) exits,
the guest kernel reboots, and the runtime eventually times out
connecting to the agent's vsock.

regorus PR #624 ("feat: make policy length limits configurable per
engine") adds `Engine::set_policy_length_config`, but it has not been
released yet -- the latest published version is still 0.9.1, which
predates that change.

Pin `regorus` to the upstream commit that includes #624 and call the
new setter from `AgentPolicy::new_engine()` with values that comfortably
fit any policy we expect to evaluate (64 KiB per line, 16 MiB per file,
200 000 lines) while still rejecting pathological/minified input. Once
a regorus release > 0.9.1 ships with #624, the dependency can be moved
back to crates.io.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-04-26 10:18:26 +02:00
Markus Rudy
c8fe6a60d0 genpolicy: update regorus to 0.9.1
The version we used before was released in 2024, it's about time to use
a newer version. The new version of the crate comes with a license,
which addresses a `cargo deny` finding.

Signed-off-by: Markus Rudy <mr@edgeless.systems>
2026-04-26 10:18:26 +02:00
Fabiano Fidêncio
815db4a1df Merge pull request #12920 from zvonkok/driver-bump
cuda: Bump Driver Version
2026-04-26 00:00:00 +02:00
Mikko Ylinen
9cccfb5cb5 tests: align qemu-tdx kbs tests to use Trustee AS
No need to deviate from how other CoCo targets use Trustee and
enables us to add more tests (e.g., RVPS) that ITA Trustee implemention
does not support.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2026-04-25 22:53:15 +02:00
Fabiano Fidêncio
749d4713e8 Merge pull request #12897 from kata-containers/dependabot/cargo/src/tools/trace-forwarder/rand-0.8.6
build(deps): bump rand from 0.8.5 to 0.8.6 in /src/tools/trace-forwarder
2026-04-25 22:49:59 +02:00
Steve Horsman
fc359d2140 Merge pull request #12901 from kata-containers/dependabot/cargo/openssl-0.10.78
build(deps): bump openssl from 0.10.76 to 0.10.78
2026-04-25 20:59:51 +01:00
Zvonko Kaiser
150e3ab4b8 cuda: Bump Driver Version
For HGX B300 systems we need the 595 driver branch, bump
the guest fs driver to support those systems.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2026-04-25 19:28:31 +02:00
Fabiano Fidêncio
28d9043d4c build: Add driver version to artefact cache
Add the nvidia driver version to the artefact cache keys so that
a driver bump triggers image and initrd rebuilds.

Also rename the helper functions to follow a consistent
get_latest_nvidia_* naming convention.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-04-25 19:28:31 +02:00
Fabiano Fidêncio
b3ed669d16 Merge pull request #12913 from pmores/fix-exec
runtime-rs: fix exec when selinux is disabled on guest
2026-04-25 17:34:46 +02:00
Fabiano Fidêncio
3d94620df5 Merge pull request #12900 from kata-containers/dependabot/cargo/src/tools/kata-ctl/openssl-0.10.78
build(deps): bump openssl from 0.10.73 to 0.10.78 in /src/tools/kata-ctl
2026-04-25 17:13:01 +02:00
Steve Horsman
db51842229 Merge pull request #12923 from stevenhorsman/bump-webpki-to-0.103.13
versions: Update rustls-webpki to 0.103.13
2026-04-25 16:09:47 +01:00
Fabiano Fidêncio
0a4fb4f11b Merge pull request #12891 from fidencio/topic/networking-handle-device-type-interfaces
runtimes: network: handle "device" type interfaces (mlx5 SFs)
2026-04-25 16:46:37 +02:00
dependabot[bot]
151a797fc0 build(deps): bump openssl from 0.10.76 to 0.10.78
Bumps [openssl](https://github.com/rust-openssl/rust-openssl) from 0.10.76 to 0.10.78.
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.76...openssl-v0.10.78)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.78
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-25 10:28:48 +00:00
dependabot[bot]
365f6c1efa build(deps): bump openssl from 0.10.73 to 0.10.78 in /src/tools/kata-ctl
Bumps [openssl](https://github.com/rust-openssl/rust-openssl) from 0.10.73 to 0.10.78.
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.73...openssl-v0.10.78)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.78
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-25 10:27:45 +00:00
stevenhorsman
913ee79aa1 versions: Bump rust to 1.93
Now that 1.95 has been released, in compliance with our toolchain guidance
we should bump to rust 1.93

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
9d2bb4518f kata-deloy: Update MSRV to match workspace
Update the kata-deploy Cargo.toml to use the
workspace wide MSRV, so it's easy to track and bump
as and when necessary.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
3492e456c1 trace-forwarder: Fix unnecessary_unwrap warnings in macro
Replace is_ok() check followed by unwrap()/unwrap_err() with if let
Ok()/Err() patterns in assert_result macro to fix clippy warnings in
Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
a700ed5bff kata-ctl: Fix unnecessary_unwrap warnings
Replace is_ok() check followed by unwrap() with if let Ok() pattern
to avoid unnecessary unwrap calls and fix clippy warnings in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
d1a20b1887 agent: Fix let_unit_value warning in pipestream tests
Remove unnecessary let binding for unit value expression to fix clippy
warning in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
7ab2f0eeb6 agent: Fix needless_borrow warning in container tests
Remove unnecessary reference operator from expression that is
immediately dereferenced by the compiler to fix clippy warning in
Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
f6b694eac3 agent: Fix bool_assert_comparison warnings in rustjail tests
Replace assert_eq! with literal bool values with assert! or assert!
with negation for more idiomatic assertions to fix clippy warnings in
Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
d6adb912d9 agent: Fix unnecessary_cast warnings
Replace 'as u8' casts with type suffix literals (_u8) for binary
literals to fix clippy warnings in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
dd9cca74e7 agent: Fix search_is_some warning in rustjail tests
Replace .iter().any(|&ap| ap == p) with .contains(&p) for more
idiomatic code to fix clippy warning in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
395804cc98 agent: Fix needless_borrow warnings in rustjail tests
Remove unnecessary reference operators from format!() calls passed to
Command::arg() to fix clippy warnings in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
7554502af7 agent: Fix useless_vec warnings in rustjail tests
Replace vec![] with array literals [] for immutable test data to fix
clippy warnings in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
4dfc0eb101 agent: Fix non_octal_byte_escapes warning in rustjail tests
Replace octal escape sequences (\040) with hex escape sequences (\x20)
for space characters in mountinfo test data to fix clippy warning in
Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
2092127210 agent: Fix octal_escapes warning in rustjail tests
Replace decimal literal with cast (0660 as u32) with proper octal
literal syntax (0o660) to fix clippy warning in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
11b6b6627d dragonball: Remove unnecessary unwrap
Replace is_some() checks followed by unwrap() with and_then() pattern
to address clippy::unnecessary_unwrap warnings in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
1dbfd4b7f4 runtime-rs: Fix clippy warnings for Rust 1.93
- Replace is_ok() check followed by unwrap_err() with if let Err pattern
- Replace .err().expect() with .expect_err()
- Replace is_some() check followed by unwrap() with if let Some pattern

These changes address clippy::unnecessary_unwrap and clippy::err_expect
warnings in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:39 +01:00
stevenhorsman
56d44062ea libs: Fix unstable_name_collisions warnings
Remove NixPath's is_empty() to avoid ambiguity with the future
std::path::Path::is_empty() method and switch to
path.as_os_str().is_empty as recommended by @burgerdev.

This addresses unstable_name_collisions warnings in Rust 1.93.

Fixes: #12835

Co-authored-by: Markus Rudy <mr@edgeless.systems>
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:38 +01:00
stevenhorsman
2413ef55dd agent: Remove unnecessary unwrap
Replace is_some() check followed by unwrap() with if let pattern
to address clippy::unnecessary_unwrap warning in Rust 1.93.

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:38 +01:00
dependabot[bot]
9a88f4f8cf build(deps): bump rand from 0.8.5 to 0.8.6 in /src/tools/trace-forwarder
Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/0.8.6/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.8.5...0.8.6)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.8.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-25 10:27:32 +00:00
Pavel Mores
d3f56cd3a6 runtime-rs: remove process selinux label on exec if disable_guest_selinux
Without this commit any attempt to exec a command in a container will fail
if SELinux is disabled in the guest but an SELinux label is given for
the new process.  That will happen pretty much any time SELinux is enabled
on the host (and the container is not privileged).

Signed-off-by: Pavel Mores <pmores@redhat.com>
2026-04-25 11:27:15 +01:00
Pavel Mores
1390ad650b runtime-rs: factor getting disable_guest_linux value out to own function
We'll need to get the `disable_guest_linux` value in the exec handler, too.
This will allow us to avoid duplicating the get.

Signed-off-by: Pavel Mores <pmores@redhat.com>
2026-04-25 11:27:15 +01:00
stevenhorsman
d6df75853b versions: Update rustls-webpki to 0.103.13
Simple bump to fix CVE GHSA-82j2-j2ch-gfr8:
Denial of service via panic on malformed CRL BIT STRING

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-04-25 11:27:02 +01:00
Fabiano Fidêncio
966e9b7f80 agent: skip non-PCI addresses in PCIDEVICE env vars
Device plugins may set PCIDEVICE_* environment variables with
non-PCI identifiers (e.g. "mlx5_core.sf.10" for mlx5 Scalable
Functions). The update_env_pci() function assumed all values were
PCI BDF addresses and failed to parse them, causing container
creation to fail with:

  "PCI address mlx5_core.sf.10 should have the format DDDD:BB:SS.F"

Skip PCIDEVICE_* entries whose values don't parse as PCI addresses,
leaving them untouched for the workload. The corresponding _INFO
variable is also left as-is since no mapping is collected.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-04-25 12:26:20 +02:00
Fabiano Fidêncio
8c3a0e692b runtime-rs: network: handle "device" type interfaces (mlx5 SFs)
Same fix as the Go runtime: interfaces whose drivers do not register
a specific netlink kind (e.g. mlx5 Scalable Functions) are reported
with the generic type "device", which is not handled by the endpoint
creation match, causing sandbox creation to fail with:

  "unsupported link type: device"

Add "device" as an alternative pattern alongside "veth" so these
interfaces are connected through a TAP + TC-filter bridge.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-04-25 12:26:20 +02:00
Fabiano Fidêncio
6436922f5b runtime: network: handle "device" type interfaces (mlx5 SFs)
Interfaces whose drivers do not register a specific netlink kind
(e.g. mlx5 Scalable Functions) are reported with the generic type
"device". The endpoint creation code did not handle this type,
causing sandbox creation to fail with:

  "Unsupported network interface: device"

This is particularly visible on arm64 with Mellanox ConnectX NICs
using Scalable Functions, where the ethtool BusInfo returns a
non-PCI identifier (e.g. "mlx5_core.sf.4") so isPhysicalIface()
cannot classify the interface as physical either.

Handle "device" type interfaces the same way as veth endpoints,
connecting them through a TAP + TC-filter bridge.

Additionally, relax getLinkForEndpoint() for VethEndpoint so it
accepts the concrete link type returned by the kernel instead of
asserting *netlink.Veth. A "device" type interface wrapped in a
VethEndpoint returns *netlink.Device from LinkByName(), which
would fail the strict type assertion. All callers only need
link.Attrs(), so accepting any link type is safe.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-04-25 12:26:20 +02:00