Files
nvdriver/reports/gpu-acr-load-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

135 lines
16 KiB
JSON

{
"scope": "GV100 (Tesla V100) OBJACR InitLocked (_nv016955rm) and OBJACR Load (_nv016956rm): region allocations, write of the composed region image, CPU-branch copy to the shadow, preparation and upload of the HS ACR image, its run on SEC2 and the checks after it. Core modules gpu::acr_load (service level) and gpu::acr_load_bar2 (the memory and address-space services on BAR0/BAR2). Not wired into the kernel module; no hardware was touched.",
"original_artifact_sha256": "5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b",
"firmware_container": {
"file": "target/firmware/nvidia-rs/580.178.04/gv100.fw",
"records": 80,
"sha256": "949c532bc7579b7c1b2c57741f34019fea48967b4456f2a3a6aae0b6b5dd741a",
"note": "Images are used unmodified; the only edits to the HS image are the ones the original makes (signature words at the record's patch location, the region descriptor in the data section)."
},
"evidence_classes": "A = instructions read (objdump of the symbol or REA Ghidra procedure_assembly), D = decompiler pseudocode only, S = public source of the matching release, T = physical transcript, E = original instructions executed by the harness, I = inference.",
"declared_deviation": "The traced driver copies the region to its shadow with a copy-engine channel (transcript lines 140621-141012 with the early FIFO load). _nv016753rm takes its CPU-mapping branch when OBJACR+385 is clear; the constructor _nv016731rm stores bit 0 of the registry value RMAcrUseCeForShadowCopy there [A: movzbl 0x385 and cmpw 0x4de4 in _nv016753rm; D: the constructor]. Only the CPU branch is implemented and executed; every oracle case has OBJACR+385 = 0. Its BAR0 and BAR2 accesses have no counterpart in the transcript and are checked for shape only.",
"evidence": [
{
"evidence_category": "instruction emulation",
"harness": "tools/check_gpu_acr_load_binary.py",
"what_ran": "The whole original object, relocated; the object environment of tools/check_gpu_wpr_blob_binary.py (its setup part is executed unchanged) plus OBJMC (binder _nv006001rm) and MemorySystem (binder _nv005936rm). InitLocked: OBJLSFM InitLocked or direct registrations through _nv016949rm, then _nv016955rm. Load: _nv016956rm from the state after OBJLSFM Load, including the image writer _nv043215rm, the HS runner _nv016741rm, the Falcon launch _nv028470rm, _nv016974rm and _nv016973rm.",
"original_functions_executed_on_the_traced_case": 191,
"cases": 573,
"cases_by_kind": {
"InitLocked (I)": 224,
"HS run _nv016741rm (H)": 248,
"region check _nv016974rm (C)": 35,
"check after the run _nv016973rm (R)": 50,
"Load _nv016956rm (L)": 16
},
"oracle": "target/gpu-stage/original-acr-load.txt",
"oracle_sha256": "cff0fd5f597ba1254b23e51961cbe9c76afa4587c726c159fb84eaf2b31c6ad6",
"oracle_regenerates_identically": true,
"original_hs_image": {
"file": "target/gpu-stage/original-acr-hs-image-gv100.bin",
"bytes": 18176,
"sha256": "146bed511dc69e396083bfd3331f34f1083e65e6337f9ec167f6966f3c3493fb",
"what": "The bytes the original copied into the image allocation for the traced register values: container record tag 0x26 of bundle 0x11430c8 with the tag 0x3d signature at 0x3e20 and the region descriptor at 0x3100."
},
"comparison_test": "gpu::acr_load::tests::compare_original_acr_load (ignored; NV_RS_ACR_LOAD_ORACLE, NV_RS_ACR_HS_IMAGE, NV_RS_GV100_FIRMWARE)",
"comparison_result": "573 of 573 rows: executed status, the ordered event list (register reads and writes, delays, time calls, FIFO lookups, sections, every memory and address-space service call with its arguments, every copy with its address, length and a 64-bit prefix of the SHA-256 of the bytes), the Falcon state bytes, the SHA-256 of primary and shadow after the run, the region record and request fields of InitLocked. The image of the traced case is also compared byte for byte (18,176 bytes).",
"covered_variation": "InitLocked: shadow and backup properties, system-memory primary, failures of each creation and allocation, 126 single requests over 7 sizes (including one that wraps to zero), 3 alignments, 3 mask pairs and the no-sub-descriptor flag, no request, another request id. HS run: debug fuse (both image and signature choices), no shadow, copy buffer failure, each of the three mapping failures, image creation and allocation failure, missing OBJMC, busy Falcon, failure of each address-space service, instance block address spaces 0-3, mapped addresses, bind without waits, PMC enable words, interrupt enable words, reset register words, memory scrub waits with timeouts and other statuses, HWCFG1 words, the two bind waits with timeouts, DMEM boundary words, IMEM size words, start through CPUCTL or its alias, halt at once, late and never, 115 MAILBOX0 values. Region check: each of the eight read words changed, with and without the system-memory comparison, the GPU check failing, a late index. Check after the run: 10 store addresses against 5 region readings.",
"fixture_supplied": "Register access, delay and time functions, diagnostics, allocator, fill and copy, registry lookup; memory services (descriptor creation and allocation with the address as case input, release, address, sub-descriptor, placement override, CPU mappings backed by a framebuffer model, fill); address-space services (create, destroy, pin, unpin, instance block writer, MemoryManager+358, map, unmap); KernelBus+4c8; FIFO+1b8; the multi-GPU section; the GPU+1e70 object's +100, the GPU+22c8 child's +178, the GPU+20c8 object's +238 and +270; _nv031156rm. Full list in reports/gpu-acr-load-original.json.",
"stored_by_harness": "OBJACR+394 = 2 and the zeroed record array at +3a0 as the constructor _nv016731rm leaves them (the constructor itself was not executed); OBJACR+385 = 0; the class StateDestroy body at vtable slot e0.",
"not_executed": "The OBJACR constructor; the copy-engine branch; _nv028536rm with a failing descriptor creation or allocation (the original stores through the null pointer); the descriptor, BAR2 mapping, address-space and page-table walker code behind the fixture services; OBJACR+180 with a PSDL certificate; the PMU function at +2f0; _nv055814rm (SEC2 LS start, OBJSEC2+513 clear); OBJACR Unload."
},
{
"evidence_category": "original-driver observation compared with the emulated original",
"transcript": "target/trace/b3-bar0.txt",
"transcript_sha256": "348f232f9604a06b86b9d8574e6a3883e4cecc2e727ee3cf25aa593d76c055be",
"result": "The harness's traced case, fed the transcript's read values, performs exactly the register accesses of lines 140591-140620 and 141024-147277: 6,225 accesses, no mismatch. Not compared: 49 lines of the services the fixture supplies (BAR2 and Falcon-space invalidates, bus flushes) and three words of the 84-byte boot descriptor that the original leaves uninitialised (0, 0x482c0008, 0xffff8c8f on hardware; 0, 0, 0 in emulation). Line 141023 (R 0x1373a0) falls where the GPU+1e70 object's function at +100 is called.",
"sha256_of_normalised_lines": "b2b6cf8b0ed3c7775b10e3364000bb1a19a6660b8d8823a315d9edc2e5e24b2c"
},
{
"evidence_category": "original-driver observation compared with the replacement",
"transcript": "target/trace/b3-bar0.txt",
"bar2_extract": "target/trace/b3-bar12-rle.txt",
"bar2_extract_sha256": "6be25ac2ea4b845eeec6453715b4182d91d37627b105c84b939846c8ebe4bbd6",
"test": "gpu::acr_load_bar2::tests::physical_transcript_is_reproduced_from_the_container (ignored; NV_RS_GV100_FIRMWARE, NV_RS_B3_BAR0_TRANSCRIPT, NV_RS_B3_BAR12_EXTRACT)",
"result": "acr_load::load over acr_load_bar2::Bar2Services, fed the transcript's read values and the real container, performs every BAR0 access of lines 140591-140620 and 141013-147277 in order with equal offsets and written values (6,295 accesses, including the 70 lines of invalidates and flushes and line 141023 through the service hook), and its BAR2 accesses equal the extract in kind, offset, length and order for the image write (extract lines 446-194321) and from the HS image upload to the end of the Falcon address space (86 merged extents). The boot descriptor's three uninitialised words are supplied to the function as the traced values. The CPU shadow copy between line 140620 and line 141013 is collected apart and checked for its expected shape (two mappings of 224 entries each, one 0xe0000-byte read, one 0xe0000-byte write, four BAR-space invalidates).",
"limit": "The trace records byte copies without data. Page-table entry values of BAR2 mappings rest on mmu::bar2_setup's oracle for a one-page mapping; the directory and page entries of the Falcon address space and the attribution of teardown accesses to services are inferred (see acr_load_bar2 module header)."
}
],
"assembly_level_confirmations": [
"_nv016753rm: movzbl 0x385(%rsi); OBJACR+394 stored at descriptor+0x1c; three shr $0x8 (start, end, shadow); shadow word stored at record+0x18, zero when OBJACR+386 is clear; cmpw $0x0,0x4de4(gpu).",
"_nv016741rm: lea 0x200(image, layout word 2) for the region descriptor; movq $0x0,0x60 and movl $0x0,0x58 of the descriptor; only a 4-byte store initialises the first 16 bytes of the boot descriptor on the stack; call through Falcon+248.",
"_nv016953rm: owner tags 0x16, 0x17, 0x18 stored at descriptor+0xa0.",
"_nv016730rm: Falcon registers 0x40 and 0x44; 0xffff results.",
"_nv028759rm: cmpl $0x2,0x10(instance record) then cmpq $0x1,0x10(...): the second test compares the address space and the cache word together; constants 0x20000000, 0x30000000, 0x40000000.",
"_nv028460rm (REA Ghidra): reads Falcon register 0x268 and shifts left by 8.",
"_nv016948rm (REA Ghidra): writes index & 0xf to 0x100cd4 until the low nibble reads back, returns the value >> 4; an index outside 2..5 never returns."
],
"allocations": {
"function_chain": "_nv016955rm -> _nv016940rm -> OBJACR+120 _nv016953rm -> _nv043694rm, _nv043691rm; _nv016937rm -> _nv016725rm",
"requests_in_order": [
"primary: 0xe0000 bytes, alignment 0x20000, contiguous, framebuffer, cache 1, flags 4, owner tag 0x16",
"shadow (OBJACR+386): the same, owner tag 0x17",
"backup (OBJACR+529, registry RmSwapAcrRegions): the same, owner tag 0x18, then exchanged with the primary"
],
"evidence": "E (224 cases).",
"traced_v100": {
"primary": "0x7fde80000 [T: 0x100cd4 index 2 reads 0x7fde802 at line 147254; E+model: mmu::placement]",
"shadow": "0x7fdda0000 [model: the next request of the same shape on the heap state that gives the primary; not in the transcript. Corroborated by mmu::placement_tests::traced_v100_runlist_buffers_follow_the_wpr_and_the_pmu_surface, where primary, shadow and a 0x207a00-byte PMU surface put the runlist buffers at the addresses of transcript lines 140727-140870.]"
},
"test": "gpu::acr_load::tests::traced_v100_heap_places_the_primary_and_the_shadow",
"inferred": "That no other request reaches the internal heap between the BAR2 test page and OBJACR InitLocked (FBFLCN, Graphics, KernelGraphics and OBJLSFM InitLocked run in between) is known only from the traced primary address."
},
"rust_api": {
"gpu::acr_load": [
"trait Services: nvdec_hs_run::Io (memory, address-space and cross-object services)",
"init_locked(io, Option<Request>, Properties) -> Result<InitResult<Descriptor>, Error>",
"write_region_image(io, region, image, &Composed, &Gv100Inputs) -> Result<NvStatus, Error>",
"run_hs(io, &Pack, &mut Workspace, scratch, shadow_buffer, &Regions, &mut Falcon, &mut Sec2State, &RunInputs) -> Result<NvStatus, Error>",
"check_regions(io, &Regions, Properties) -> Result<NvStatus, Error>",
"check_after(io, AfterInputs) -> Result<NvStatus, Error>",
"load(io, &Pack, &mut Workspace, scratch, shadow_buffer, &mut Falcon, &mut Sec2State, &LoadInputs) -> Result<NvStatus, Error>",
"gv100_sec2(gpu_de0) -> Falcon, scratch_bytes(&Pack), registered_bytes, placement_request"
],
"gpu::acr_load_bar2": [
"trait Io: mmu::bar2_setup::Io (BAR2 copy, fill and 64-bit store, the framebuffer allocator, time, FIFO lookup and the passed-through services)",
"Bar2Services::new(&mut io, &Plan, bar2_base), adopt(bytes, address) -> descriptor; implements acr_load::Services"
],
"status_convention": "Outer Err: a provider failed (Error::Provider), a buffer or record does not fit, or an original branch is not implemented (Error::Unsupported). Inner NvStatus: the executed original status (0, 0x1a, 0x1f, 0x40, 0x56, 99, 0x65, 0xffff, or a service's status).",
"changes_to_existing_modules": "gpu::nvdec_hs_run: the reset _nv028467rm takes the engine interface's two functions as a trait (NVDEC behaviour unchanged, 754 oracle cases pass), prepare takes the signature tags, helpers visible to sibling modules. mmu::bar2_setup: public helpers for a later BAR2 mapping and invalidate_space with a command word (oracle and transcript tests pass). gpu::wpr_blob tests: sha256 visible to other test modules."
},
"validation": {
"cargo_fmt_check": "passed",
"cargo_clippy_workspace_all_targets_deny_warnings": "passed",
"ignored_tests": "gpu::acr_load::tests::compare_original_acr_load, gpu::acr_load_bar2::tests::physical_transcript_is_reproduced_from_the_container, and the oracle and transcript tests of nvdec_hs_run, bar2_setup and wpr_blob: passed",
"cargo_test_workspace": "599 passed, 0 failed, 63 ignored"
},
"notes": "analysis/closed-driver-580/acr-load-implementation-notes.md",
"correction_2026_11_19": "The harness appends a case's read values to the default list instead of replacing it, so the '115 MAILBOX0 values' and the DMEM boundary values of covered_variation never reached their reads: no oracle row has a nonzero MAILBOX0 after the run or a boundary other than 0x100. Those branches of _nv016730rm and _nv028457rm are compared by execution in reports/gpu-acr-unload-validation.json. The container hash above is that of the 80-record container; the current one has 81 records (ff0f4eaa...a499d8) and all 548 rows pass with it.",
"oracle_correction_2026_11_19": {
"defect": "tools/check_gpu_acr_load_binary.py appended a case's read values to the default list of the same register, so a register read once kept its default (correction_2026_11_19 above).",
"fix": "A case's list now replaces the default list (function `overridden`). The five time-check cases of the two bind waits keep default-then-value order explicitly (`after_default`), because with the value alone those waits never end. The DMEM boundary cases now reach the control-word read-back of _nv028457rm and supply 0x871c0 values (6 control lists for each of 5 boundaries, 30 rows instead of 5). A guard stops a case whose wait cannot terminate.",
"old_oracle": {
"sha256": "f0e5acb286709fe06456cfcac57b635d220fab02effb4935242eee160256abce",
"cases": 548,
"kept_as": "target/gpu-stage/original-acr-load.before-read-fix.txt"
},
"new_oracle": {
"sha256": "cff0fd5f597ba1254b23e51961cbe9c76afa4587c726c159fb84eaf2b31c6ad6",
"cases": 573,
"regenerates_identically": true,
"rows_with_nonzero_mailbox0_after_the_run": 116,
"dmem_boundaries_in_H_rows": {
"0": 6,
"1": 6,
"0x100": 214,
"0xffffff": 6,
"0xffffffff": 6
}
},
"rust_comparison": "gpu::acr_load::tests::compare_original_acr_load: 573 of 573 rows pass with no change to core gpu::acr_load (the two branches had been added through the unload cases); the test now pins the row count.",
"traced_case": "unchanged: 6,225 register accesses equal transcript lines 140591-140620 and 141024-147277; HS image SHA-256 146bed51...3c3493fb unchanged.",
"unload_oracle": "tools/check_gpu_acr_unload_binary.py, which executes the load harness up to its traced case, regenerates ec05ccc1...128548 unchanged (171 cases)."
}
}