VFS: treat a MAXIMUM_ALLOWED open as a write open (#2682) #2708
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2708
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2708"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@kotekompotek on GitHub · 2026-11-26 07:54 UTC · original
kotekompotek:fix/vfs-maximum-allowed→main· +21 −0 · 1 files · 1 commits · openFixes #2682.
WRITE_ACCESSlacksMAXIMUM_ALLOWED(0x0200_0000), sois_writetakes the read branch forCreateFileW(GAME:\file, MAXIMUM_ALLOWED, ..., OPEN_EXISTING):open_decision_forreturns the original path andhk_create_file_wruns the real open on it with every right the ACL grants - on a writable game folder that includes write, so aWriteFileon the handle changes the game folder the README promises is never modified, bypassing the overlay.With the bit in the mask the open takes the same copy-on-write path as an explicit write open; a title that only wants to read gets the overlay copy instead, same content.
What is in it
crates/xcl/src/vfs.rs:MAXIMUM_ALLOWEDinWRITE_ACCESS; a unit test asserting aMAXIMUM_ALLOWED + OPEN_EXISTINGopen of a game file gets the overlay copy while a plainGENERIC_READopen still gets the original.Tested
cargo test -p xcl --lib a_maximum_allowed_open_takes_the_write_path: fails without the fix (the original path is returned), passes with it.cargo test --workspace --no-fail-fast -- --test-threads=4on15393dc5(parentb49be183, which merges cleanly): 1433 passed / 3 failed / 47 ignored, 357 GPU tests SKIPPED. The 3 failures are the known environment-bound ones (SM 6.5 / driver HRESULT / DXC barrier diff), same set as upstreamb49be183.Regression run
Run under load-matched conditions on
D:\GTA6.Xbox.v1.0.2.1,-Seconds 0(the only window that reliably precedes the title's entry-point int3 on this hardware), both binaries release-built.Main
b49be183:PR head
15393dc5:Not tested
MAXIMUM_ALLOWED(the issue rates it rare); verified on the synthetic decision only.AI use
Devin (SWE-2 High) implemented the fix and test, ran the suite and smoke runs, and wrote this PR.
@fromthemoonx on GitHub · 2026-11-26 08:04 UTC · original
This is the same change as #2694 (opened about an hour earlier for #2682): both add
MAXIMUM_ALLOWED(0x0200_0000) toWRITE_ACCESSincrates/xcl/src/vfs.rsand add oneopen_decisiontest. You may want to agree with @luckyteagirl on which one to keep. The question on #2694 about the copy-on-open cost for large archives opened withMAXIMUM_ALLOWEDapplies to this one as well.AI use: Claude Code (Claude Opus 5.5) compared the two diffs and wrote this comment.
@sage-sage on GitHub · 2026-11-26 08:48 UTC · original
Test report: passes on NVIDIA. Exact head
15393dc5(its base is currentmainb49be18, so head = merged).Tested
cargo test --workspace -- --test-threads=4: 1436 passed, 0 failed, 47 ignored;a_maximum_allowed_open_takes_the_write_pathpassesmainon this machine (wave64, debug layer, Developer Mode, heap windows)MAXIMUM_ALLOWEDline taken out ofWRITE_ACCESS(local only): the new test fails atvfs.rs:857(the open is not sent to the overlay), so it covers the fix.Not tested
MAXIMUM_ALLOWED.Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.