Skip to content

README: add updated readme#94

Merged
zvonkok merged 2 commits intoNVIDIA:mainfrom
zvonkok:cpu-mode
Jan 10, 2026
Merged

README: add updated readme#94
zvonkok merged 2 commits intoNVIDIA:mainfrom
zvonkok:cpu-mode

Conversation

@zvonkok
Copy link
Copy Markdown
Collaborator

@zvonkok zvonkok commented Jan 10, 2026

Add SAFETY comments on unsafe code and delete uneeded file.

Copilot AI review requested due to automatic review settings January 10, 2026 22:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves code quality and adds comprehensive documentation. It removes an unused test script, extracts magic numbers to named constants for better maintainability, adds SAFETY comments for unsafe fork() calls, and introduces a detailed README documenting the NVRC init system.

Changes:

  • Deleted unused PCI IDs download script
  • Extracted magic numbers (16777216, -997) to well-documented constants in kmsg.rs and kata_agent.rs
  • Added comprehensive SAFETY comments explaining why fork() is safe in all usage contexts
  • Added extensive README.md with architecture, configuration, build instructions, and troubleshooting guidance

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/download_and_test_pci_ids.sh Removed unused test script for downloading and filtering PCI device IDs
src/kmsg.rs Extracted socket buffer size constant and updated test assertions
src/kernel_params.rs Removed outdated comment about driver reload requirement
src/kata_agent.rs Added SAFETY comments for fork() calls and extracted OOM score constant
README.md Added comprehensive documentation covering design, architecture, configuration, and usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zvonkok zvonkok added the ok-to-test Ok to test label Jan 10, 2026
Copilot AI review requested due to automatic review settings January 10, 2026 22:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

tests/install_rust.sh:1

  • This file is still referenced in .github/workflows/ci.yaml at line 34. Deleting it will break the CI workflow. Either keep this file or update the CI workflow to use an alternative Rust installation method before deleting this script.
    tests/install_rust.sh:1
  • The pipeline curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "${VERSION}" downloads and executes third-party code without integrity verification or version pinning, which creates a supply-chain risk for any environment running this script. An attacker who can compromise or intercept responses from sh.rustup.rs could execute arbitrary code with the script’s privileges and potentially tamper with build artifacts or access secrets. Use a pinned installer or package source with checksum/signature verification instead of executing a remote install script directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
Fix magic numbers which are now documented as well

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
@zvonkok zvonkok merged commit a4f7200 into NVIDIA:main Jan 10, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Ok to test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants