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, |
|
NVIDIA test report for
|
…t, readonly-aware delete) Port upstream xcl-dev#2708 (live head 15393dc): the MAXIMUM_ALLOWED bit itself landed earlier via xcl-dev#2694 (91e37a8); this takes the remaining regression test a_maximum_allowed_open_takes_the_write_path verbatim into vfs.rs, pinning the write-path overlay copy plus the read-only-bit read path. Port upstream xcl-dev#2809 (live head 80cf435): whiteout_original_file(rel, check_readonly) verbatim into shared vfs.rs (Linux containment via checked_original_path), with delete_file delegating the hide-original half with check_readonly=false (move-retire keeps its policy, as upstream). The Windows-native hook half (MAX_PATH/extended-prefix juggling, native DeleteFileW sharing checks) stays out; the Linux twin vfs_hooks_linux::delete_file carries the readonly-check shape (symlink_metadata dir/readonly gates, overlay remove + commit, else whiteout_original_file(rel, true)), and kernelx_linux DeleteFileA/W route Game deletes through it. Close-time/best-effort removals and move_impl retire keep Vfs::delete_file directly (no readonly gate). Tests: vfs::tests +1, vfs_hooks_linux::tests +1 (Linux twin of the cfg(windows) vfs_readonly_delete: readonly original/overlay denied and still visible, writable paths unchanged, retire-after-move unaffected). Failing-first: readonly delete returned Ok before (scratch test), both upstream artifacts absent (grep 0). Gates: both checks 0 errors; lib 766/0/1 threads=4 (+2); title e2e 12 unique FAILs all D3D12.X 0 non-GPU; retail fresh root SIGSEGV exe+0x2237320 fault 0x0 unmapped stubs 20 xgr exactly 3 HOLDS.
|
Cross-PR integration check on current On Windows 11 build 26200 with Rust 1.99.0 MSVC (debug), a fresh This is integration evidence for the two unchanged PR heads, not a new full GPU workspace suite or retail title run. The independent full GPU and paired smoke results already in this PR remain the broader evidence. AI use: Codex with a GPT-6.2 Sol agent prepared and checked this local batch. |
|
Independent desktop NVIDIA verification of PR #2694 at head Environment
Targeted release tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --lib maximum_allowed_open_uses_an_overlay_copy -- --nocapture (3 consecutive runs) |
1 passed; 0 failed; 0 ignored; 1336 filtered out × 3 (0.00s, 0.01s, 0.00s, 0 skipped) |
cargo test --release -p xcl --lib vfs:: -- --test-threads=1 (3 consecutive runs) |
13 passed; 0 failed; 0 ignored; 1324 filtered out × 3 (0.04s, 0.05s, 0.04s, 0 skipped) |
cargo build --release -p xcl |
Clean build (1m 40s, exit 0, 0 new warnings) |
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, cached baseline on the same machine):
xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1518 (PresentX 1518)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14018 MB
PR #2694 (c4d013199b705fcc6dcff070e2dd687834af0ada):
xcl-smoke v1
commit: c4d013199b705fcc6dcff070e2dd687834af0ada
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1576 (PresentX 1576)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13992 MB
Runtime log observations (xcl.log)
9221log lines,0[ERROR]/ device-removal / panic lines (dxil_cache:460hits,0misses,0compilation failures;228background pipelines,0failures).- Final draw/memory telemetry in log:
19456 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample13992 MB committed by the process; video memory 6116 MB local, 4650 MB non-local.
Limits of coverage
- Routing
MAXIMUM_ALLOWEDopens through the copy-on-write overlay (leaving original files unmodified) was verified directly viamaximum_allowed_open_uses_an_overlay_copy(3/3) andvfs::(13/13× 3). - The 60 s retail smoke confirms zero VFS or startup regression on
title: 29640639(single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR); it did not separately audit whether this title issuesMAXIMUM_ALLOWEDopens during the 60 s window.
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
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.FILE_READ_DATAto this user. NativeCreateFileW(MAXIMUM_ALLOWED)still granted write rights and a scratchWriteFilesucceeded, whileCopyFileExWfailed withERROR_ACCESS_DENIED(5). A minimal harness compiled from exact currentmain83b00818and PR headc4d01319VFS sources returnedUse(original)on main andFail(5)on the PR for that open. The scratch file and its ACL were cleaned up after the probe; this was not a title run.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.cargo test --workspace --no-fail-fast -- --test-threads=4completed with 1,436 passed, 0 failed, 47 ignored, and 25 explicit GPU skips. The VFS regression passed three repeated runs; a scratch mutation removingMAXIMUM_ALLOWEDfromWRITE_ACCESSmade it fail by selecting the original game file. These are the independent reporter's results, not runs on our RX 6800M.Regression run
scripts/smoke.ps1 -Game <owned title folder> -Seconds 60withXCL_ADAPTER=6800M, separate fresh XCL data and DXIL cache directories, and clean exact-head release builds. Same title hash and duration. Main showed 759 frames and 14,513 MB peak commit; the patch showed 771 frames and 14,494 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.b49be183and PR headc4d01319, the logs each sampled 24 CreateFile calls, including six.rpfopens. Neither log recorded a redirected write, both final reports recorded zero redirected writes and whiteouts, and both fresh overlay directories remained empty. The sampled calls record creation flags, and DesiredAccess was not logged, so this evidence cannot establish whether any open requestedMAXIMUM_ALLOWED.ACL compatibility limit
MAXIMUM_ALLOWEDwrite rights while denying content read. XCL cannot make an overlay copy of that file, so this PR returns access denied where current main would open the original with a writable handle. Returning that original handle would allow modification of the game folder. This fail-closed behavior is intentional pending a different safe policy; a title that depends on this unusual ACL/open combination may be affected. The fixture above reproduces the difference; I have not observed it in a title.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.