runtime: accept the 0x283/0x2004 pool block in the startup commit profile #1257
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1264"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-24T06:12:46Z.
Refs #870. Follows #1098.
Problem
After its four large blocks, the pool loop observed on #870 makes two more
XMemVirtualAlloccalls:0x200030000x2830x20040x1e000000x200030000x2830x20040x2000000The startup commit profile from #1098 accepts attribute
0x283only with protection0x2404, so both calls return NULL withERROR_INVALID_PARAMETER(87). A startup run onmainthen stops at about 220 s on a null resource lookup in the caller (access violation reading address 8). Accepting the pair is the only change that removes that stop: with the previousxmem_mapped_pages.cpprestored, or with this pair added, the run continues through the setup pages.Change
This is a proposed desktop policy, like the other pairs (no independent reference describes these attribute words).
0x283/0x2004becomes a fourth accepted configuration of theMEM_LARGE_PAGEStype0x20003000, with the same rules as the others:PAGE_READWRITE.As with the second pair, the console bit
0x2000abovePAGE_READWRITEis not reproduced. Every other argument set keeps the refusal. There's no permissive fallback.Test
cpu_native_xmem_pool_commit(tests/cpu/xmem_pool_commit.asm+_check.py):VirtualQuery, zero-fill and pattern checks as A, B and C, and the same release check.0x20403000.0x2004with attribute0x183stays refused, as before. All existing controls are kept.accepted_refusal0xF13,host_fit0xF1C,skip_release0xF1E.reserve_only,misalignedanddirtyare unchanged.main'sxmem_mapped_pages.cpp, the original EXE exits0xF0D(step 13, block D refused) under both the Windows loader andpe_map.Result on both presets: 2/2 passed. Every variant reports the same code under the Windows loader and
pe_map(0x870,0xf02,0xf02,0xf03,0xf13,0xf1c,0xf1e), and a provider withoutXMemVirtualAllocstopspe_mapat that import. Re-run after rebasing ontof1b16abd.Environment: Windows 10 Pro 19045, MSVC (VS 2022) x64,
devandreleasepresets. No GPU is involved. Docs:docs/experiments.md"Reserve and commit startup blocks".AI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T06:19:44Z.
Review: COMMENTED
Reviewed at commit
bb206279d80ed5279e9dffe63dd6c98a06e910a6.Verification
Linux
git diff --check origin/main...HEAD— cleantests/docs_links_check.py— passed (16 Markdown files, 284 links)tests/bidi_controls_check.py— passed (1065 tracked files)Windows Server 2025 (Build 26100, MSVC 14.44.35207)
--preset dev):xmem_commit_protection_check,cpu_xmem_pool_*,xmem_shim, and downstream targets) — built cleanly (26.97s)ctest --preset dev -R '^(cpu_native_xmem_pool_commit|xmem_commit_protection)$' --parallel 4 --no-tests=error --output-on-failure— 2/2 passed (xmem_commit_protection0.02s,cpu_native_xmem_pool_commit1.38s; total1.43s)/O2(--preset release):43.59s)ctest --preset release -R '^(cpu_native_xmem_pool_commit|xmem_commit_protection)$' --parallel 4 --no-tests=error --output-on-failure— 2/2 passed (xmem_commit_protection0.02s,cpu_native_xmem_pool_commit1.41s; total1.47s)Code Review Notes
src/xmem_mapped_pages.cpp: Narrowly extendscommit_startup_blockforallocation_type == 0x20003000(large_pages) to acceptattributes == 0x283 && protection == 0x2004alongside0x2404, preserving 2 MiB base alignment, nonzero 64 KiB multiple sizing, exact commit without rounding, andPAGE_READWRITEprotection.tests/cpu/xmem_pool_commit.asm+tests/cpu/xmem_pool_commit_check.py: Adds block D (SIZE_D = 0x220000, 2 MiB + 128 KiB) to verify non-rounded exact commit and adds the negative control refusing0x283/0x2004onPAGES_64K_TYPE(0x20403000), with updated step codes (0xF13,0xF1C,0xF1E).