You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AI-assisted (Claude Code), reviewed by the contributor.
Two small libkernel findings from running RE4 (PPSA07411) on Windows. Each has its own branch on current main, a regression test in core/libs/tests/GuestMemory.cpp (both tests fail without the change, pass with it) and passes tools/check_conventions.py.
Not verified: that these two alone get RE4 further; other blockers remain. Not opened as PRs because intake is paused for new contributors; a maintainer is welcome to carry the commits.
Carried the first fix (sceKernelAvailableDirectMemorySize, aace6a3f) as #3292 with your commit unchanged. On Windows 11 (GCC 15.2), guest_memory passes 3/3 and fails at the first largest-block check with Export.cpp reverted to main. I didn't carry the mprotect fix because #2982 (TheAggie) changes the same thread-stack protection path.
Evidence that the sceKernelAvailableDirectMemorySize change matters beyond RE4: Sifu (PPSA03001, #3209) faulted in RenderThread 1 on a free-list head of 0xFFFFFFFFFFFFFFFF; with this branch it runs on, and with only that file's change reverted it faults again at the same address (same build otherwise). Details in #3209.
Fixed in part by #3292: sceKernelAvailableDirectMemorySize now reports the largest free block, covered by guest_memory; the sceKernelMprotect on host thread stacks item is still open (see #2982).
Thanks again @AchrafReyani for #3292. The other half of this issue, sceKernelMprotect on committed host memory outside the guest registry (a thread stack), is not on main yet. I rebased it onto current main (1be0a7c): https://github.com/xXPBSXx/AnyPS5/tree/fix/libkernel-mprotect-host-memory-v2 (one commit, test CheckMprotectOfHostMemoryOutsideTheGuestRegistry, guest_memory and the conventions check pass). Windows only, as before.
Both parts of this issue are on main: sceKernelAvailableDirectMemorySize reports the largest free block (#3292, merged 2026-10-11, carried from this branch) and sceKernelMprotect sets the native protection of committed host memory outside the guest registry (#3788, merged 2026-10-11) with a Windows test (CheckMprotectOfHostMemoryOutsideTheGuestRegistry) and a test for the first part (CheckAvailableDirectMemoryIsLargestFreeBlock) in guest_memory. Closing.
Activity
reyani-dev commentedon Oct 11, 2026
Carried the first fix (
sceKernelAvailableDirectMemorySize,aace6a3f) as #3292 with your commit unchanged. On Windows 11 (GCC 15.2),guest_memorypasses 3/3 and fails at the first largest-block check withExport.cppreverted tomain. I didn't carry themprotectfix because #2982 (TheAggie) changes the same thread-stack protection path.xXPBSXx commentedon Oct 11, 2026
Evidence that the
sceKernelAvailableDirectMemorySizechange matters beyond RE4: Sifu (PPSA03001, #3209) faulted inRenderThread 1on a free-list head of0xFFFFFFFFFFFFFFFF; with this branch it runs on, and with only that file's change reverted it faults again at the same address (same build otherwise). Details in #3209.AI-assisted (Claude Code).
adriadam10 commentedon Oct 11, 2026
Fixed in part by #3292:
sceKernelAvailableDirectMemorySizenow reports the largest free block, covered byguest_memory; thesceKernelMprotecton host thread stacks item is still open (see #2982).xXPBSXx commentedon Oct 11, 2026
Thanks again @AchrafReyani for #3292. The other half of this issue,
sceKernelMprotecton committed host memory outside the guest registry (a thread stack), is not onmainyet. I rebased it onto currentmain(1be0a7c): https://github.com/xXPBSXx/AnyPS5/tree/fix/libkernel-mprotect-host-memory-v2 (one commit, testCheckMprotectOfHostMemoryOutsideTheGuestRegistry,guest_memoryand the conventions check pass). Windows only, as before.AI-assisted (Claude Code).
xXPBSXx commentedon Oct 11, 2026
Both parts of this issue are on
main:sceKernelAvailableDirectMemorySizereports the largest free block (#3292, merged 2026-10-11, carried from this branch) andsceKernelMprotectsets the native protection of committed host memory outside the guest registry (#3788, merged 2026-10-11) with a Windows test (CheckMprotectOfHostMemoryOutsideTheGuestRegistry) and a test for the first part (CheckAvailableDirectMemoryIsLargestFreeBlock) inguest_memory. Closing.AI-assisted (Claude Code).