fix(gpu): derive CUDA-required Jetson sysfs policy

未关闭
#3,348 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
docker, rust

调研方向

从现有的 CDI 派生硬件策略以及 #1606 中的拒绝行为开始,然后审查 #2846 和 #8910 中的证据。定义最小的 Jetson OpenRM sysfs 契约,为已批准、不安全、缺失和非 GPU 情况添加无需硬件的测试,并在 AGX Thor 和 IGX Orin 上验证所需的 CUDA、onboarding 和生命周期行为。

由索引模型根据 Issue 内容生成。

描述

state:triage-needed

Problem

Native Docker CDI can inject the Jetson GPU devices, libraries, and supplemental groups correctly, but the OpenShell supervisor's inner Landlock policy still prevents non-root CUDA initialization on NVIDIA Jetson AGX Thor.

This was isolated while validating the CDI stack in #1606 through #2775, #2776, #2265, and #2846 for NVIDIA/NemoClaw#7610 / NVIDIA/NemoClaw#8910:

host                                      cuInit(0)=0
plain Docker CDI                          cuInit(0)=0
same container and non-root UID/GIDs      cuInit(0)=0
OpenShell native CDI without sysfs access cuInit(0)=801
OpenShell native CDI with read-only /sys  cuInit(0)=0

The successful run used a qualification-only broad read-only /sys grant. That proves the missing boundary but is not an acceptable production fix. OpenShell remains the owner of CDI-derived hardware policy; downstream consumers must not guess or trust arbitrary additive paths.

Expected behavior

For a supported Jetson CDI device, OpenShell derives or supplies the minimum CUDA-required read-only sysfs contract and the non-root sandbox user can initialize CUDA. Non-GPU sandboxes receive no additional sysfs access. Missing, malformed, or unsafe hardware requirements fail closed with an actionable diagnostic.

Acceptance

  • Identify and document the minimum sysfs paths required by Jetson OpenRM; do not grant broad /sys by default.
  • Represent the requirement through a stable OpenShell-owned CDI/policy contract rather than a downstream static allowlist.
  • Preserve the current rejection of unsafe broad CDI-derived paths from #1606.
  • Add hardware-free policy tests for the derived/approved paths, unsafe paths, missing metadata, and the non-GPU negative case.
  • On exact released commits, complete full onboarding with exit 0 and prove non-root nvidia-smi, /proc/<pid>/task/<tid>/comm write, and cuInit(0)=0 on both AGX Thor and IGX Orin.
  • Prove CUDA remains usable after supported restart, resume, and rebuild lifecycles.

Current evidence

  • NVIDIA/OpenShell#2846#issuecomment-5684128551 records the AGX Thor A/B result and the qualification-only workaround.
  • NVIDIA/NemoClaw#8910#issuecomment-5684731268 records the accepted downstream ownership, compatibility, security, and validation decision.
主要语言
Rust
星标
8.7k
派生
1.3k
平均合并
2 天 7 小时
30 天内合并 PR
243

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。