VFS: route MAXIMUM_ALLOWED opens through the overlay #2684

Merged
luckyteagirl merged 1 commit from upstream-pr/2694 into main 2026-11-30 01:36:18 +00:00
luckyteagirl commented 2026-11-26 06:42:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T06:42:42Z.


Fixes #2682. A title can request MAXIMUM_ALLOWED without 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

  • Include MAXIMUM_ALLOWED in the VFS write-capable access mask.
  • Add a fixture that opens an existing game file with only that access bit and checks that the selected path is the overlay copy while the original bytes stay intact.

Tested

  • Windows 11 Home build 26200; AMD Radeon RX 6800M (driver 30.0.13002.13003); AMD Ryzen 9 5980HX; Rust 1.99.0 MSVC.
  • The focused VFS fixture failed on clean main by selecting the original and passed on c4d013199b705fcc6dcff070e2dd687834af0ada. All 13 VFS module tests passed on the committed head (0 failed, 0 ignored, 0 skipped) with XCL_ADAPTER=6800M, XCL_REQUIRE_GPU=1, and one test thread. These VFS tests run on the CPU.
  • A native Windows CreateFileW probe confirmed that MAXIMUM_ALLOWED can grant a writable handle when the ACL allows it.
  • A separate scratch ACL fixture denied only FILE_READ_DATA to this user. Native CreateFileW(MAXIMUM_ALLOWED) still granted write rights and a scratch WriteFile succeeded, while CopyFileExW failed with ERROR_ACCESS_DENIED (5). A minimal harness compiled from exact current main 83b00818 and PR head c4d01319 VFS sources returned Use(original) on main and Fail(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 1 passed on both clean main and the committed head.
  • scripts/test.ps1 completed the workspace and test-binary builds but the library harness exited with 0xc0000005 during the DXIL tests, before a full-suite summary. Its log shows 83 ok and one ignored progress lines before the abort; these are not complete suite counts.
  • With XCL_ADAPTER=6800M and XCL_REQUIRE_GPU unset, cargo test --locked --workspace --no-fail-fast -j 1 -- --test-threads=1 --show-output completed 36 targets: 125 passed, 1 failed, 20 ignored, and 4 explicit SKIPPED lines (two title debug-layer variants without d3d12SDKLayers.dll, one no heap windows, one texture-upload check without the D3D12 debug layer). The library target separately aborted with 0xc0000005 during raw_loads_in_root_windows_respect_exec_and_bounds after 85 ok and one ignored progress lines, so it has no final counts. The completed-target failure was offline_split_compute_pipeline_is_reused_by_a_second_process: its warm run expected five loaded driver-cache pipelines and reported zero.
  • A clean main control, cargo test --locked -p xcl --lib -j 1 -- --test-threads=1 --show-output with the same RX 6800M selection, also aborted with 0xc0000005 in that exact raw_loads_in_root_windows_respect_exec_and_bounds test after 85 ok and one ignored progress lines.
  • A second clean-main control, 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.
  • Independent RTX 3060 report on this exact clean head: cargo test --workspace --no-fail-fast -- --test-threads=4 completed with 1,436 passed, 0 failed, 47 ignored, and 25 explicit GPU skips. The VFS regression passed three repeated runs; a scratch mutation removing MAXIMUM_ALLOWED from WRITE_ACCESS made 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 60 with XCL_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 proven MAXIMUM_ALLOWED open.

Main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 60
exit: 0x0
frames shown: 759 (PresentX 759)
presents per 2 s (last 3): 57 60 60
device removals: 0
crashes: 0
peak commit: 14513 MB

PR head:

xcl-smoke v1
commit: c4d013199b705fcc6dcff070e2dd687834af0ada
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 60
exit: 0x0
frames shown: 771 (PresentX 771)
presents per 2 s (last 3): 54 60 60
device removals: 0
crashes: 0
peak commit: 14494 MB

Copy-on-open cost

  • The VFS currently makes an overlay copy before a write-capable open of an existing game file. MAXIMUM_ALLOWED may 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 with MAXIMUM_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.
  • The existing 60-second run logs and final reports show no successful overlay copy. On main b49be183 and PR head c4d01319, the logs each sampled 24 CreateFile calls, including six .rpf opens. 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 requested MAXIMUM_ALLOWED.

ACL compatibility limit

  • A file can grant MAXIMUM_ALLOWED write 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

  • A title open that actually requests MAXIMUM_ALLOWED; the regression fixture tests routing and the retail smoke checks general startup behavior.
  • A complete passing GPU workspace suite on our RX 6800M. The independent RTX 3060 suite passed with 25 explicit GPU skips. Both head and clean main hit the same library access violation and warm split-driver-cache failure on our RX 6800M; the causes were not investigated in this VFS PR.

AI use

  • Codex (GPT-6.2 Sol) implemented and tested the patch. Codex reviewed it against the issue, Windows access behavior, and neighboring PRs.
  • OpenAI Codex (GPT-6.2 Astra) verified the independent exact-head report and added its linked results to this description.

Related

  • #1092 also uses is_write and 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.
<!-- greyfinch-sync:ivall/xcl:issue:5505324700 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2694). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T06:42:42Z. --- Fixes #2682. A title can request `MAXIMUM_ALLOWED` without 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** - Include `MAXIMUM_ALLOWED` in the VFS write-capable access mask. - Add a fixture that opens an existing game file with only that access bit and checks that the selected path is the overlay copy while the original bytes stay intact. **Tested** - Windows 11 Home build 26200; AMD Radeon RX 6800M (driver `30.0.13002.13003`); AMD Ryzen 9 5980HX; Rust 1.99.0 MSVC. - The focused VFS fixture failed on clean `main` by selecting the original and passed on `c4d013199b705fcc6dcff070e2dd687834af0ada`. All 13 VFS module tests passed on the committed head (`0 failed, 0 ignored, 0 skipped`) with `XCL_ADAPTER=6800M`, `XCL_REQUIRE_GPU=1`, and one test thread. These VFS tests run on the CPU. - A native Windows `CreateFileW` probe confirmed that `MAXIMUM_ALLOWED` can grant a writable handle when the ACL allows it. - A separate scratch ACL fixture denied only `FILE_READ_DATA` to this user. Native `CreateFileW(MAXIMUM_ALLOWED)` still granted write rights and a scratch `WriteFile` succeeded, while `CopyFileExW` failed with `ERROR_ACCESS_DENIED` (5). A minimal harness compiled from exact current `main` `83b00818` and PR head `c4d01319` VFS sources returned `Use(original)` on main and `Fail(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 1` passed on both clean `main` and the committed head. - `scripts/test.ps1` completed the workspace and test-binary builds but the library harness exited with `0xc0000005` during the DXIL tests, before a full-suite summary. Its log shows 83 `ok` and one `ignored` progress lines before the abort; these are not complete suite counts. - With `XCL_ADAPTER=6800M` and `XCL_REQUIRE_GPU` unset, `cargo test --locked --workspace --no-fail-fast -j 1 -- --test-threads=1 --show-output` completed 36 targets: **125 passed, 1 failed, 20 ignored**, and 4 explicit `SKIPPED` lines (two title debug-layer variants without `d3d12SDKLayers.dll`, one no heap windows, one texture-upload check without the D3D12 debug layer). The library target separately aborted with `0xc0000005` during `raw_loads_in_root_windows_respect_exec_and_bounds` after 85 `ok` and one `ignored` progress lines, so it has no final counts. The completed-target failure was `offline_split_compute_pipeline_is_reused_by_a_second_process`: its warm run expected five loaded driver-cache pipelines and reported zero. - A clean `main` control, `cargo test --locked -p xcl --lib -j 1 -- --test-threads=1 --show-output` with the same RX 6800M selection, also aborted with `0xc0000005` in that exact `raw_loads_in_root_windows_respect_exec_and_bounds` test after 85 `ok` and one `ignored` progress lines. - A second clean-main control, `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. - Independent [RTX 3060 report on this exact clean head](https://github.com/xcl-dev/xcl/pull/2694#issuecomment-7185105165): `cargo test --workspace --no-fail-fast -- --test-threads=4` completed with **1,436 passed, 0 failed, 47 ignored**, and 25 explicit GPU skips. The VFS regression passed three repeated runs; a scratch mutation removing `MAXIMUM_ALLOWED` from `WRITE_ACCESS` made 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 60` with `XCL_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 proven `MAXIMUM_ALLOWED` open. Main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 60 exit: 0x0 frames shown: 759 (PresentX 759) presents per 2 s (last 3): 57 60 60 device removals: 0 crashes: 0 peak commit: 14513 MB ``` PR head: ``` xcl-smoke v1 commit: c4d013199b705fcc6dcff070e2dd687834af0ada gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 60 exit: 0x0 frames shown: 771 (PresentX 771) presents per 2 s (last 3): 54 60 60 device removals: 0 crashes: 0 peak commit: 14494 MB ``` **Copy-on-open cost** - The VFS currently makes an overlay copy before a write-capable open of an existing game file. `MAXIMUM_ALLOWED` may 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 with `MAXIMUM_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. - The existing 60-second run logs and final reports show no successful overlay copy. On main `b49be183` and PR head `c4d01319`, the logs each sampled 24 CreateFile calls, including six `.rpf` opens. 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 requested `MAXIMUM_ALLOWED`. **ACL compatibility limit** - A file can grant `MAXIMUM_ALLOWED` write 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** - A title open that actually requests `MAXIMUM_ALLOWED`; the regression fixture tests routing and the retail smoke checks general startup behavior. - A complete passing GPU workspace suite on our RX 6800M. The independent RTX 3060 suite passed with 25 explicit GPU skips. Both head and clean main hit the same library access violation and warm split-driver-cache failure on our RX 6800M; the causes were not investigated in this VFS PR. **AI use** - Codex (GPT-6.2 Sol) implemented and tested the patch. Codex reviewed it against the issue, Windows access behavior, and neighboring PRs. - OpenAI Codex (GPT-6.2 Astra) verified the independent exact-head report and added its linked results to this description. **Related** - #1092 also uses `is_write` and 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.
fromthemoonx commented 2026-11-26 08:04:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-26T07:06:35Z.


A complete GPU workspace suite (listed under Not tested): passes on NVIDIA, and the new test fails without the MAXIMUM_ALLOWED bit. One question about the cost, below.

Tested: c4d0131 (its base is current main b49be18, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1436 passed, 0 failed, 47 ignored; 25 SKIPPED lines; the library process ran to the end (no 0xc0000005 here)
vfs::tests::maximum_allowed_open_uses_an_overlay_copy, 3 runs 3 of 3
scratch: MAXIMUM_ALLOWED taken out of WRITE_ACCESS again fails: open_decision returns the game folder's data\hello.txt instead of the overlay path

A question about the cost: with this, an OPEN_EXISTING open with MAXIMUM_ALLOWED and no write bit takes the copy-on-write path, so the whole file is copied into the overlay when it is opened (the test checks the copy has original right after open_decision). If a title uses MAXIMUM_ALLOWED to open its large archives just for reading, each such file would then be copied to the data folder on its first open. Is that intended? Another option is to open the original with read rights in that case, or to copy only on the first write. I have not checked whether the retail title opens files this way.

Not tested: a title that opens files with MAXIMUM_ALLOWED, a release build, AMD.

AI use: Claude Code (Claude Opus 5.5) ran the suite and the scratch change, read open_decision, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7185105165 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2694#issuecomment-7185105165). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-26T07:06:35Z. --- **A complete GPU workspace suite (listed under Not tested): passes on NVIDIA, and the new test fails without the `MAXIMUM_ALLOWED` bit.** One question about the cost, below. **Tested:** `c4d0131` (its base is current `main` `b49be18`, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` | 1436 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines; the library process ran to the end (no `0xc0000005` here) | | `vfs::tests::maximum_allowed_open_uses_an_overlay_copy`, 3 runs | 3 of 3 | | scratch: `MAXIMUM_ALLOWED` taken out of `WRITE_ACCESS` again | fails: `open_decision` returns the game folder's `data\hello.txt` instead of the overlay path | **A question about the cost:** with this, an `OPEN_EXISTING` open with `MAXIMUM_ALLOWED` and no write bit takes the copy-on-write path, so the whole file is copied into the overlay when it is opened (the test checks the copy has `original` right after `open_decision`). If a title uses `MAXIMUM_ALLOWED` to open its large archives just for reading, each such file would then be copied to the data folder on its first open. Is that intended? Another option is to open the original with read rights in that case, or to copy only on the first write. I have not checked whether the retail title opens files this way. **Not tested:** a title that opens files with `MAXIMUM_ALLOWED`, a release build, AMD. **AI use:** Claude Code (Claude Opus 5.5) ran the suite and the scratch change, read `open_decision`, and wrote this report.
luckyteagirl commented 2026-11-26 08:04:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T07:33:50Z.


Thanks for the full GPU suite and mutation check. Yes: with the current VFS copy-on-open design, MAXIMUM_ALLOWED takes the write-capable path and eagerly copies an existing game file, even if this caller only reads. That preserves the game folder when Windows grants write access, but could be expensive for a large archive. My 12-second title smoke did not show whether the title uses this access mask on archives, so I have added this cost and the missing measurement to the PR description. A lazy copy would need to intercept a later write while keeping the original file unwritable through the returned handle; the current path cannot safely defer it. AI-assisted response with Codex.

<!-- greyfinch-sync:ivall/xcl:comment:7185591578 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2694#issuecomment-7185591578). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T07:33:50Z. --- Thanks for the full GPU suite and mutation check. Yes: with the current VFS copy-on-open design, `MAXIMUM_ALLOWED` takes the write-capable path and eagerly copies an existing game file, even if this caller only reads. That preserves the game folder when Windows grants write access, but could be expensive for a large archive. My 12-second title smoke did not show whether the title uses this access mask on archives, so I have added this cost and the missing measurement to the PR description. A lazy copy would need to intercept a later write while keeping the original file unwritable through the returned handle; the current path cannot safely defer it. AI-assisted response with Codex.
upipibi commented 2026-11-26 16:06:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T15:30:59Z.


NVIDIA test report for c4d0131: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.

  • cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4 (head as-is, on b49be18): 1301 passed, 0 failed, 27 ignored, and the process ran to the end (no 0xc0000005). 25 SKIPPED: 21 no wave64, 3 wave32 per-lane forms the translator refuses (#1426), 1 pso_measurement_compiles_an_exact_synthetic_record without Developer Mode. None is in vfs.rs.
  • vfs::tests::maximum_allowed_open_uses_an_overlay_copy, --exact --test-threads=1 --nocapture, 3 runs: 3/3 passed, 0 SKIPPED (a CPU-only test).
    Lib tests only; no title run.
    AI-assisted (Claude Code, Claude Opus 5.5).
<!-- greyfinch-sync:ivall/xcl:comment:7196375732 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2694#issuecomment-7196375732). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T15:30:59Z. --- NVIDIA test report for `c4d0131`: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug. - `cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4` (head as-is, on `b49be18`): 1301 passed, 0 failed, 27 ignored, and the process ran to the end (no 0xc0000005). 25 SKIPPED: 21 `no wave64`, 3 wave32 per-lane forms the translator refuses (#1426), 1 `pso_measurement_compiles_an_exact_synthetic_record` without Developer Mode. None is in `vfs.rs`. - `vfs::tests::maximum_allowed_open_uses_an_overlay_copy`, `--exact --test-threads=1 --nocapture`, 3 runs: 3/3 passed, 0 SKIPPED (a CPU-only test). Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5).
luckyteagirl commented 2026-11-27 07:07:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-27T07:07:38Z.


Cross-PR integration check on current main 83b00818: I applied this PR's exact head c4d0131, then #2634's exact head e897ce3, in a disposable worktree. Both merges were clean; the resulting local merge is 1cf5f13. src/vfs.rs and src/log.rs match their respective PR heads byte for byte.

On Windows 11 build 26200 with Rust 1.99.0 MSVC (debug), a fresh cargo test --offline --locked -p xcl --lib -j 2 --no-run build in a dedicated target directory produced the batch test binary. Serial focused runs passed: VFS 13/13 (including MAXIMUM_ALLOWED) and logger 3/3 (including write and flush failure cases), with 0 failures, 0 ignored, and 0 explicit skips. I checked the test binary's source/manifest, inventory, and SHA-256 before and after running it.

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.

<!-- greyfinch-sync:ivall/xcl:comment:7212168063 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2694#issuecomment-7212168063). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-27T07:07:38Z. --- Cross-PR integration check on current `main` `83b00818`: I applied this PR's exact head `c4d0131`, then #2634's exact head `e897ce3`, in a disposable worktree. Both merges were clean; the resulting local merge is `1cf5f13`. `src/vfs.rs` and `src/log.rs` match their respective PR heads byte for byte. On Windows 11 build 26200 with Rust 1.99.0 MSVC (debug), a fresh `cargo test --offline --locked -p xcl --lib -j 2 --no-run` build in a dedicated target directory produced the batch test binary. Serial focused runs passed: VFS 13/13 (including `MAXIMUM_ALLOWED`) and logger 3/3 (including write and flush failure cases), with 0 failures, 0 ignored, and 0 explicit skips. I checked the test binary's source/manifest, inventory, and SHA-256 before and after running it. 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.
Decodere commented 2026-11-27 09:03:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T09:03:47Z.


Independent desktop NVIDIA verification of PR #2694 at head c4d013199b705fcc6dcff070e2dd687834af0ada (1 commit; exact parent & merge-base: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (c4d01319)

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)

  • 9221 log lines, 0 [ERROR] / device-removal / panic lines (dxil_cache: 460 hits, 0 misses, 0 compilation failures; 228 background pipelines, 0 failures).
  • Final draw/memory telemetry in log: 19456 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 13992 MB committed by the process; video memory 6116 MB local, 4650 MB non-local.

Limits of coverage

  • Routing MAXIMUM_ALLOWED opens through the copy-on-write overlay (leaving original files unmodified) was verified directly via maximum_allowed_open_uses_an_overlay_copy (3/3) and vfs:: (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 issues MAXIMUM_ALLOWED opens during the 60 s window.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7214235455 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2694#issuecomment-7214235455). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T09:03:47Z. --- Independent desktop NVIDIA verification of **PR #2694** at head `c4d013199b705fcc6dcff070e2dd687834af0ada` (`1` commit; exact parent & merge-base: `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`c4d01319`) | 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`) - `9221` log lines, `0` `[ERROR]` / device-removal / panic lines (`dxil_cache`: `460` hits, `0` misses, `0` compilation failures; `228` background pipelines, `0` failures). - Final draw/memory telemetry in log: `19456 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `13992 MB committed by the process; video memory 6116 MB local, 4650 MB non-local`. ### Limits of coverage - Routing `MAXIMUM_ALLOWED` opens through the copy-on-write overlay (leaving original files unmodified) was verified directly via `maximum_allowed_open_uses_an_overlay_copy` (`3/3`) and `vfs::` (`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 issues `MAXIMUM_ALLOWED` opens during the 60 s window. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
throny commented 2026-11-28 13:55:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T13:55:33Z.


merge-check claim
head: c4d013199b

<!-- greyfinch-sync:ivall/xcl:comment:7240283515 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2694#issuecomment-7240283515). Originally posted by [throny](https://github.com/throny) on 2026-11-28T13:55:33Z. --- merge-check claim head: c4d013199b705fcc6dcff070e2dd687834af0ada
throny commented 2026-11-28 14:12:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T14:12:25Z.


merge-check
base: e13d6250
head: c4d013199b
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2131 passed, 10 failed, 48 ignored (26 SKIPPED lines). The 10 failures are the ones main itself has at e13d6250 on this GPU (#3093: the nine since #2959 and, since today, gpu::dxil::msaa_tests::direct_msaa_loads_precede_get_dimensions), the same set with and without this PR; base alone: 2130 passed, 10 failed, 48 ignored.
review: correct for what it sets out to do. An open with MAXIMUM_ALLOWED now counts as a write: on an existing game file the original is copied into the overlay and the overlay path is opened, so such an open can no longer reach the read-only game folder (before, it opened the original, where the system could grant write access). A directory opened with that mask now creates the overlay directory and records a write. A file whose access list allows writing but not reading now returns access denied where it opened the original before (said to be intended).
performance: this is on by default and has a real cost that nobody has measured: every MAXIMUM_ALLOWED open of an existing game file copies the whole file (disk space, and a stall on the calling thread), also when the caller only reads. For a large archive that is a long stall. The smoke runs in the thread did not log the access masks, so whether a retail title opens its archives this way is unknown.
verdict: safe to merge (correctness; the copy cost is the maintainer's call, and a count of such opens on a retail title would settle it)
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7240497109 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2694#issuecomment-7240497109). Originally posted by [throny](https://github.com/throny) on 2026-11-28T14:12:25Z. --- merge-check base: e13d6250 head: c4d013199b705fcc6dcff070e2dd687834af0ada merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2131 passed, 10 failed, 48 ignored (26 SKIPPED lines). The 10 failures are the ones main itself has at e13d6250 on this GPU (#3093: the nine since #2959 and, since today, gpu::dxil::msaa_tests::direct_msaa_loads_precede_get_dimensions), the same set with and without this PR; base alone: 2130 passed, 10 failed, 48 ignored. review: correct for what it sets out to do. An open with MAXIMUM_ALLOWED now counts as a write: on an existing game file the original is copied into the overlay and the overlay path is opened, so such an open can no longer reach the read-only game folder (before, it opened the original, where the system could grant write access). A directory opened with that mask now creates the overlay directory and records a write. A file whose access list allows writing but not reading now returns access denied where it opened the original before (said to be intended). performance: this is on by default and has a real cost that nobody has measured: every MAXIMUM_ALLOWED open of an existing game file copies the whole file (disk space, and a stall on the calling thread), also when the caller only reads. For a large archive that is a long stall. The smoke runs in the thread did not log the access masks, so whether a retail title opens its archives this way is unknown. verdict: safe to merge (correctness; the copy cost is the maintainer's call, and a count of such opens on a retail title would settle it) hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Parakeet-Wheat commented 2026-11-30 01:15:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Parakeet-Wheat on 2026-11-30T01:15:05Z.


merge-check
base: 53e85fb124
head: c4d013199b
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2792 passed, 2 failed, 49 ignored; SKIPPED: 29 (22 no wave64, 3 wave32 per-lane forms refused (#1426), 2 no heap windows, 1 no GPU_UPLOAD heaps, 1 driver cache needs Developer Mode); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline fails on the base alone too (5 of 5 runs on base, 5 of 5 on the merge); e2e test_title_draws_with_a_root_signature_under_the_debug_layer failed once in the full run on the D3D12.X check "a texture in title memory (XG layout, #44) follows CPU writes" (every file/overlay check in that run passed, including "writes go to the overlay, game folder untouched"); it did not reproduce alone: 3 of 3 passed on the base and 3 of 3 on the merge.
review: correct for what it sets out to do; whole diff read (16 lines, vfs.rs only). MAXIMUM_ALLOWED now counts as a write in is_write, so an open of an existing game file with that mask gets an overlay copy instead of a handle to the original, which Windows could have granted with write rights. All three open hooks (CreateFileW, CreateFileA, CreateFile2) pass the access mask unchanged, so all are covered. MAXIMUM_ALLOWED has the same value as FILE_FLAG_BACKUP_SEMANTICS (0x0200_0000), but WRITE_ACCESS is tested only against the access mask (is_write), never against the flags, so the two do not mix. The new test fails without the fix: with MAXIMUM_ALLOWED taken out of WRITE_ACCESS it returns the game folder's file instead of the overlay path; restored, it passes. As the description says, a file that grants write but denies read now fails with access denied instead of opening the original (fail-closed, intended). #2850 makes the same one-line change (no test) and is not yet in #1607's D128 group with this PR and #2708.
performance: on by default. Every MAXIMUM_ALLOWED open of an existing game file now copies the whole file into the overlay first, also when the caller only reads; for a large archive that is a stall and the disk space. Not measured here (no title run); the PR description reports an empty overlay and zero redirected writes after its 60 s smoke on the PR head.
verdict: safe to merge (the copy cost on a title that does open archives with MAXIMUM_ALLOWED is unmeasured and the maintainer's call)
hardware / tool and model: RTX 3070 8 GB (610.88), Ryzen 5 5600X, Windows 11 Home 26300, Rust 1.95.0, debug / Claude Code, Claude Opus 5.5 (merge, build, suite, reruns, mutation check and review)

<!-- greyfinch-sync:ivall/xcl:comment:7265975446 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2694#issuecomment-7265975446). Originally posted by [Parakeet-Wheat](https://github.com/Parakeet-Wheat) on 2026-11-30T01:15:05Z. --- merge-check base: 53e85fb124eae624641e9884517e4f3c4a7d8794 head: c4d013199b705fcc6dcff070e2dd687834af0ada merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2792 passed, 2 failed, 49 ignored; SKIPPED: 29 (22 no wave64, 3 wave32 per-lane forms refused (#1426), 2 no heap windows, 1 no GPU_UPLOAD heaps, 1 driver cache needs Developer Mode); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline fails on the base alone too (5 of 5 runs on base, 5 of 5 on the merge); e2e test_title_draws_with_a_root_signature_under_the_debug_layer failed once in the full run on the D3D12.X check "a texture in title memory (XG layout, #44) follows CPU writes" (every file/overlay check in that run passed, including "writes go to the overlay, game folder untouched"); it did not reproduce alone: 3 of 3 passed on the base and 3 of 3 on the merge. review: correct for what it sets out to do; whole diff read (16 lines, vfs.rs only). MAXIMUM_ALLOWED now counts as a write in is_write, so an open of an existing game file with that mask gets an overlay copy instead of a handle to the original, which Windows could have granted with write rights. All three open hooks (CreateFileW, CreateFileA, CreateFile2) pass the access mask unchanged, so all are covered. MAXIMUM_ALLOWED has the same value as FILE_FLAG_BACKUP_SEMANTICS (0x0200_0000), but WRITE_ACCESS is tested only against the access mask (is_write), never against the flags, so the two do not mix. The new test fails without the fix: with MAXIMUM_ALLOWED taken out of WRITE_ACCESS it returns the game folder's file instead of the overlay path; restored, it passes. As the description says, a file that grants write but denies read now fails with access denied instead of opening the original (fail-closed, intended). #2850 makes the same one-line change (no test) and is not yet in #1607's D128 group with this PR and #2708. performance: on by default. Every MAXIMUM_ALLOWED open of an existing game file now copies the whole file into the overlay first, also when the caller only reads; for a large archive that is a stall and the disk space. Not measured here (no title run); the PR description reports an empty overlay and zero redirected writes after its 60 s smoke on the PR head. verdict: safe to merge (the copy cost on a title that does open archives with MAXIMUM_ALLOWED is unmeasured and the maintainer's call) hardware / tool and model: RTX 3070 8 GB (610.88), Ryzen 5 5600X, Windows 11 Home 26300, Rust 1.95.0, debug / Claude Code, Claude Opus 5.5 (merge, build, suite, reruns, mutation check and review)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2684
No description provided.