VFS: a .. in a console path stops at its mount's root #1170

Open
github-bot wants to merge 1 commit from github-bot/gh-1170 into main AGit
Owner

@⁠emirduran707 on GitHub · 2026-11-24 12:49 UTC · original
emirduran707:vfs-mount-dotdot → main · +35 −5 · 2 files · 1 commits · open

A console path with .. could leave the folder its drive is mounted on. apply_mounts put the rest of the path after the mount's target unchanged, so G:\..\data\hello.txt became <game folder>\..\data\hello.txt. That is a file next to the game folder, classified as a PC path, not the game's data\hello.txt. In the same way, T:\..\..\x reached outside the title's data folder, and S:\..\ left the PLS quota. On Windows a .. at a drive's root stays at the root (C:\..\x is C:\x), and on the console a mount is a drive.

below_mount now resolves . and .. in what follows a mount's prefix, stopping at the mount's root. Both places in apply_mounts that join a target and the rest of a path use it.

What is in it

  • crates/xcl/src/vfs.rs: below_mount, used by apply_mounts; cases added to mounts_and_classification (G:\..\data\hello.txt, G:\data\..\..\..\save.dat, GAME:\.\..\data\.\hello.txt, G:\.., T:\..\..\escape.bin, and a GAME: path below the game folder).
  • crates/xcl/tests/pls_quota.rs: the test listed S:\..\pls-other among paths that report the host's total. That path depended on the escape: it reached a folder outside S:. It now checks that S:\..\ stays at S:'s root and reports the PLS quota.

Tested

  • AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release
  • cargo test --workspace -- --test-threads=4 on dbf5dd9: 741 passed, 0 failed, 41 ignored; no SKIPPED GPU tests
  • mounts_and_classification without the change in apply_mounts fails (G:\..\data\hello.txt gives Translated("…\data\hello.txt") instead of Game { rel: "data\hello.txt" }); with it cargo test -p xcl --lib vfs:: passes, 12 passed

Regression run

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1541 (PresentX 1541)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19650 MB

this PR:

xcl-smoke v1
commit: dbf5dd9d83624f846accccb6f57a0b34f3eacc3c
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1461 (PresentX 1462)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18631 MB

Not tested

  • A title that uses .. in a console path; the smoke title's run is a regression check only.
  • NVIDIA and Intel GPUs.

AI use

  • Claude Code with Claude Opus 5.5: found the problem, wrote the change, the tests and this description; I reviewed the diff and ran the tests and smoke runs above.

🤖 Generated with Claude Code

**@⁠emirduran707** on GitHub · 2026-11-24 12:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/1170) `emirduran707:vfs-mount-dotdot` → `main` · +35 −5 · 2 files · 1 commits · open A console path with `..` could leave the folder its drive is mounted on. `apply_mounts` put the rest of the path after the mount's target unchanged, so `G:\..\data\hello.txt` became `<game folder>\..\data\hello.txt`. That is a file next to the game folder, classified as a PC path, not the game's `data\hello.txt`. In the same way, `T:\..\..\x` reached outside the title's data folder, and `S:\..\` left the PLS quota. On Windows a `..` at a drive's root stays at the root (`C:\..\x` is `C:\x`), and on the console a mount is a drive. `below_mount` now resolves `.` and `..` in what follows a mount's prefix, stopping at the mount's root. Both places in `apply_mounts` that join a target and the rest of a path use it. **What is in it** - `crates/xcl/src/vfs.rs`: `below_mount`, used by `apply_mounts`; cases added to `mounts_and_classification` (`G:\..\data\hello.txt`, `G:\data\..\..\..\save.dat`, `GAME:\.\..\data\.\hello.txt`, `G:\..`, `T:\..\..\escape.bin`, and a `GAME:` path below the game folder). - `crates/xcl/tests/pls_quota.rs`: the test listed `S:\..\pls-other` among paths that report the host's total. That path depended on the escape: it reached a folder outside `S:`. It now checks that `S:\..\` stays at `S:`'s root and reports the PLS quota. **Tested** - AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release - `cargo test --workspace -- --test-threads=4` on dbf5dd9: 741 passed, 0 failed, 41 ignored; no SKIPPED GPU tests - `mounts_and_classification` without the change in `apply_mounts` fails (`G:\..\data\hello.txt` gives `Translated("…\data\hello.txt")` instead of `Game { rel: "data\hello.txt" }`); with it `cargo test -p xcl --lib vfs::` passes, 12 passed **Regression run** main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1541 (PresentX 1541) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19650 MB ``` this PR: ``` xcl-smoke v1 commit: dbf5dd9d83624f846accccb6f57a0b34f3eacc3c gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1461 (PresentX 1462) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18631 MB ``` **Not tested** - A title that uses `..` in a console path; the smoke title's run is a regression check only. - NVIDIA and Intel GPUs. **AI use** - Claude Code with Claude Opus 5.5: found the problem, wrote the change, the tests and this description; I reviewed the diff and ran the tests and smoke runs above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
apply_mounts appended what follows a mount's prefix to the mount's folder
as it was, and `full()` then resolved its `..`. So `G:\..\save.dat` (and
`D:\`, `GAME:\`, `T:\`, `S:\`) named a file outside the folder the mount
stands for: next to the game folder, or above the title's temp and local
storage folders. Being outside the game folder, it was classified as a
translated path and opened as it is, so a write, create, delete or rename
through it reached the user's folder directly and skipped the overlay and
whiteouts. On the console, as on any Windows drive, `..` at the root stays
at the root: `G:\..\x` is `G:\x`.

The part below a mount is now resolved inside it (below_mount): `.` is
dropped and `..` removes the previous name, stopping at the mount's root.
Both places that build a mounted path use it.

tests/pls_quota.rs reached a sibling folder of the local storage through
`S:\..\pls-other`, which is that escape; the same sibling is still checked
through `T:\`, and `S:\..\` now has to report the quota.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:45:53 +00:00
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-24 13:36 UTC · original

NVIDIA run with the whole suite, since Not tested lists NVIDIA. The change is CPU-side, so the useful part here is the checks without the change.

Tested

  • NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974); rustc 1.100.0 stable-x86_64-pc-windows-msvc; debug
  • Exact head dbf5dd9d83624f846accccb6f57a0b34f3eacc3c, which is on current main 47efa2e: cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 741 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • Both tests fail without the change (vfs.rs as on main, with this PR's tests):
    • vfs::tests::mounts_and_classification: G:\..\data\hello.txt classifies as Translated("…\Temp\xcl_vfs_cls_…\data\hello.txt"), a file next to the game folder, instead of Game { rel: "data\hello.txt" }.
    • pls_quota::disk_free_space_ex_reports_pls_quota: S:\..\ reports 1023018004480 (the host disk) instead of 1048576 (the PLS quota).
  • vfs:: tests, 10 runs: 10 of 10 passed (12 each)
  • e2e + pls_quota, 3 runs: 3 of 3 passed (the test title's game-folder-untouched check included)

Not tested

  • A retail title using .. in console paths; release build.

AI use

  • Claude Code (Claude Opus 5.5) ran the build and tests on the machine above, including the checks without the change, and wrote this report from the output.
**@⁠fromthemoonx** on GitHub · 2026-11-24 13:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/1170#issuecomment-7133085132) NVIDIA run with the whole suite, since **Not tested** lists NVIDIA. The change is CPU-side, so the useful part here is the checks without the change. **Tested** - NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974); rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; debug - **Exact head `dbf5dd9d83624f846accccb6f57a0b34f3eacc3c`**, which is on current `main` `47efa2e`: `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **741 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - **Both tests fail without the change** (`vfs.rs` as on `main`, with this PR's tests): - `vfs::tests::mounts_and_classification`: `G:\..\data\hello.txt` classifies as `Translated("…\Temp\xcl_vfs_cls_…\data\hello.txt")`, a file next to the game folder, instead of `Game { rel: "data\hello.txt" }`. - `pls_quota::disk_free_space_ex_reports_pls_quota`: `S:\..\` reports `1023018004480` (the host disk) instead of `1048576` (the PLS quota). - `vfs::` tests, 10 runs: **10 of 10 passed** (12 each) - `e2e` + `pls_quota`, 3 runs: **3 of 3 passed** (the test title's game-folder-untouched check included) **Not tested** - A retail title using `..` in console paths; release build. **AI use** - Claude Code (Claude Opus 5.5) ran the build and tests on the machine above, including the checks without the change, and wrote this report from the output.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 07:46 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 07:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/1170#issuecomment-7156242360) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-25 14:35 UTC · original · edited 2026-11-25 14:40 UTC

Test report for dbf5dd9d83624f846accccb6f57a0b34f3eacc3c (this PR's head), for #1607.

Tested

  • NVIDIA GeForce RTX 4090 24 GB (driver 621.40), AMD Ryzen 9 9950X3D, 47 GB RAM, Windows 11 Home 10.0.26300, rustc 1.100.0 (0ef1bc386 2026-11-09) x86_64-pc-windows-msvc, debug.
  • cargo build --workspace, then cargo test --workspace -- --test-threads=4 at the head: 741 passed, 0 failed, 41 ignored.
  • SKIPPED (2): gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64).

Regression run (retail title, scripts/smoke.ps1 -Seconds 60, release; main built from the commit in its block, this PR from its head, no uncommitted changes)

main:

xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: NVIDIA GeForce RTX 4090
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1599 (PresentX 1599)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16384 MB

this PR:

xcl-smoke v1
commit: dbf5dd9d83624f846accccb6f57a0b34f3eacc3c
gpu: NVIDIA GeForce RTX 4090
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1585 (PresentX 1585)
presents per 2 s (last 3): 49 52 31
device removals: 0
crashes: 0
peak commit: 22113 MB

Peak commit is over the 125 % rule: this PR's run peaked at 22 113 MB, 134 % of main's 16 384 MB (frames: within 80 %). I can't tell from this whether the PR causes it: this branch is based on 47efa2e 490 commits older than the main commit (06c9f55) its run is compared with and each side was run once. A smoke run of 47efa2e itself or of this PR rebased onto current main would separate the two.

Not tested

  • AMD, other NVIDIA cards and drivers, Linux. I did not review the diff; this report is the build, the suite and the regression run only.

AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.

**@⁠S1m0ne1997** on GitHub · 2026-11-25 14:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/1170#issuecomment-7165514244) · edited 2026-11-25 14:40 UTC Test report for `dbf5dd9d83624f846accccb6f57a0b34f3eacc3c` (this PR's head), for #1607. **Tested** - NVIDIA GeForce RTX 4090 24 GB (driver 621.40), AMD Ryzen 9 9950X3D, 47 GB RAM, Windows 11 Home 10.0.26300, `rustc 1.100.0 (0ef1bc386 2026-11-09)` `x86_64-pc-windows-msvc`, debug. - `cargo build --workspace`, then `cargo test --workspace -- --test-threads=4` at the head: **741 passed, 0 failed, 41 ignored**. - SKIPPED (2): `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64). **Regression run** (retail title, `scripts/smoke.ps1 -Seconds 60`, release; `main` built from the commit in its block, this PR from its head, no uncommitted changes) main: ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: NVIDIA GeForce RTX 4090 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1599 (PresentX 1599) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16384 MB ``` this PR: ``` xcl-smoke v1 commit: dbf5dd9d83624f846accccb6f57a0b34f3eacc3c gpu: NVIDIA GeForce RTX 4090 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1585 (PresentX 1585) presents per 2 s (last 3): 49 52 31 device removals: 0 crashes: 0 peak commit: 22113 MB ``` **Peak commit is over the 125 % rule:** this PR's run peaked at 22 113 MB, 134 % of `main`'s 16 384 MB (frames: within 80 %). I can't tell from this whether the PR causes it: this branch is based on `47efa2e` 490 commits older than the `main` commit (`06c9f55`) its run is compared with and each side was run once. A smoke run of `47efa2e` itself or of this PR rebased onto current `main` would separate the two. **Not tested** - AMD, other NVIDIA cards and drivers, Linux. I did not review the diff; this report is the build, the suite and the regression run only. *AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.*
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1170/head:github-bot/gh-1170'
git switch 'github-bot/gh-1170'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1170'
git switch 'github-bot/gh-1170'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1170'
git switch 'github-bot/gh-1170'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1170'
git switch 'main'
git merge --squash 'github-bot/gh-1170'
git switch 'main'
git merge --ff-only 'github-bot/gh-1170'
git switch 'main'
git merge 'github-bot/gh-1170'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.