Repository navigation
VFS: reject creation beneath existing virtual files - #618
Draft
WebIdentity1 wants to merge 1 commit into
Draft
WebIdentity1 wants to merge 1 commit into
WebIdentity1 wants to merge 1 commit into
Conversation
Creating overlay parents below a visible original file could hide that file behind a directory. Check ancestor types before either write preparation or directory creation mutates the overlay. Compare rejection with native CreateFileW/CreateDirectoryW and preserve creation below missing or deleted parents. Part of xcl-dev#577 (item 2 only).
|
Regression runs for this PR's head main: this PR: Tested
Not tested
Report written with Claude Code (Claude Opus 5.5) from runs on this machine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creating a file or directory below an original game file could create overlay directories that hide that file. Check visible ancestors before either operation changes the overlay, and return
ERROR_PATH_NOT_FOUNDfor a file parent. Existing automatic creation of missing directories and replacement of deleted originals are preserved.Part of #577, item 2 only. Item 1 is being investigated by fladit123; item 3 is outside this patch. #316 changes classification in the same file; its current diff applies cleanly to this branch, but that combined tree was not executed.
Current integration status (November24)
#1259 adds an immediate-parent directory check to
prepare_write, overlapping this PR's file-creation protection but deliberately leavingcreate_dirunchanged. It also rejects missing/removed parents, whereas this patch preserves the old automatic-parent policy and tests it. Do not combine the patches mechanically: reconcile that policy/test interaction first. No integrated result is claimed. Existing branches and evidence are preserved.What is in it
vfs.rs: parent-type check inprepare_writeandcreate_dir, with three synthetic regression tests. README documents the refusal.Tested
c741a2a85cc3527a4e15a457d791762dee67f0ef, basecb868b200517d7b11bbfcb0146bf0c787ce632b6. Windows 10 build 19045, Ryzen 7 7800X3D, RTX 3090 driver 591.74 plus AMD integrated graphics driver 32.0.21030.2001, Rust 1.98.1 MSVC, SDK DXC 1.8.2502.11, Agility 1.620.2, debug. Desktop session,XCL_ADAPTER=3090; some upstream fixtures select AMD directly.cargo build --locked --workspace: succeeded for both trees. Candidatecargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-output: 687 passed, 1 failed, 41 ignored. Onlygpu_clamp_and_omod_per_instructionfailed, also present on the baseline.gpu_uma_import_check_at_init,large_heaps_get_shared_pages_as_used,slots_copy_and_release, andcopy_descriptors_remaps_xbox_extra_cbv_srv_uav_to_pc_enumstalled. Baseline diagnostic with--test-threads=1: 684 passed, 1 failed, 41 ignored, same CLAMP failure. This patch is not claimed to fix the intermittent parallel stall.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no native wave64 on NVIDIA);test_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_state(debug layer unavailable). UnsetXCL_SAMPLE_*cases return early.cargo test --locked -p xcl --lib vfs::tests:: -- --test-threads=4 --show-output: old runtime plus the new tests 10/3/0; candidate 12/1/0. Both new rejection tests fail before the fix and pass after; native Win32 rejects with error 3. The third test preserves missing/deleted-parent behavior. The remaining focused failure is the existingtruncate_existing_validation_errors(127 vs 5), present in both trees; it passes in the completed full-suite runs. Its firstunder_wine()call precedesGetLastError()and can overwrite the error.Regression run
Independent contributor Anon64 supplied these exact-head/main runs, copied verbatim. These are their measurements, not ours. RTX3060 12GB driver581.80, i9-14900KF, Windows11 26200.9974, Rust1.90.0, release; same title/duration, clean source,
scripts/smoke.ps1. They did not test whether that title writes below a game file; our synthetic tests cover the error path.Draft retained: conflicts with current main and required CI remains outstanding. The code/head is unchanged; these runs do not qualify any future refresh.
Not tested
By us: retail behavior, release builds, Wine, concurrent namespace changes, or a combined tree with #316. The independent startup smoke above is not direct validation of the changed error path. No claim of the retail title gameplay progress.
AI use
Codex (GPT-6) inspected the issue and overlap, implemented the patch and synthetic tests, ran native Windows validation, and prepared this description.