mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[PR #3859] [MERGED] libkernel: Implement sceKernelEnableDmemAliasing, proper mapping type checks in posix_mmap #3763
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3763
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3859
Author: @StevenMiller123
Created: 12/7/2025
Status: ✅ Merged
Merged: 12/8/2025
Merged by: @georgemoralis
Base:
main← Head:quick-mem-fixes📝 Commits (5)
0acd69dBasic handling for MAP_VOID, MAP_STACK, and MAP_ANON in mmap.1bbb3a6Update memory.cpp110461fUpdate memory.cpp9cdd547Dmem aliasing checkea426a8Oops📊 Changes
2 files changed (+43 additions, -5 deletions)
View changed files
📝
src/core/libraries/kernel/memory.cpp(+40 -5)📝
src/core/memory.h(+3 -0)📄 Description
This PR includes proper checks for dmem aliasing (implemented in a naive way for now), and adds three flags to Core::MemoryMapFlags for determining memory type.
For mmap, flag Anon signifies mappings with no backing (flex mem), flag Stack is for mapping stack memory, and flag Void is for reserving memory. These can all be verified through decompiling libkernel, as it uses these flags for mmap calls in the relevant kernel functions.
This PR needs regression testing, primarily in titles with SDK version at or above 2.50. I don't have access to the wider range of games I own, so I can't really test this myself.
Would also be nice to have someone test Red Dead Redemption 2, it is the only game I've seen sceKernelEnableDmemAliasing called in, but I can't test it right now.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.