GPU: keep a title guard page inside a range or in another view #67
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/PastiiJay--klbf-lab!67
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-67"
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?
@zocram4cc on GitHub · 2026-11-26 08:42 UTC · original
zocram4cc:up/guard-page-in-range→win10-test· +149 −30 · 1 files · 1 commits · openWhat breaks
protect_heremade a whole rangePAGE_READONLYwith oneVirtualProtectcall, and fell back to block by block only if that call failed.protect_aliasmade a whole 64 KiB block read-only without looking at it.VirtualProtectsets the protection of every page it covers, so a page the title had setPAGE_GUARDon inside that range or block lost its guard: no fault, no write seen, the guard gone.Red on the unchanged code, with the two new tests (
cargo xwin test, run under Proton Experimental 11.0-100):2isPAGE_READONLY;260isPAGE_READWRITE | PAGE_GUARD.The fix
alike(first, last), fromVirtualQuery: a change of protection covers only blocks that are committed, in one region, andPAGE_READONLYorPAGE_READWRITEthroughout.protect_here: the whole range is asked for only if it is alike throughout. Otherwise each block is asked for alone; a block that is not alike gets no call and stays as it is. Uncommitted blocks are still noted absent, as before.protect_alias: only alike blocks; it returns whether the block is read-only now.aliases_protected, rechecked inguard).This PR is the
alike()fix alone: no run batching and no counters.Tests
watch::testsunder Proton,--test-threads 1: all 13 pass (11 existing, the 2 new ones).14 passed; 1 failed; 1 ignored. The failure isdrvwatch::tests::the_system_takes_the_subscription(a Windows event-log subscription); it fails the same way on the unchanged code.cargo xwin build --profile diag -p victory --features diagnostics --target x86_64-pc-windows-msvcbuildstarget/x86_64-pc-windows-msvc/diag/victory.exewith 0 errors and no warnings fromwatch.rs.The test target of
victory-gpudoes not compile onwin10-test(42 errors, all in test code ofdescriptor/host.rs,indirect.rsandpipeline/host.rs). To run the watch tests, those three test modules were switched off in a local change that is not in this PR. This PR does not fix those errors, so CI's test step fails on this base with or without this change.No frame-time claim
This changes which blocks get a protection call, and what is told as written when a block cannot be guarded. It makes no claim about frame time.
Windows untested
Windows is untested. The build is cross-compiled from Linux with
cargo xwin, and the tests ran under Proton (Wine), not on Windows.Not covered
open, the other direction, still sets a whole protected block to read-write. From reading the code (not tested): a guard the title sets on a page of a block already made read-only is lost when that block is opened.VirtualQuery) and the change (VirtualProtect) are two calls; a protection set in between is not seen.Credits
alike(): our avatarmanz/VIctory-7900XTX PR #68.AI-assisted
AI-assisted: written with Claude Code; the build and tests above were run on the branch, with the test-target exclusion described above.
@HandshakeHackin on GitHub · 2026-11-26 08:57 UTC · original
Native Windows result at
7d8286d: all 13watch::testspassed on Windows Server 2022 and 2025, including both new tests for preserving the title’s page guard. The Windows event-log subscription test that failed under Proton also passed on each runner. Server 2022 log · Server 2025 logThe diagnostics library compiled on the exact PR head first. To build the test target, I applied #37’s test repairs in the verification checkout and excluded the unrelated descriptor unit-test module, which still references APIs missing on
win10-test. CI checked thatwatch.rsanddrvwatch.rsmatched the PR before running their tests.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.