Repository navigation
VFS: route MAXIMUM_ALLOWED opens through the overlay - #2694
luckyteagirl wants to merge 1 commit into
Conversation
Treat maximum allowed access as potentially writable so opens of original game files follow the existing copy-on-write path. Cover the routing decision using a synthetic file and verify the original bytes remain intact. Assisted-by: Codex (GPT-6.2 Sol)
|
A complete GPU workspace suite (listed under Not tested): passes on NVIDIA, and the new test fails without the Tested:
A question about the cost: with this, an Not tested: a title that opens files with AI use: Claude Code (Claude Opus 5.5) ran the suite and the scratch change, read |
|
Thanks for the full GPU suite and mutation check. Yes: with the current VFS copy-on-open design, |
Fixes #2682. A title can request
MAXIMUM_ALLOWEDwithout an explicit write bit. The old VFS classifier sent that open to the original game file even though Windows can grant write access. This change sends the request through the copy-on-write overlay.What is in it
MAXIMUM_ALLOWEDin the VFS write-capable access mask.Tested
30.0.13002.13003); AMD Ryzen 9 5980HX; Rust 1.99.0 MSVC.mainby selecting the original and passed onc4d013199b705fcc6dcff070e2dd687834af0ada. All 13 VFS module tests passed on the committed head (0 failed, 0 ignored, 0 skipped) withXCL_ADAPTER=6800M,XCL_REQUIRE_GPU=1, and one test thread. These VFS tests run on the CPU.CreateFileWprobe confirmed thatMAXIMUM_ALLOWEDcan grant a writable handle when the ACL allows it.cargo build --locked --release -p xcl -j 1passed on both cleanmainand the committed head.scripts/test.ps1completed the workspace and test-binary builds but the library harness exited with0xc0000005during the DXIL tests, before a full-suite summary. Its log shows 83okand oneignoredprogress lines before the abort; these are not complete suite counts.XCL_ADAPTER=6800MandXCL_REQUIRE_GPUunset,cargo test --locked --workspace --no-fail-fast -j 1 -- --test-threads=1 --show-outputcompleted 36 targets: 125 passed, 1 failed, 20 ignored, and 4 explicitSKIPPEDlines (two title debug-layer variants withoutd3d12SDKLayers.dll, one no heap windows, one texture-upload check without the D3D12 debug layer). The library target separately aborted with0xc0000005duringraw_loads_in_root_windows_respect_exec_and_boundsafter 85okand oneignoredprogress lines, so it has no final counts. The completed-target failure wasoffline_split_compute_pipeline_is_reused_by_a_second_process: its warm run expected five loaded driver-cache pipelines and reported zero.maincontrol,cargo test --locked -p xcl --lib -j 1 -- --test-threads=1 --show-outputwith the same RX 6800M selection, also aborted with0xc0000005in that exactraw_loads_in_root_windows_respect_exec_and_boundstest after 85okand oneignoredprogress lines.cargo test --locked -p xcl --test gpu_compute_e2e -j 1 offline_split_compute_pipeline_is_reused_by_a_second_process -- --exact --test-threads=1 --nocapture, reproduced the same warm-cache assertion on this RX 6800M: 0 passed, 1 failed, 0 ignored, 0 skipped; five pieces rebuilt and zero loaded. Both workspace failures therefore also occur without this VFS patch.Regression run
scripts/smoke.ps1 -Game <owned title folder> -Seconds 12through a monitored runner withXCL_ADAPTER=6800M, separate XCL data and DXIL cache directories, and clean release builds. Same title hash and duration; no guard intervention. Main showed 147 frames and 7,512 MB peak commit; the patch showed 162 frames and 7,509 MB. These runs check general startup and presentation, not a provenMAXIMUM_ALLOWEDopen.Main:
PR head:
Copy-on-open cost
MAXIMUM_ALLOWEDmay grant write rights, so this patch uses that path even if the caller only reads. A large archive opened this way can therefore be copied in full and consume matching overlay space. The title smoke did not establish whether it opens archives withMAXIMUM_ALLOWED; that workload and cost remain unmeasured. Avoiding an eager copy would need a safe way to redirect a later write without giving the title a writable handle to the original game file.Not tested
MAXIMUM_ALLOWED; the regression fixture tests routing and the retail smoke checks general startup behavior.AI use
Related
is_writeand remains semantically compatible. If both PRs land, their new VFS unit tests occupy the same insertion point and may need a test-only rebase resolution.