From 3de983489eb858adbcd9963f9737f93c9864ef55 Mon Sep 17 00:00:00 2001 From: Tobin Feldman-Fitzthum Date: Fri, 9 Oct 2026 14:41:16 -0700 Subject: [PATCH 1/2] nvidia: bump libnvat and nvidia-attestation-sdk Pickup the newest release of nvidia-attestation-sdk and bump the libnvat and libnvat-dev packages to 2.0.0. Signed-off-by: Tobin Feldman-Fitzthum --- .github/actions/install-nvat-sdk/action.yml | 2 +- Cargo.lock | 12 ++++++------ attestation-agent/attester/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/install-nvat-sdk/action.yml b/.github/actions/install-nvat-sdk/action.yml index c8f35573b..c30b57990 100644 --- a/.github/actions/install-nvat-sdk/action.yml +++ b/.github/actions/install-nvat-sdk/action.yml @@ -9,7 +9,7 @@ inputs: attestation-agent/attester/Cargo.toml (see that crate's GitHub release notes for its corresponding libnvat/libnvat-dev version). required: false - default: "1.2.2" + default: "2.0.0" cuda-keyring-version: description: cuda-keyring package version used to register NVIDIA's apt repository required: false diff --git a/Cargo.lock b/Cargo.lock index 002794374..92488a021 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1029,7 +1029,7 @@ dependencies = [ "bitflags 2.13.1", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools 0.10.5", "log", "prettyplease", "proc-macro2", @@ -1049,7 +1049,7 @@ dependencies = [ "bitflags 2.13.1", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools 0.10.5", "log", "prettyplease", "proc-macro2", @@ -4971,16 +4971,16 @@ dependencies = [ [[package]] name = "nv-attestation-sdk" -version = "1.2.2" -source = "git+https://github.com/NVIDIA/attestation-sdk?tag=2026.06.09#9d12801cea8a198ea0f29640dfaf8a4017c841c5" +version = "2.0.0" +source = "git+https://github.com/NVIDIA/attestation-sdk?tag=2026.10.02#11b2bfeb42a1158aa08744603ecb239ccb3d2265" dependencies = [ "nv-attestation-sdk-sys", ] [[package]] name = "nv-attestation-sdk-sys" -version = "1.2.2" -source = "git+https://github.com/NVIDIA/attestation-sdk?tag=2026.06.09#9d12801cea8a198ea0f29640dfaf8a4017c841c5" +version = "2.0.0" +source = "git+https://github.com/NVIDIA/attestation-sdk?tag=2026.10.02#11b2bfeb42a1158aa08744603ecb239ccb3d2265" dependencies = [ "bindgen 0.72.1", ] diff --git a/attestation-agent/attester/Cargo.toml b/attestation-agent/attester/Cargo.toml index e036a5284..813b5f859 100644 --- a/attestation-agent/attester/Cargo.toml +++ b/attestation-agent/attester/Cargo.toml @@ -66,7 +66,7 @@ rstest.workspace = true # When bumping this tag, check the crate's release notes on GitHub for its # corresponding libnvat/libnvat-dev version, and update the `version` input # default in .github/actions/install-nvat-sdk/action.yml to match. -nv-attestation-sdk = { git = "https://github.com/NVIDIA/attestation-sdk", tag = "2026.06.09", optional = true } +nv-attestation-sdk = { git = "https://github.com/NVIDIA/attestation-sdk", tag = "2026.10.02", optional = true } [[bin]] name = "evidence_getter" From 54d8c29a77c82cee0f72f06b32909ed936390522 Mon Sep 17 00:00:00 2001 From: Tobin Feldman-Fitzthum Date: Fri, 9 Oct 2026 14:43:19 -0700 Subject: [PATCH 2/2] nvidia: don't build libnvat from source for extension images The new libnvat package works on 26.04, so no need to build from source anymore. Assisted-by: Cursor Signed-off-by: Tobin Feldman-Fitzthum --- .github/workflows/coco-extension-image.yml | 15 ++------- tools/coco-extension/Dockerfile.builder | 36 +++++++++------------- tools/coco-extension/assemble-rootfs.sh | 16 ++++------ 3 files changed, 24 insertions(+), 43 deletions(-) diff --git a/.github/workflows/coco-extension-image.yml b/.github/workflows/coco-extension-image.yml index 028d47b6a..23d0e01ee 100644 --- a/.github/workflows/coco-extension-image.yml +++ b/.github/workflows/coco-extension-image.yml @@ -54,9 +54,8 @@ env: PAUSE_IMAGE_REPO: docker://registry.k8s.io/pause PAUSE_IMAGE_VERSION: "3.10" UMOCI_VERSION: v0.6.0 - # The C++ SDK is linked by the Rust bindings, so the two have to be the same - # release; the crate pin below is the single source of truth for both. - NVAT_CARGO_MANIFEST: attestation-agent/attester/Cargo.toml + # Keep in sync with the version specified in install-nvat-sdk/action.yml. + NVAT_VERSION: "2.0.0" jobs: build: @@ -145,15 +144,7 @@ jobs: # The NVIDIA SDK is only consumed by the x86_64 attestation-agent-nv # variant; an empty version skips it entirely. nvat_version="" - if [ "${ARCH}" = "x86_64" ]; then - nvat_version="$(sed -n \ - 's/^nv-attestation-sdk[[:space:]]*=.*tag[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' \ - "${NVAT_CARGO_MANIFEST}")" - [ -n "${nvat_version}" ] || { - echo "failed to read the nv-attestation-sdk tag from ${NVAT_CARGO_MANIFEST}" >&2 - exit 1 - } - fi + [ "${ARCH}" = "x86_64" ] && nvat_version="${NVAT_VERSION}" # Building the environment (notably the NVIDIA SDK) costs more than # building the payload itself, so reuse a published one whenever the diff --git a/tools/coco-extension/Dockerfile.builder b/tools/coco-extension/Dockerfile.builder index 027dfbd12..5ca0c3bb1 100644 --- a/tools/coco-extension/Dockerfile.builder +++ b/tools/coco-extension/Dockerfile.builder @@ -13,9 +13,11 @@ ARG UBUNTU_VERSION=26.04 FROM ubuntu:${UBUNTU_VERSION} +ARG UBUNTU_VERSION ARG RUST_TOOLCHAIN ARG UMOCI_VERSION=v0.6.0 ARG TARGETARCH +ARG CUDA_KEYRING_VERSION=1.1-1 ENV DEBIAN_FRONTEND=noninteractive ENV RUSTUP_HOME=/opt/rustup @@ -32,7 +34,6 @@ RUN apt-get update && \ binutils \ ca-certificates \ clang \ - cmake \ cryptsetup-bin \ curl \ g++ \ @@ -56,30 +57,23 @@ RUN apt-get update && \ "https://github.com/opencontainers/umoci/releases/download/${UMOCI_VERSION}/umoci.linux.${TARGETARCH}" && \ chmod +x /usr/local/bin/umoci -# nv-attestation-sdk-sys looks for the C header at /usr/include/nvat.h, but -# cmake installs it under /usr/local/include, hence the symlink below. +# NVAT_VERSION: libnvat/libnvat-dev version; keep in sync with install-nvat-sdk/action.yml. ARG NVAT_VERSION RUN if [ "$(uname -m)" = "x86_64" ] && [ -n "${NVAT_VERSION}" ]; then \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - build-essential \ - libcurl4-openssl-dev \ - libxml2-dev \ - libxmlsec1-dev \ - zlib1g-dev && \ + case "${UBUNTU_VERSION}" in \ + 24.04) nv_repo=ubuntu2404 ;; \ + 26.04) nv_repo=ubuntu2604 ;; \ + *) echo "no NVIDIA apt repository known for Ubuntu ${UBUNTU_VERSION}" >&2; exit 1 ;; \ + esac && \ tmpdir="$(mktemp -d)" && \ - git clone https://github.com/NVIDIA/attestation-sdk "${tmpdir}/attestation-sdk" && \ - git -C "${tmpdir}/attestation-sdk" fetch --depth=1 origin "${NVAT_VERSION}" && \ - git -C "${tmpdir}/attestation-sdk" checkout FETCH_HEAD && \ - cmake -S "${tmpdir}/attestation-sdk/nv-attestation-sdk-cpp" \ - -B "${tmpdir}/attestation-sdk/nv-attestation-sdk-cpp/build" \ - -DCMAKE_BUILD_TYPE=Release && \ - cmake --build "${tmpdir}/attestation-sdk/nv-attestation-sdk-cpp/build" --parallel "$(nproc)" && \ - cmake --install "${tmpdir}/attestation-sdk/nv-attestation-sdk-cpp/build" && \ - mkdir -p /usr/include && \ - ln -sf /usr/local/include/nvat.h /usr/include/nvat.h && \ - ldconfig && \ + curl -fsSL -o "${tmpdir}/cuda-keyring.deb" \ + "https://developer.download.nvidia.com/compute/cuda/repos/${nv_repo}/x86_64/cuda-keyring_${CUDA_KEYRING_VERSION}_all.deb" && \ + dpkg -i "${tmpdir}/cuda-keyring.deb" && \ rm -rf "${tmpdir}" && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + "libnvat=${NVAT_VERSION}*" \ + "libnvat-dev=${NVAT_VERSION}*" && \ apt-get clean && rm -rf /var/lib/apt/lists/*; \ fi diff --git a/tools/coco-extension/assemble-rootfs.sh b/tools/coco-extension/assemble-rootfs.sh index 205d20bb5..f80654290 100755 --- a/tools/coco-extension/assemble-rootfs.sh +++ b/tools/coco-extension/assemble-rootfs.sh @@ -50,7 +50,7 @@ NV_ATTESTER="${NV_ATTESTER:-${ATTESTER},nvidia-attester}" # Optional: set ENABLE_KBS=false to build without cc_kbc. Default is enabled. INCLUDE_NVIDIA_ATTESTER="${INCLUDE_NVIDIA_ATTESTER:-auto}" INCLUDE_CRYPTSETUP="${INCLUDE_CRYPTSETUP:-yes}" -NVAT_LIB_DIR="${NVAT_LIB_DIR:-/usr/local/lib}" +NVAT_LIB_DIR="${NVAT_LIB_DIR:-/usr/lib/x86_64-linux-gnu}" # TEE_PLATFORM is intentionally left empty so the top-level Makefile does not # override the ATTESTER value passed in the environment. This mirrors kata's @@ -137,8 +137,9 @@ build_nvidia_attestation_agent() { *) die "unsupported INCLUDE_NVIDIA_ATTESTER=${INCLUDE_NVIDIA_ATTESTER}" ;; esac - [[ -e "${NVAT_LIB_DIR}/libnvat.so" || -e "${NVAT_LIB_DIR}/libnvat.so.1" ]] || \ - die "NVIDIA SDK libnvat.so not found in ${NVAT_LIB_DIR}" + local libnvat + libnvat="$(find "${NVAT_LIB_DIR}" -maxdepth 1 -name 'libnvat.so*' | sort | head -n 1)" + [[ -n "${libnvat}" ]] || die "NVIDIA SDK libnvat.so not found in ${NVAT_LIB_DIR}" info "Building NVIDIA attester variant (ATTESTER=${NV_ATTESTER} LIBC=${LIBC})" rm -f "${build_dir}/attestation-agent" @@ -148,8 +149,7 @@ build_nvidia_attestation_agent() { ttrpc=true \ ARCH="${ARCH}" \ LIBC="${LIBC}" \ - ATTESTER="${NV_ATTESTER}" \ - RUSTFLAGS_ARGS="-L ${NVAT_LIB_DIR}" + ATTESTER="${NV_ATTESTER}" strip "${build_dir}/attestation-agent" install -D -m0755 \ @@ -160,11 +160,7 @@ build_nvidia_attestation_agent() { mkdir -p "${ROOTFS_DIR}/usr/local/lib" cp -a "${NVAT_LIB_DIR}"/libnvat.so* "${ROOTFS_DIR}/usr/local/lib/" - local libnvat - libnvat="$(find "${NVAT_LIB_DIR}" -maxdepth 1 -name 'libnvat.so*' | sort | head -n 1)" - if [[ -n "${libnvat}" ]]; then - copy_non_glibc_library_closure "${libnvat}" - fi + copy_non_glibc_library_closure "${libnvat}" } install_cryptsetup() {