Skip to content

fix(vm): record kernel provenance in runtime tarballs - #4650

Merged
TaylorMutch merged 1 commit into
NVIDIA:mainfrom
ericcurtin:fix/3095-vm-kernel-provenance/ericcurtin
Nov 10, 2026
Merged

TaylorMutch merged 1 commit into
NVIDIA:mainfrom
ericcurtin:fix/3095-vm-kernel-provenance/ericcurtin

Conversation

@ericcurtin

Copy link
Copy Markdown
Contributor

Summary

The runtime tarball provenance lacked the kernel config hash, and the macOS tarball reported unknown for libkrunfw commit and kernel version. The Landlock kernel config already landed in #2942.

Related Issue

Closes #3095

Changes

  • build-libkrun.sh writes provenance.json with libkrunfw commit, kernel version and final .config SHA-256.
  • package-vm-runtime.sh reads it (one helper replaces the Linux-only fallback) and adds kernel_config_sha256.
  • The workflow passes it to the macOS job with kernel.c.

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Ran shellcheck, bash -n, markdownlint, and the packaging script on fake Linux, macOS and missing-provenance inputs. The workflow is workflow_dispatch only, so it is not exercised here. The published rolling runtime kernel already contains Landlock.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Record the kernel config hash, and pass libkrunfw commit and kernel version to the macOS runtime.

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@mrunalp @sjenning PTAL, and /ok to test 16609599121d00408aab95668a46b6d072f6803e if it looks good. Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@TaylorMutch @SDAChess PTAL, and /ok to test 16609599121d if it looks good. Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@TaylorMutch @SDAChess PTAL, and /ok to test 16609599121d00408aab95668a46b6d072f6803e if it looks good (full SHA, short ones fail). Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@alangou @johntmyers PTAL when you get a chance, and /ok to test 16609599121d00408aab95668a46b6d072f6803e if it looks good. Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@sjenning @derekwaynecarr PTAL when you get a chance, and /ok to test 16609599121d00408aab95668a46b6d072f6803e if it looks good. Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@mrunalp @matthewgrossman PTAL when you get a chance, and /ok to test 16609599121d00408aab95668a46b6d072f6803e if it looks good. Thank you!

@TaylorMutch

Copy link
Copy Markdown
Collaborator

/ok to test 1660959

@TaylorMutch TaylorMutch left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated commit 16609599121d00408aab95668a46b6d072f6803e with a real Linux ARM64 → macOS ARM64 build and runtime smoke test.

  • Built the pinned libkrunfw kernel and libkrun on a fresh Ubuntu 24.04 ARM64 GCP VM using this revision's build-libkrun.sh.
  • Confirmed the final kernel config enables CONFIG_SECURITY=y, CONFIG_SECURITY_LANDLOCK=y, and landlock in CONFIG_LSM. Independently hashed the final .config and verified the producer's metadata and packaged Linux metadata against it.
  • Transferred the actual kernel.c, ABI_VERSION, and provenance.json to an Apple Silicon Mac. Built the native dylibs with this revision's unchanged build-libkrun-macos.sh, then packaged them with CUSTOM_PROVENANCE_DIR pointing to the transferred metadata, matching the workflow's handoff.
  • Verified the Linux and macOS tarballs both contain these same correct values:
libkrunfw_commit:     f14ac64ca8a04c6c9d76cac1c61ee050809c88c9
kernel_version:      linux-6.12.109
kernel_config_sha256: 7622bbd5777c3253b5e4ab263d861a4890301935a7e5444696d1d3a02c4f6baf

Booted the newly built macOS runtime using the published v0.1.4 gateway/VM driver with the new runtime libraries explicitly selected:

  • Guest: Linux 6.12.109 aarch64; direct Landlock version query returned ABI 6, errno 0.
  • Sandbox reached Ready with landlock.compatibility: hard_requirement and existing policy paths.
  • As sandbox UID 1000, read/write under declared /tmp succeeded. Writing to undeclared, world-writable /var/tmp failed with EACCES.

This supplies the targeted provenance and macOS runtime evidence for #3095. The artifact transfer was performed manually; this did not dispatch or publish through the release workflow. Native build helpers used an explicit Xcode libclang search path.

Required PR checks passed for this head. The general E2E and GPU suites were not opted in; the real-build and runtime checks above were run separately. Approved.

@TaylorMutch
TaylorMutch added this pull request to the merge queue Nov 10, 2026
Merged via the queue into NVIDIA:main with commit 569f03a Nov 10, 2026
81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(vm-driver): packaged macOS ARM64 runtime lacks usable Landlock ABI

2 participants