Files
nvdriver/reports/uvm-slice1-validation.json
nvidia-driver-rs 4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00

128 lines
8.9 KiB
JSON

{
"scope": "UVM slice 1 (2026-11-19): study of what the first workload needs of UVM, the RM side of the UVM interface for session and GPU information, and the GPU-independent CPU half of a minimal UVM ioctl layer. No kernel file was added or changed; nothing of this slice is reachable from the module. No hardware was touched and the loaded original driver was not traced.",
"original_artifact_sha256": "5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b",
"dossier": [
"analysis/closed-driver-580/uvm.md",
"analysis/closed-driver-580/uvm.json"
],
"evidence_classes": {
"E": "original instructions executed under Unicorn (tools/check_uvm_gpu_ops_binary.py)",
"A": "thunk targets from relocated instructions; link-scan instructions of _nv046818rm and _nv029342rm read with objdump; REA Ghidra cross-checks of three thunks",
"D": "REA pseudocode of _nv046789rm; on-disk Ghidra export for _nv046788rm, _nv046793rm, _nv046818rm and helpers",
"S": "public nvidia-uvm source of 580.178.04; the proprietary package's copy differs in 12 files (uvm.md section 1); UVM-side call paths beyond the ioctl handlers and the nv_gpu_ops.c survey were read by delegated studies and are marked as such in the dossier",
"O": "captures of the original driver: reports/native-hello-original-580/rea-ioctl-phases-v2.json (order, no UVM payloads) and analysis-580.178.04/reports/cuda-compute-exact-allocation-ioctl-payloads.jsonl (payloads, eight GPUs)"
},
"implemented": {
"src/nvidia/src/uvm/gpu_ops.rs": "create_session, destroy_session, get_gpu_info with find_device_classes, class_kind, nvlink_version_to_link, pcie_link_rate_mbps and the three NVLINK status scans; ENTRY_POINTS (73 thunk targets with the engine state each inner function needs); refuse()",
"src/nvidia/src/uvm/ioctl.rs": "routing table of the 45 UVM ioctls with block sizes and rmStatus offsets; attribute layout",
"src/nvidia/src/uvm/va_space.rs": "file states, UVM_INITIALIZE, UVM_MM_INITIALIZE, dispatch, mmap, VMA close, release; VA space with range tree, external mappings, range groups, GPU / GPU VA space / channel registration, semaphore pool, reflected ranges; Backend trait (20 operations) for everything that needs RM or a GPU",
"kernel": "none"
},
"oracles": {
"gpu_ops": {
"tool": "tools/check_uvm_gpu_ops_binary.py",
"record": "target/uvm/original-gpu-ops.txt",
"record_sha256": "7ca4e444eaf774c0e830050587cb7ca2577f71c06edb2cdd81cac59dbf84a314",
"thunks": 73,
"class_ids_executed": 280,
"classes_classified": 36,
"cases": 421,
"session_cases": 6,
"deep_session_case": 1,
"gpu_info_cases": 414,
"rm_api_calls": 8894,
"regenerates_identically": true,
"rust_test": "uvm::gpu_ops_tests::original_gpu_ops_record_is_reproduced (ignored; NV_RS_UVM_GPU_OPS_ORACLE): every RM API request in order with parameter bytes, status and all 240 output bytes; no mask; passed",
"mutation_check": "three seeded changes in gpu_ops.rs (first-link rule of the link scan, key-rotation mask, direct-connect default) each made the test fail; source restored",
"fixture_supplied": [
"rmapiGetInterface (_nv054239rm) returns a recording table: Alloc +0x00, Free +0x18, Control +0x38, Share +0x60",
"gpumgrGetGpuFromUuid (_nv031406rm) and nv_is_gpu_accessible answer from the case",
"GPU object as fixture memory with the fields listed in uvm.md 2.2",
"open-layer symbols and locks as in tools/check_rmapi_binary.py (imported unmodified)"
],
"not_compared": [
"assertion records of the original (asserts lines)",
"deep session lines (original resource server below the RM API; no Rust counterpart wired)",
"MIG branch (not generated; Rust refuses it)",
"heap allocation failures inside the original"
]
},
"ioctl_layout": {
"tool": "tools/check_uvm_ioctl_layout.py",
"record": "target/uvm/ioctl-layout.txt",
"record_sha256": "a0e508f4a338537258b03a355fa0444e10ae4e21d5e344053f097f06e4ed24aa",
"source_trees_agree": [
"reference open tree",
"/usr/src/nvidia-srv-580.178.04"
],
"ioctls": 45,
"fields": 64,
"rust_test": "uvm::va_space_tests::ioctl_layout_matches_the_public_headers (ignored; NV_RS_UVM_IOCTL_LAYOUT); passed",
"class": "S, not an oracle of the loaded module"
},
"capture_replay": {
"capture": "/home/geodd/nvidia-driver/analysis-580.178.04/reports/cuda-compute-exact-allocation-ioctl-payloads.jsonl",
"capture_sha256": "798d87d83492bf5ade8c5ec70c949be5965ac7b2fe941f0ea77e6779971c0442",
"uvm_ioctls": 192,
"replies_identical": 192,
"masked_bytes": 0,
"rust_test": "uvm::va_space_tests::captured_uvm_requests_are_answered_as_by_the_original (ignored; NV_RS_UVM_CAPTURE); passed",
"conditions": [
"Environment::PROPRIETARY_BUILD (no MMU notifiers, 48-bit CPU VA)",
"a backend that accepts every request, reports Volta properties and no channel context buffers",
"the pool mmap and its removal are replayed from the strace order of the native-hello run, not from this capture"
],
"limit": "shows that the reply bytes do not depend on GPU work; it does not test any GPU-facing behaviour"
}
},
"unit_tests": {
"count": 15,
"class": "S: transcribed from the public source, each naming the function it follows",
"ignored_tests": 3,
"all_uvm_tests_passed": 18
},
"validation": {
"date": "2026-11-19",
"rustfmt": "rustfmt --edition 2021 --check on src/nvidia/src/uvm/*.rs: clean",
"clippy": "cargo clippy --workspace --all-targets -- -D warnings: clean",
"cargo_test_workspace": "700 passed, 0 failed, 116 ignored",
"uvm_tests_with_ignored": "18 passed, 0 failed",
"harness_check_mode": "both tools rerun with --check: identical records",
"validate_all_sh": "not run: no kernel file was touched"
},
"declared_deviations": [
"channel buffers of equal alignment are ordered by a stable insertion sort; the module uses the kernel's sort() whose tie order was not reproduced",
"requests overlapping part of an existing external mapping are refused (uvm_ext_gpu_map_split not implemented)",
"registering a GPU VA space while a managed (mmap) range exists is refused",
"no concurrency model; the adapter must serialize requests per file",
"table-full conditions answer NV_ERR_NO_MEMORY",
"GPU-mix, ATS, integrated-GPU, access-counter and disallow_new_registers checks of uvm_va_space_register_gpu are not modelled"
],
"not_done": [
"no backend for va_space::Backend: no page-table writes, no RM calls, no semaphore pool memory",
"no kernel node for /dev/nvidia-uvm",
"rm_gpu_ops beyond create_session, destroy_session and get_gpu_info: refused with the needed engine state; device_create, address-space, memory, channel and PTE entry points were studied from the public source only (delegated), with constant-level checks of the closed pseudocode for dup_address_space, set_page_directory and the PTE builder",
"the native-hello capture has no UVM payloads, so the replay uses the eight-GPU capture of the same libcuda context creation"
],
"findings_that_correct_the_public_source": [
"calculatePCIELinkRateMBps (_nv018690rm) has no division by two in the closed object: PCIe 3.0 x16 gives 15753",
"the SEC2 class predicate of findDeviceClasses (_nv028356rm) also accepts 0x95a1",
"struct gpuAddressSpace is 0x90 bytes in the closed object (0x68 in the source) [decompiler level, delegated]"
],
"experiments_for_the_main_session": [
"trace the 73 rm_gpu_ops_* symbols of the loaded original during a baseline native-hello run (kprobes/ftrace): needs the user's approval; not run",
"REA: handler of control 0x801813 for an externally owned VA space; PROMOTE_CTX 0x2080012b, EVICT_CTX 0x2080012c and the internal stop-channel control; handler of 0x20801219 for the context buffer list behind the 0xea7000 window"
],
"tested_sources_sha256": {
"src/nvidia/src/uvm/gpu_ops.rs": "96c44ad67f3b9e6c90527e762e76d40be59743d4f0ffbc3ce6c4874c753323ee",
"src/nvidia/src/uvm/gpu_ops_tests.rs": "225232edd057a18e5ab18735dbdba89f8f6d0a5cf688232121ed30b31c93ef01",
"src/nvidia/src/uvm/ioctl.rs": "2e7b4b33b8ab38f29e4c9e0a7e29c1fd455e0a3ad2dc8d74d3cdb2b88ba4f5d9",
"src/nvidia/src/uvm/mod.rs": "f18681617452373ee66904c4052180cf511c541a7c96021a9268c6cadfb9c488",
"src/nvidia/src/uvm/status.rs": "580620919b83de08c2e132441fcae0fcb50bbc1b1f445d3e3f3fff99d05af0b7",
"src/nvidia/src/uvm/va_space.rs": "b5d7bf32fad4470d5dc5416d4095467f60b8b2b4b443ed942b0dcca7cbb13d62",
"src/nvidia/src/uvm/va_space_tests.rs": "560789dee30b7370d76abea9abe3610deaee811568a34004f37b145cd56a1b5f",
"tools/check_uvm_gpu_ops_binary.py": "9005ed59c492240d16d0cba67060f47a70b83e3d5d7592f87e55268dcc6820bc",
"tools/check_uvm_ioctl_layout.py": "6489753e9b4ece740481bdf3e94284e54dd0573a4ff964ad3722e52a664b1327"
},
"note_for_other_owners": "src/nvidia/src/rmapi/status.rs names 0x17 ILLEGAL_ACTION; nvstatuscodes.h of this version has NV_ERR_ILLEGAL_ACTION = 0x16 and NV_ERR_IN_USE = 0x17. Not changed (file owned by the rmapi work); the value may be right and the name wrong."
}